diff options
| -rw-r--r-- | extras/HOME/.xmobarrc | 25 | ||||
| -rwxr-xr-x | extras/HOME/.xmonad/xmobar-wifi | 14 | ||||
| -rw-r--r-- | src/Rahm/Desktop/Keys.hs | 50 | ||||
| -rw-r--r-- | xmobar/extras/weather/src/Main.hs | 4 |
4 files changed, 55 insertions, 38 deletions
diff --git a/extras/HOME/.xmobarrc b/extras/HOME/.xmobarrc index 36989d7..3367918 100644 --- a/extras/HOME/.xmobarrc +++ b/extras/HOME/.xmobarrc @@ -1,15 +1,15 @@ Config - { font = "Monofur Nerd Font 12", + { font = "Monofur Nerd Font 14", additionalFonts = - [ "Monofur NERD Font Bold 10", - "Monofur NERD Font Bold 7", - "Monofur NERD Font Bold 10", -- Media, Weather, etc. - "Monofur NERD Font Bold 10", - "Monofur NERD Font Bold 18", + [ "Monofur NERD Font Bold 12", + "Monofur NERD Font Bold 9", + "Monofur NERD Font Bold 12", -- Media, Weather, etc. "Monofur NERD Font Bold 12", - "Noto Sans Mono CJK JP Bold 12", - "Monofur NERD Font Bold 12", - "Monofur NERD Font Bold 3" + "Monofur NERD Font Bold 20", + "Monofur NERD Font Bold 14", + "Noto Sans Mono CJK JP Bold 14", + "Monofur NERD Font Bold 14", + "Monofur NERD Font Bold 5" ], borderColor = "black", border = FullBM -1, @@ -17,7 +17,7 @@ Config bgColor = "#000000", fgColor = "white", alpha = 255, -- default: 255 - position = TopSize C 99 40, + position = TopSize C 99 60, textOffset = -1, -- default: -1 iconOffset = -1, -- default: -1 lowerOnStart = True, @@ -33,8 +33,10 @@ Config " %logo% \ \%UnsafeStdinReader%}{\ \<fc=#404040>\ + \<fc=#888888>|</fc>\ + \ %wifi% \ \<action=alacritty -t 'Floating Term' -e sh -c 'curl wttr.in ; read i'>\ - \<fc=#888888>|</fc> %weather% \ + \ %weather% \ \</action>\ \</fc><fc=#a0a0a0>%media%</fc>\ \%bluetooth% %bat%<fn=3> %cpu% %memory%<fc=#8888ff> %time%</fc></fn> ", @@ -86,6 +88,7 @@ Config Run Com ".xmonad/xmobar-logo" [] "logo" 0, Run Com "uname" ["-r"] "uname" 0, Run Com ".xmonad/xmobar-bluetooth" [] "bluetooth" 50, + Run Com ".xmonad/xmobar-wifi" [] "wifi" 50, Run Com ".xmonad/xmobar-battery" [] "bat" 20 ] } diff --git a/extras/HOME/.xmonad/xmobar-wifi b/extras/HOME/.xmonad/xmobar-wifi new file mode 100755 index 0000000..bc55725 --- /dev/null +++ b/extras/HOME/.xmonad/xmobar-wifi @@ -0,0 +1,14 @@ +#!/bin/bash + +runtime_dir=$XDG_RUNTIME_DIR/rde/vars/ +mkdir -p $runtime_dir + + +wifi="$(nmcli connection show --active | grep "wifi")" + +if [[ -z "$wifi" ]] ; then + echo "<fc=#404040> </fc>" +else + name=${wifi/ */} + echo "<fc=#ffffff> $name</fc>" +fi diff --git a/src/Rahm/Desktop/Keys.hs b/src/Rahm/Desktop/Keys.hs index 0d24593..a4415da 100644 --- a/src/Rahm/Desktop/Keys.hs +++ b/src/Rahm/Desktop/Keys.hs @@ -738,23 +738,12 @@ bindings = do altMod $ spawnX "sudo -A systemctl suspend && xsecurelock" bind xK_x $ do - shiftMod $ - doc "Reset the holes" $ do - logs Debug "reset hole" - sendMessage resetHole - logs Debug "/reset hole" - justMod $ - doc "Add hole next to the current window" $ do - logs Debug "Add hole" - withFocused $ \foc -> - withWindowSet $ \ws -> do - logs Debug "/Add hole at %s" (show foc) - whenJust (W.windowTilePosition foc ws) $ \tp -> do - logs Debug "Tile position: %s" (show tp) - (X.broadcastMessage . addHole) tp - refresh - logs Debug "/Add hole" + doc "Toggles respect for struts." $ + sendMessage ToggleStruts + shiftMod $ + doc "Remove the border from the focused window" $ + withFocused $ setBorderWidth 0 . (: []) bind xK_space $ do justMod $ @@ -800,14 +789,6 @@ bindings = do doc "Jump to the middle layout." $ sendMessage (toIndexedLayout (nLayouts `div` 2)) - bind xK_x $ do - justMod $ - doc "Toggles respect for struts." $ - sendMessage ToggleStruts - shiftMod $ - doc "Remove the border from the focused window" $ - withFocused $ setBorderWidth 0 . (: []) - bind xK_g $ (noMod -|- justMod) $ doc @@ -828,6 +809,25 @@ bindings = do [' '] -> restoreTheater Nothing _ -> return () + bind xK_x $ do + shiftMod $ + doc "Reset the holes" $ do + logs Debug "reset hole" + sendMessage resetHole + logs Debug "/reset hole" + + justMod $ + doc "Add hole next to the current window" $ do + logs Debug "Add hole" + withFocused $ \foc -> + withWindowSet $ \ws -> do + logs Debug "/Add hole at %s" (show foc) + whenJust (W.windowTilePosition foc ws) $ \tp -> do + logs Debug "Tile position: %s" (show tp) + (X.broadcastMessage . addHole) tp + refresh + logs Debug "/Add hole" + let spaceResize = repeatable $ do bind xK_bracketright $ do noMod $ @@ -1456,7 +1456,7 @@ windowSpecificBindings config = do noMod $ emitKey (controlMask, xK_F2) where - browsers = ["Google-chrome", "Brave-browser", "firefox-default"] + browsers = ["Google-chrome", "Brave-browser", "firefox-default", "Firefox"] spotify = ["Spotify"] -- Create a permutation from a list of modifiers. diff --git a/xmobar/extras/weather/src/Main.hs b/xmobar/extras/weather/src/Main.hs index ccabc21..aff669a 100644 --- a/xmobar/extras/weather/src/Main.hs +++ b/xmobar/extras/weather/src/Main.hs @@ -180,7 +180,7 @@ handleWeather w = execWriter $ do tell " " tell $ lightGrey $ fn 3 $ windspeedMiles (currentCondition w) ++ "mph" - tell " " + tell " " let conditions = if isNight then conditionsIconNight else conditionsIconDay tell $ @@ -188,7 +188,7 @@ handleWeather w = execWriter $ do fromMaybe "?" $ findMatch (map Data.Char.toLower $ weatherDesc (currentCondition w)) conditions - tell " " + tell " " tell $ lightGrey $ fn 3 $ printf "%s°F" (tempF $ currentCondition w) where isNight = |