Add redshift toggle keybinding

master
Lars Vierbergen 8 years ago
parent 8c6254bb7e
commit 679c30a20b
  1. 3
      .xmobarrc
  2. 7
      toggle-redshift.sh
  3. 1
      xmonad.hs

@ -9,9 +9,10 @@ Config { font = "-*-Fixed-Bold-R-Normal-*-13-*-*-*-*-*-*-*"
, Run Battery ["-t", "<acstatus>", "-L", "10", "-H", "80", "-l", "red", "-h", "green", "--", "-O", "<fc=blue><left>%</fc>", "-i", "<fc=blue><left>%</fc>", "-o", "Bat: <left>% / <timeleft>"] 10
, Run Locks
, Run Com "python" ["/home/lars/.xmonad/xmonad-pulsevolume/show-volume.py"] "vol" 1
, Run Com "bash" ["-c", "if pidof redshift > /dev/null; then echo R; else echo r; fi"] "redshift" 1
, Run StdinReader
]
, sepChar = "%"
, alignSep = "}{"
, template = "%StdinReader% }{ <action=`pavucontrol`>%vol%</action> | %locks% | <action=`gnome-power-statistics`>%battery%</action> | <action=`gnome-system-monitor`>%cpu% | %memory% * %swap%</action> | <fc=#ee9a00>%date%</fc>"
, template = "%StdinReader% }{ <action=`~/.xmonad/toggle-redshift.sh`>%redshift%</action> | <action=`pavucontrol`>%vol%</action> | %locks% | <action=`gnome-power-statistics`>%battery%</action> | <action=`gnome-system-monitor`>%cpu% | %memory% * %swap%</action> | <fc=#ee9a00>%date%</fc>"
}

@ -0,0 +1,7 @@
#!/bin/bash
if pidof redshift; then
killall redshift
else
redshift -l 51:5 -t 6500:3000&
disown
fi

@ -67,6 +67,7 @@ main = do
`additionalKeys`
[ ((modMask baseConfig .|. controlMask, xK_l), spawn "xscreensaver-command -lock")
, ((modMask baseConfig .|. controlMask, xK_s), spawn "systemctl hibernate")
, ((modMask baseConfig, xK_r), spawn "~/.xmonad/toggle-redshift.sh")
, ((modMask baseConfig, xK_e), spawn "caja")
, ((0, xK_Print), spawn "scrot")
-- Normal Alt-Tab behavior

Loading…
Cancel
Save