Compare commits
2 Commits
30c109acae
...
bc9de3c204
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bc9de3c204 | ||
|
|
e19ce9623c |
14
config.h
14
config.h
@@ -13,7 +13,7 @@ static const int showsystray = 1; /* 0 means no systray */
|
|||||||
static const int showbar = 1; /* 0 means no bar */
|
static const int showbar = 1; /* 0 means no bar */
|
||||||
static const int topbar = 1; /* 0 means bottom bar */
|
static const int topbar = 1; /* 0 means bottom bar */
|
||||||
static const char *fonts[] = { "monospace:size=18", "Symbola:size=18" };
|
static const char *fonts[] = { "monospace:size=18", "Symbola:size=18" };
|
||||||
static const char dmenufont[] = "monospace:size=22";
|
static const char dmenufont[] = "monospace:size=18";
|
||||||
static const char col_gray1[] = "#222222";
|
static const char col_gray1[] = "#222222";
|
||||||
static const char col_gray2[] = "#444444";
|
static const char col_gray2[] = "#444444";
|
||||||
static const char col_gray3[] = "#bbbbbb";
|
static const char col_gray3[] = "#bbbbbb";
|
||||||
@@ -105,12 +105,12 @@ static const Key keys[] = {
|
|||||||
TAGKEYS( XK_8, 7)
|
TAGKEYS( XK_8, 7)
|
||||||
TAGKEYS( XK_9, 8)
|
TAGKEYS( XK_9, 8)
|
||||||
{ MODKEY|ShiftMask, XK_x, quit, {0} },
|
{ MODKEY|ShiftMask, XK_x, quit, {0} },
|
||||||
{ 0, XF86XK_AudioLowerVolume, spawn, SHCMD("pamixer --decrease 5; /usr/local/scripts/xsetsingle.sh") },
|
{ 0, XF86XK_AudioLowerVolume, spawn, SHCMD("pamixer --decrease 5; /usr/local/bin/xsetsingle.sh") },
|
||||||
{ 0, XF86XK_AudioMute, spawn, SHCMD("pamixer --toggle-mute; /usr/local/scripts/xsetsingle.sh") },
|
{ 0, XF86XK_AudioMute, spawn, SHCMD("pamixer --toggle-mute; /usr/local/bin/xsetsingle.sh") },
|
||||||
{ 0, XF86XK_AudioRaiseVolume, spawn, SHCMD("pamixer --increase 5; /usr/local/scripts/xsetsingle.sh") },
|
{ 0, XF86XK_AudioRaiseVolume, spawn, SHCMD("pamixer --increase 5; /usr/local/bin/xsetsingle.sh") },
|
||||||
{ 0, XF86XK_MonBrightnessUp, spawn, SHCMD("brightnessctl set 10%+; /usr/local/scripts/xsetsingle.sh") },
|
{ 0, XF86XK_MonBrightnessUp, spawn, SHCMD("brightnessctl set 10%+; /usr/local/bin/xsetsingle.sh") },
|
||||||
{ 0, XF86XK_MonBrightnessDown,spawn, SHCMD("brightnessctl set 10%-; /usr/local/scripts/xsetsingle.sh") },
|
{ 0, XF86XK_MonBrightnessDown,spawn, SHCMD("brightnessctl set 10%-; /usr/local/bin/xsetsingle.sh") },
|
||||||
{ 0, XF86XK_AudioMicMute, spawn, SHCMD("sh /usr/local/scripts/mutemic.sh; /usr/local/scripts/xsetsingle.sh") },
|
{ 0, XF86XK_AudioMicMute, spawn, SHCMD("sh /usr/local/bin/mutemic.sh; /usr/local/bin/xsetsingle.sh") },
|
||||||
{ 0, PrintScreenDWM, spawn, SHCMD("flameshot gui") },
|
{ 0, PrintScreenDWM, spawn, SHCMD("flameshot gui") },
|
||||||
{ 0, XF86XK_AudioPlay, spawn, SHCMD("playerctl play-pause") },
|
{ 0, XF86XK_AudioPlay, spawn, SHCMD("playerctl play-pause") },
|
||||||
};
|
};
|
||||||
|
|||||||
10
xsetroot.sh
10
xsetroot.sh
@@ -3,14 +3,14 @@ while true; do
|
|||||||
[[ $micstat = "false" ]] && micstat="✔️"
|
[[ $micstat = "false" ]] && micstat="✔️"
|
||||||
[[ $micstat = "true" ]] && micstat="🚫"
|
[[ $micstat = "true" ]] && micstat="🚫"
|
||||||
|
|
||||||
vol="$(pamixer --get-volume)%"
|
vol="$(pamixer --get-volume)"
|
||||||
|
|
||||||
if [ "$vol" -gt "70" ]; then
|
if [ "$vol" -gt "70" ]; then
|
||||||
volicon="🔊"
|
volicon="% 🔊"
|
||||||
elif [ "$vol" -lt "30" ]; then
|
elif [ "$vol" -lt "30" ]; then
|
||||||
volicon="🔈"
|
volicon="% 🔈"
|
||||||
else
|
else
|
||||||
volicon="🔉"
|
volicon="% 🔉"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[[ "$vol" = 0 || "$vol" = "" || $(pamixer --get-mute) = "true" ]] && volicon="🔇" && vol=""
|
[[ "$vol" = 0 || "$vol" = "" || $(pamixer --get-mute) = "true" ]] && volicon="🔇" && vol=""
|
||||||
@@ -46,7 +46,7 @@ while true; do
|
|||||||
"12") icon="🕛" ;;
|
"12") icon="🕛" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
xsetroot -name " 🔆 $(brightnessctl get -P) \ $volicon$vol \ $micstat🎤 \ $(free --mega | sed -n '2{p;q}' | awk '{printf ("%2.2fGB/%2.2fGB\n", ( $3 / 1000), ($2 / 1000))}') \ $batmsg \ $(date '+%a %d %b %Y') $icon $(date +"%-I:%M %p")"
|
xsetroot -name " 🔆 $(brightnessctl | grep -oP '\(\K[0-9]+(?=%\))') \ $vol$volicon \ $(free --mega | sed -n '2{p;q}' | awk '{printf ("%2.2fGB/%2.2fGB\n", ( $3 / 1000), ($2 / 1000))}') \ $batmsg \ $(date '+%a %d %b %Y') $icon $(date +"%-I:%M %p")"
|
||||||
|
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -2,14 +2,14 @@ micstat=$(pamixer --default-source --get-mute)
|
|||||||
[[ $micstat = "false" ]] && micstat="✔️"
|
[[ $micstat = "false" ]] && micstat="✔️"
|
||||||
[[ $micstat = "true" ]] && micstat="🚫"
|
[[ $micstat = "true" ]] && micstat="🚫"
|
||||||
|
|
||||||
vol="$(pamixer --get-volume)%"
|
vol="$(pamixer --get-volume)"
|
||||||
|
|
||||||
if [ "$vol" -gt "70" ]; then
|
if [ "$vol" -gt "70" ]; then
|
||||||
volicon="🔊"
|
volicon="% 🔊"
|
||||||
elif [ "$vol" -lt "30" ]; then
|
elif [ "$vol" -lt "30" ]; then
|
||||||
volicon="🔈"
|
volicon="% 🔈"
|
||||||
else
|
else
|
||||||
volicon="🔉"
|
volicon="% 🔉"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[[ "$vol" = 0 || "$vol" = "" || $(pamixer --get-mute) = "true" ]] && volicon="🔇" && vol=""
|
[[ "$vol" = 0 || "$vol" = "" || $(pamixer --get-mute) = "true" ]] && volicon="🔇" && vol=""
|
||||||
@@ -45,4 +45,4 @@ case "$clock" in
|
|||||||
"12") icon="🕛" ;;
|
"12") icon="🕛" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
xsetroot -name " 🔆 $(brightnessctl get -P) \ $volicon$vol \ $micstat🎤 \ $(free --mega | sed -n '2{p;q}' | awk '{printf ("%2.2fGB/%2.2fGB\n", ( $3 / 1000), ($2 / 1000))}') \ $batmsg \ $(date '+%a %d %b %Y') $icon $(date +"%-I:%M %p")"
|
xsetroot -name " 🔆 $(brightnessctl | grep -oP '\(\K[0-9]+(?=%\))') \ $vol$volicon \ $(free --mega | sed -n '2{p;q}' | awk '{printf ("%2.2fGB/%2.2fGB\n", ( $3 / 1000), ($2 / 1000))}') \ $batmsg \ $(date '+%a %d %b %Y') $icon $(date +"%-I:%M %p")"
|
||||||
|
|||||||
Reference in New Issue
Block a user