diff options
| author | Adrian Kummerlaender | 2019-01-23 23:14:49 +0100 | 
|---|---|---|
| committer | Adrian Kummerlaender | 2019-01-31 20:36:04 +0100 | 
| commit | 1c8cf1869a202833cfa88f1a73b5426914d0a35c (patch) | |
| tree | ceb42c222540a964a49e9ed04a77ef8864cb5160 /gui/conf | |
| parent | 913fe50e3ec3e63df7c4fc7c56827d204991581a (diff) | |
| download | nixos_home-1c8cf1869a202833cfa88f1a73b5426914d0a35c.tar nixos_home-1c8cf1869a202833cfa88f1a73b5426914d0a35c.tar.gz nixos_home-1c8cf1869a202833cfa88f1a73b5426914d0a35c.tar.bz2 nixos_home-1c8cf1869a202833cfa88f1a73b5426914d0a35c.tar.lz nixos_home-1c8cf1869a202833cfa88f1a73b5426914d0a35c.tar.xz nixos_home-1c8cf1869a202833cfa88f1a73b5426914d0a35c.tar.zst nixos_home-1c8cf1869a202833cfa88f1a73b5426914d0a35c.zip | |
Some athena-specific changes not ready for master
Diffstat (limited to 'gui/conf')
| -rw-r--r-- | gui/conf/xmonad.hs | 20 | 
1 files changed, 12 insertions, 8 deletions
| diff --git a/gui/conf/xmonad.hs b/gui/conf/xmonad.hs index bf067f9..ec8a7c6 100644 --- a/gui/conf/xmonad.hs +++ b/gui/conf/xmonad.hs @@ -36,6 +36,7 @@ import XMonad.Actions.UpdatePointer  import Data.Maybe  import Control.Monad (when)  import Data.Map (Map, fromList, member) +import Data.List (unionBy)  import System.Exit  import System.Posix.Unistd @@ -45,7 +46,7 @@ workspaces = map show [1 .. 9 :: Int]  customTabTheme = (theme xmonadTheme)    { fontName      = "xft:Iosevka Medium-12" -  , decoHeight    = 20 +  , decoHeight    = 30    , activeTextColor     = "#222222"    , activeColor         = "#909636"    , inactiveTextColor   = "#999999" @@ -114,11 +115,11 @@ windowBringerDmenuConfig = def { menuCommand  = "rofi"                                 , menuArgs     = [ "-p", "win", "-dmenu", "-i" ] }  hostSpecificKeybindings host = case host of -  "asterix" -> [ ("M-i b" , showNotification "Battery" -                                             "`acpi | cut -c 10-`") -               , ("M-i c" , showNotification "`acpi --thermal | awk '{print $4}'`°C" -                                             "`cat /proc/acpi/ibm/fan | awk '/speed/{print $2}'` RPM") -               , ("M-c n" , spawn "networkmanager_dmenu") ] +  "asterix" -> [ ("M-i b"   , showNotification "Battery" +                                               "`acpi | cut -c 10-`") +               , ("M-i c"   , showNotification "`acpi --thermal | awk '{print $4}'`°C" +                                               "`cat /proc/acpi/ibm/fan | awk '/speed/{print $2}'` RPM") +               , ("M-c n"   , spawn "networkmanager_dmenu") ]    "athena"  -> [ ("M-i b" , showNotification "Battery"                                               "`acpi | cut -c 10-`")                 , ("M-i c" , showNotification "`acpi --thermal | awk '{print $4}'`°C" @@ -128,7 +129,8 @@ hostSpecificKeybindings host = case host of                 , ("<XF86MonBrightnessDown>" , spawn "xbacklight -dec 5")                 , ("<XF86AudioRaiseVolume>"  , spawn "amixer sset Master 10%+")                 , ("<XF86AudioLowerVolume>"  , spawn "amixer sset Master 10%-") -               , ("<XF86AudioMute>"         , spawn "amixer sset Master toggle") ] +               , ("<XF86AudioMute>"         , spawn "amixer sset Master toggle") +               , ("<Print>"                 , namedScratchpadAction (scratchpads host) "terminal") ]    "obelix"  -> [ ("M-i g" , showNotification "GPU"                                               "`nvidia-smi --query-gpu=name,temperature.gpu,utilization.gpu,utilization.memory --format=csv,noheader | awk -F',' '{print $1 \" running at\" $2 \"°C due to\" $3 \" load and\" $4 \" memory usage\"}'`") ]    _         -> [ ] @@ -196,7 +198,9 @@ commonKeybindings host =    , ("M-c s"         , spawn "systemctl suspend")    , ("M-c h"         , spawn "systemctl hibernate") ] -customKeybindings host = concatMap ($ host) [commonKeybindings, hostSpecificKeybindings] +customKeybindings host = unionBy (\(keyA,_) (keyB,_) -> keyA == keyB) +                                 (hostSpecificKeybindings host) +                                 (commonKeybindings       host)  customMousebindings (XConfig {XMonad.modMask = modMask}) = fromList    [ ((modMask .|. shiftMask, button1), \w -> focus w >> mouseMoveWindow w) | 
