diff --git a/users/ellmau/conf/xmonad/xmonad.hs b/users/ellmau/conf/xmonad/xmonad.hs index bf88653..3692c69 100644 --- a/users/ellmau/conf/xmonad/xmonad.hs +++ b/users/ellmau/conf/xmonad/xmonad.hs @@ -123,6 +123,7 @@ layoutMap k l = ("M-y M-" ++ k, sendMessage $ JumpToLayout (l :: String)) myHookManager = composeAll [ manageDocks , className =? "Element" --> doShift "comm" , className =? "firefox" --> doShift "web" + , className =? "thunderbird" --> doShift "comm" , isFullscreen --> doFullFloat , placeHook $ withGaps (32, 32, 32, 32) $ smart (0.5, 0.5) , manageHook def @@ -154,6 +155,7 @@ fadeHook act inact = fadeOutLogHook $ fadeAllBut exceptions act inact <||> className =? "firefox" <||> className =? "Chromium-browser" <||> className =? "Emacs" + <||> className =? "thunderbird" fadeAllBut :: Query Bool -> Rational -> Rational -> Query Rational fadeAllBut qry amt inact = do isInactive <- isUnfocused diff --git a/users/ellmau/polybar_xmonad.nix b/users/ellmau/polybar_xmonad.nix index 01a961c..75b91ff 100644 --- a/users/ellmau/polybar_xmonad.nix +++ b/users/ellmau/polybar_xmonad.nix @@ -22,15 +22,17 @@ with lib; { left = "xmonad"; center = ""; # right = "xbacklight xkeyboard eth wlan battery date powermenu dunst volume "; - right = ""; + right = "xkeyboard dunst battery date volume"; }; tray = { position = "right"; - padding = 2; + padding = 3; }; - background = "FFFFFF"; - foreground = "000000"; + # background = "FFFFFF"; + # foreground = "000000"; + + module-margin = 2; monitor = '' ''${env:MONITOR:} @@ -42,8 +44,7 @@ with lib; { modules = { left = "xmonad"; center = ""; - right = - " xbacklight xkeyboard eth wlan battery date powermenu volume "; + right = ""; }; monitor = '' ''${env:MONITOR:} @@ -55,6 +56,64 @@ with lib; { exec = "${pkgs.xmonad-log}/bin/xmonad-log"; tail = true; }; + + "module/dunst" = { + type = "custom/script"; + exec = + "PATH=${pkgs.dbus}/bin/:$PATH ${pkgs.dunst}/bin/dunstctl is-paused | ${pkgs.gnugrep}/bin/grep -q true && echo  || echo  "; + interval = 10; + click-left = + "PATH=${pkgs.dbus}/bin/:$PATH ${pkgs.dunst}/bin/dunstctl set-paused toggle"; + }; + + "module/volume" = { + type = "internal/pulseaudio"; + format.volume = " "; + label.muted.text = "🔇"; + label.muted.foreground = "#666"; + ramp.volume = [ "🔈" "🔉" "🔊" ]; + click.right = "${pkgs.pavucontrol}/bin/pavucontrol &"; + # format-volume-underline = Base2; + # format-muted-underline = Base2; + }; + + "module/xkeyboard" = { + type = "internal/xkeyboard"; + blacklist-0 = "num lock"; + interval = "5"; + format-prefix = ''""''; + label-layout = "%layout%"; + label-indicator-padding = "2"; + label-indicator-margin = "1"; + }; + + "module/battery" = { + type = "internal/battery"; + battery = "BAT0"; + adapter = "ADP1"; + full-at = "98"; + format-charging-prefix = ''" "''; + format-charging = ""; + format-discharging-prefix = ''" "''; + format-discharging = ""; + format-full-prefix = ''" "''; + format-full-padding = "1"; + format-charging-padding = "1"; + format-discharging-padding = "1"; + }; + + "module/date" = { + type = "internal/date"; + interval = "5"; + + date = ''" %Y-%m-%d"''; + date-alt = ''" %Y-%m-%d"''; + + time = "%H:%M"; + time-alt = "%H:%M:%S"; + + label = "%{A} %date% %time%"; + }; }; script = '' for m in $(polybar --list-monitors | ${pkgs.gnugrep}/bin/grep '(primary)' | ${pkgs.coreutils}/bin/cut -d":" -f1); do