Change the way qtile handles colors in statusbar.
This commit is contained in:
parent
1b6c5cca0b
commit
3e706f9ca6
4 changed files with 20 additions and 13 deletions
|
@ -1,8 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
case "$(cat /sys/class/net/w*/operstate 2>/dev/null)" in
|
case "$(cat /sys/class/net/w*/operstate 2>/dev/null)" in
|
||||||
down) printf "<span foreground='#000000' background='#ff3333'>no wifi</span>" ;;
|
down) printf "no wifi" ;;
|
||||||
up)
|
up) [ -n "$(ip address show dev wlan0 | grep 'inet ')" ] || printf "no ip" ;;
|
||||||
[ -n "$(ip address show dev wlan0 | grep 'inet ')" ] || printf "<span foreground='#000000' background='#ff3333'>no ip</span>"
|
|
||||||
# && printf "$icon $(iwgetid -r)" \
|
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -9,7 +9,7 @@ if [ $1 ]; then
|
||||||
dunstify -u low -h int:value:$volume -r 20 -t 800 "volume: $volume"
|
dunstify -u low -h int:value:$volume -r 20 -t 800 "volume: $volume"
|
||||||
else
|
else
|
||||||
mic=$(pactl get-source-volume @DEFAULT_SOURCE@ | awk -F' / ' '{print $2}' | tr -d '%')
|
mic=$(pactl get-source-volume @DEFAULT_SOURCE@ | awk -F' / ' '{print $2}' | tr -d '%')
|
||||||
[ $(pactl get-source-mute @DEFAULT_SOURCE@ | awk -F': ' '{print $2}') = yes ] || [ "$mic" -eq 0 ] && micmute="<span foreground='#ffffff' background='#770000'> \uf131 </span> " || micmute=""
|
[ $(pactl get-source-mute @DEFAULT_SOURCE@ | awk -F': ' '{print $2}') = yes ] || [ "$mic" -eq 0 ] && micmute="\uf131" || micmute=""
|
||||||
vol=$(pactl get-sink-volume @DEFAULT_SINK@ | awk -F' / ' '{print $2}' | tr -d '%')
|
vol=$(pactl get-sink-volume @DEFAULT_SINK@ | awk -F' / ' '{print $2}' | tr -d '%')
|
||||||
[ $(pactl get-sink-mute @DEFAULT_SINK@ | awk -F': ' '{print $2}') = yes ] || [ "$vol" -eq 0 ] && printf "${micmute} <span foreground='#ffffff' background='#770000'> \ufc5d </span>" || printf "$micmute"
|
[ $(pactl get-sink-mute @DEFAULT_SINK@ | awk -F': ' '{print $2}') = yes ] || [ "$vol" -eq 0 ] && printf "${micmute} \ufc5d" || printf "$micmute"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
case $(cat $XDG_CACHE_HOME/yubikey.status) in
|
case $(cat $XDG_CACHE_HOME/yubikey.status) in
|
||||||
*_1) printf " <span foreground='#000000' background='#e7c547'>touch the yubikey</span>" ;;
|
*_1) printf "touch the yubikey" ;;
|
||||||
*) printf "" ;;
|
*) printf "" ;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -103,9 +103,9 @@ layouts = [
|
||||||
]
|
]
|
||||||
|
|
||||||
widget_defaults = dict(
|
widget_defaults = dict(
|
||||||
foreground='#e6e1cf',
|
|
||||||
background='#0f1419',
|
background='#0f1419',
|
||||||
font="RobotoMono Nerd Font",
|
foreground='#e6e1cf',
|
||||||
|
font="RobotoMono Nerd Font Medium",
|
||||||
fontsize=14,
|
fontsize=14,
|
||||||
)
|
)
|
||||||
extension_defaults = widget_defaults.copy()
|
extension_defaults = widget_defaults.copy()
|
||||||
|
@ -122,24 +122,33 @@ screens = [
|
||||||
urgent_alert_method='block',
|
urgent_alert_method='block',
|
||||||
urgent_border='#ff3333',
|
urgent_border='#ff3333',
|
||||||
),
|
),
|
||||||
widget.GenPollText(
|
|
||||||
update_interval=0.5,
|
|
||||||
func=lambda: subprocess.check_output("sb-yubikey").decode(),
|
|
||||||
),
|
|
||||||
widget.Prompt(
|
widget.Prompt(
|
||||||
prompt='open: ',
|
prompt='open: ',
|
||||||
record_history=False,
|
record_history=False,
|
||||||
),
|
),
|
||||||
widget.Spacer(),
|
widget.Spacer(),
|
||||||
widget.GenPollText(
|
widget.GenPollText(
|
||||||
|
background='#e8b923',
|
||||||
|
foreground='#000000',
|
||||||
|
font='RobotoMono Nerd Font Bold',
|
||||||
|
update_interval=0.5,
|
||||||
|
func=lambda: subprocess.check_output("sb-yubikey").decode(),
|
||||||
|
),
|
||||||
|
widget.GenPollText(
|
||||||
|
background='#36a3d9',
|
||||||
|
foreground='#000000',
|
||||||
update_interval=1,
|
update_interval=1,
|
||||||
func=lambda: subprocess.check_output("sb-mail").decode(),
|
func=lambda: subprocess.check_output("sb-mail").decode(),
|
||||||
),
|
),
|
||||||
widget.GenPollText(
|
widget.GenPollText(
|
||||||
|
background='#ff3333',
|
||||||
|
foreground='#000000',
|
||||||
update_interval=1,
|
update_interval=1,
|
||||||
func=lambda: subprocess.check_output("sb-network").decode(),
|
func=lambda: subprocess.check_output("sb-network").decode(),
|
||||||
),
|
),
|
||||||
widget.GenPollText(
|
widget.GenPollText(
|
||||||
|
background='#ff3333',
|
||||||
|
foreground='#000000',
|
||||||
update_interval=1,
|
update_interval=1,
|
||||||
func=lambda: subprocess.check_output("sb-volume").decode(),
|
func=lambda: subprocess.check_output("sb-volume").decode(),
|
||||||
),
|
),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue