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