diff options
author | Vidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com> | 2020-11-30 18:54:24 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com> | 2020-11-30 18:54:24 +0530 |
commit | 6c055d89bdfd51eab7ba111a95dd55701d1c9888 (patch) | |
tree | 664c090439ac65414a6e19bf9ddd55f3eb8cd1c7 | |
parent | e75bab87fc1638f5593b19c52a8f73ddcfdefdf2 (diff) |
polished the bar and added it to XMonad autostarts
-rwxr-xr-x | XMonad/baraction | 17 | ||||
-rw-r--r-- | XMonad/xmonad.hs | 15 |
2 files changed, 15 insertions, 17 deletions
diff --git a/XMonad/baraction b/XMonad/baraction index 7a528496..ed3013a1 100755 --- a/XMonad/baraction +++ b/XMonad/baraction @@ -22,7 +22,7 @@ get_cpu_temp() { get_disk_usage() { root=$(df -h / | awk 'NR==2 {print $4 "/" $2}') home=$(df -h /home | awk 'NR==2 {print $4 "/" $2}') - echo "ROOT:" $root " %{B-}" "%{B#E6739F} HOME:" $home " " + echo "ROOT:" $root " %{B-} " "%{B#E6739F} HOME:" $home " " } get_mem_usage() { @@ -34,14 +34,15 @@ get_mute_status() { vol=$(pamixer --get-volume-human) if [ $vol == "muted" ] then - echo "muted" - else - echo "not muted" + echo "%{B#F15BB5}%{F#232627} muted" fi } -while : -do - echo "%{B#FD3A69}%{F#232627} " $(get_disk_usage) "%{B-} %{B#FECD1A} " $(get_cpu_load) "%{B-} %{B#03C4A1}" $(get_cpu_temp) "%{B-} %{B#FA26A0}" $(get_mem_usage) "%{B-}%{F-}%{r}%{B#6F4A8E}" $(get_mute_status) "%{B-} %{B#892CDC}%{F#FCFCFC} " ${DATETIME} " %{F-}%{B-}" - sleep 5 +get_weather() { + echo $(</tmp/weather_stat) +} + +while :; do + echo "%{B#FD3A69}%{F#232627} " $(get_disk_usage) "%{B-} %{B#FECD1A} " $(get_cpu_load) "%{B-} %{B#03C4A1}" $(get_cpu_temp) "%{B-} %{B#00BBF9}" $(get_mem_usage) "%{B-}%{F-}%{r}" $(get_mute_status) "%{B-}%{F-} %{B#9B5DE5}%{F#FCFCFC}" $(get_weather) "%{B-} %{B#892CDC}%{F#FCFCFC} " ${DATETIME} " %{F-}%{B-}" + sleep 3 done diff --git a/XMonad/xmonad.hs b/XMonad/xmonad.hs index a095e079..220cecf6 100644 --- a/XMonad/xmonad.hs +++ b/XMonad/xmonad.hs @@ -1,11 +1,5 @@ import XMonad import qualified XMonad.StackSet as W --- import XMonad hiding ((|||)) - --- for bar shit --- import Data.Time.Clock -import qualified XMonad.Util.ExtensibleState as XS -import XMonad.Util.Timer -- actions import XMonad.Actions.CycleWS (moveTo, shiftTo, WSType(..), nextScreen, prevScreen) @@ -47,11 +41,14 @@ import XMonad.Util.Run myStartupHook :: X () myStartupHook = do + spawnOnce "/home/zt/.xmonad/baraction | lemonbar -g 1366x21+0+0 -B '#171520' -F '#ffffff' -f 'Source Han Sans JP:size=10' -n 'XMobar'" + spawnOnce "/home/zt/.config/scripts/weather" spawnOnce "nitrogen --restore &" spawnOnce "picom &" spawnOnce "deadd-notification-center &" -- spawnOnce "firefox &" spawnOnce "sxhkd &" + spawnOnce "weather" spawnOnce "betterlockscreen -l -t 'Welcome, Vidhu Kant!'" setWMName "AnimeTits&ThighsWM" setDefaultCursor xC_left_ptr @@ -199,7 +196,7 @@ myLemonbarPP = def {ppCurrent = wrap "%{F#6c71c4}%{B#d33682}%{F-}" "%{F#d33682}% , ppWsSep = " " , ppHidden = wrap "%{B#268bd2}" "%{B-}" , ppHiddenNoWindows = wrap "%{F#02fc45}" "%{F-}" - , ppTitle = wrap " %{B#6c71c4}%{F#f0f0f0} " " %{B-}" . shorten 90 + , ppTitle = wrap " %{B#6c71c4}%{F#f0f0f0} " " %{B-}" . shorten 75 , ppUrgent = wrap "%{B#9cfc02} " " %{B-}%{F-}" , ppLayout = wrap "%{r}%{B#99B1D5}%{F#232627} " " %{B-} " , ppSep = " " @@ -208,7 +205,7 @@ myLemonbarPP = def {ppCurrent = wrap "%{F#6c71c4}%{B#d33682}%{F-}" "%{F#d33682}% } main = do - bar <- spawnPipe "lemonbar -b -g 1366x21 -B '#171520' -F '#ffffff' -f 'Source Han Sans JP:size=10' -o -3 -f 'RobotoMono Nerd Font:style=Regular:size=15' -f -n 'notXMobar' -o 0" + notXMobar <- spawnPipe "lemonbar -b -g 1366x21+0+0 -B '#171520' -F '#ffffff' -f 'Source Han Sans JP:size=10' -o -3 -f 'RobotoMono Nerd Font:style=Regular:size=15' -f -n 'notXMobar' -o 0" xmonad $ docks def { terminal = myTerminal, @@ -222,7 +219,7 @@ main = do layoutHook = myLayoutHook, -- manageHook = myManageHook, -- handleEventHook = myEventHook, - logHook = dynamicLogWithPP myLemonbarPP { ppOutput = \x -> hPutStrLn bar x}, + logHook = dynamicLogWithPP myLemonbarPP { ppOutput = \x -> hPutStrLn notXMobar x}, startupHook = myStartupHook } `additionalKeys` myKeys |