diff options
-rwxr-xr-x | bin/run-trayer.sh | 9 | ||||
-rwxr-xr-x | bin/toggle-nm-applet.sh | 3 | ||||
-rwxr-xr-x | bin/toggle-xmobar-bottom.sh | 9 | ||||
-rwxr-xr-x | bin/xmobars.sh | 13 | ||||
-rw-r--r-- | src/Top.hs | 8 |
5 files changed, 38 insertions, 4 deletions
diff --git a/bin/run-trayer.sh b/bin/run-trayer.sh new file mode 100755 index 0000000..c003117 --- /dev/null +++ b/bin/run-trayer.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +trayer --margin 2 --distancefrom left\ + --distance 575 --edge top \ + --align left \ + --widthtype request \ + --height 21 --heighttype pixel \ + --widthtype pixel --transparent true\ + --alpha 255 --padding 1 diff --git a/bin/toggle-nm-applet.sh b/bin/toggle-nm-applet.sh new file mode 100755 index 0000000..4a8d86a --- /dev/null +++ b/bin/toggle-nm-applet.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +(pidof nm-applet && killall nm-applet) || (nm-applet &) diff --git a/bin/toggle-xmobar-bottom.sh b/bin/toggle-xmobar-bottom.sh new file mode 100755 index 0000000..e2c839c --- /dev/null +++ b/bin/toggle-xmobar-bottom.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +pidof xmobar-bottom && killall xmobar-bottom + +if pidof spotify>/dev/null; then + xmobar-bottom $* spotify & +else + xmobar-bottom $* mpd & +fi diff --git a/bin/xmobars.sh b/bin/xmobars.sh new file mode 100755 index 0000000..751e3f2 --- /dev/null +++ b/bin/xmobars.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +killall xmobar-top +xmobar-top $* & +killall xmobar-bottom +if pidof spotify>/dev/null; then + xmobar-bottom $* spotify & +else + xmobar-bottom $* mpd & +fi + +killall trayer +run-trayer.sh & @@ -5,9 +5,9 @@ topProc p = TopProc (p <~> ["-t" , "<mboth3> <mboth2> <mboth1> \ \ยท <both3> <both2> <both1>" , "-w", "10", "-L" , "10", "-H", "80"]) 15 -wireless p = Wireless "wlan0" (p <~> ["-t" , "<essid> <quality>" - , "-W", "5", "-M", "15" , "-m", "2" - , "-L", "20", "-H", "80"]) 20 +wireless p = Wireless "wlp2s0" (p <~> ["-t" , "<essid> <quality>" + , "-W", "5", "-M", "15" , "-m", "2" + , "-L", "20", "-H", "80"]) 20 multiCPU p = MultiCpu (p <~> ["-t", "<autototal>" , "-S", "on", "-b", " ", "-f", "*" @@ -36,7 +36,7 @@ config p = (baseConfig p) { ] , template = " |top| {|XMonadLog|}\ \ |cpufreq| |multicpu| |dynnetwork|\ - \ <action=`wicd-client -n`>|tun0||wlan0wi|</action>\ + \ <action=`toggle-nm-applet.sh `>|tun0||wlp2s0wi|</action>\ \ |datetime| |laTime| " } |