From 62aadda8a139e347bc1d010afb20782dad34c111 Mon Sep 17 00:00:00 2001 From: lelgenio Date: Tue, 12 Apr 2022 22:49:47 -0300 Subject: [PATCH] systemd: fix gammastep --- dotfiles/runit_sv/gammastep/run | 8 +------- dotfiles/scripts/_gammastep | 9 +++++++++ dotfiles/systemd/gammastep.service | 13 +++++++++++++ 3 files changed, 23 insertions(+), 7 deletions(-) create mode 100755 dotfiles/scripts/_gammastep create mode 100644 dotfiles/systemd/gammastep.service diff --git a/dotfiles/runit_sv/gammastep/run b/dotfiles/runit_sv/gammastep/run index 3d6f2ca..ffd44f7 100755 --- a/dotfiles/runit_sv/gammastep/run +++ b/dotfiles/runit_sv/gammastep/run @@ -1,9 +1,3 @@ #!/bin/sh -if type curl; then - loc=`curl ipinfo.io/loc | sed 's/,/:/'` -else - loc="-30:-50" -fi - -exec gammastep -l "$loc" +exec _gammastep diff --git a/dotfiles/scripts/_gammastep b/dotfiles/scripts/_gammastep new file mode 100755 index 0000000..3d6f2ca --- /dev/null +++ b/dotfiles/scripts/_gammastep @@ -0,0 +1,9 @@ +#!/bin/sh + +if type curl; then + loc=`curl ipinfo.io/loc | sed 's/,/:/'` +else + loc="-30:-50" +fi + +exec gammastep -l "$loc" diff --git a/dotfiles/systemd/gammastep.service b/dotfiles/systemd/gammastep.service new file mode 100644 index 0000000..33aa2fe --- /dev/null +++ b/dotfiles/systemd/gammastep.service @@ -0,0 +1,13 @@ +# {{ header() }} + +[Unit] +Description=Wayland equivalent of autorandr. +Documentation=https://sr.ht/~emersion/kanshi/ +PartOf=graphical-session.target + +[Service] +Type=simple +ExecStart=/bin/env _gammastep + +[Install] +WantedBy=sway-session.target