xresources was bloat anyway

This commit is contained in:
Luke Smith 2019-02-20 15:28:15 -05:00
parent d587e8cd57
commit de96754e75
2 changed files with 6 additions and 44 deletions

View file

@ -61,43 +61,8 @@ exec_always --no-startup-id mpdupdate
# Podboat automatic queue and download # Podboat automatic queue and download
exec_always --no-startup-id podentr exec_always --no-startup-id podentr
# Set Xresources colors:
set_from_resource $darkblack color0 #000000
set_from_resource $black color8 #000000
set_from_resource $darkred color1 #000000
set_from_resource $red color9 #000000
set_from_resource $darkgreen color2 #000000
set_from_resource $green color10 #000000
set_from_resource $darkyellow color3 #000000
set_from_resource $yellow color11 #000000
set_from_resource $darkblue color4 #000000
set_from_resource $blue color12 #000000
set_from_resource $darkmagenta color5 #000000
set_from_resource $magenta color13 #000000
set_from_resource $darkcyan color6 #000000
set_from_resource $cyan color14 #000000
set_from_resource $darkwhite color7 #000000
set_from_resource $white color15 #000000
set $transparent #00000000
# BORDER BACKGROUND TEXT INDICATOR CHILD_BORDER
client.focused $red $red $magenta $darkmagenta $darkblue
client.unfocused $transparent $blue $white $darkblue $darkblack
client.focused_inactive $transparent $blue $white $darkblue $darkblack
client.urgent $darkred $darkred $black $darkred $darkred
client.background $black
bar { bar {
font pango:mono 10 font pango:mono 10
colors {
background $darkblack
statusline $darkwhite
separator $cyan
focused_workspace $blue $darkblue $darkblack
active_workspace $blue $blue $darkwhite
inactive_workspace $darkblack $darkblack $white
urgent_workspace $darkblack $darkblack $white
}
status_command i3blocks status_command i3blocks
position top position top
mode dock mode dock
@ -344,7 +309,7 @@ bindsym XF86PowerOff exec --no-startup-id prompt "Shutdown computer?" "$shutdow
##bindsym XF86Paste exec ##bindsym XF86Paste exec
##bindsym XF86Cut exec ##bindsym XF86Cut exec
##bindsym XF86MenuKB exec ##bindsym XF86MenuKB exec
bindsym XF86Calculator exec $term -e R -q --no-save bindsym XF86Calculator exec --no-startup-id ddspawn dropdowncalc -f mono:pixelsize=24
##bindsym XF86Sleep This binding is typically mapped by systemd automatically. ##bindsym XF86Sleep This binding is typically mapped by systemd automatically.
##bindsym XF86WakeUp exec ##bindsym XF86WakeUp exec
bindsym XF86Explorer exec $term -e $FILE bindsym XF86Explorer exec $term -e $FILE

View file

@ -1,9 +1,6 @@
#!/bin/sh #!/bin/sh
# Give a battery name (e.g. BAT0) as an argument. # Give a battery name (e.g. BAT0) as an argument.
# get xresources colors
for x in "$(xrdb -query | grep color | sed "s/.*\./export /g;s/:\s*/=\"/g;s/$/\"/g")"; do eval "$x"; done
case $BLOCK_BUTTON in case $BLOCK_BUTTON in
3) pgrep -x dunst >/dev/null && notify-send "<b>🔋 Battery module:</b> 3) pgrep -x dunst >/dev/null && notify-send "<b>🔋 Battery module:</b>
🔋: discharging 🔋: discharging
@ -19,18 +16,18 @@ capacity=$(cat /sys/class/power_supply/"$1"/capacity) || exit
status=$(cat /sys/class/power_supply/"$1"/status) status=$(cat /sys/class/power_supply/"$1"/status)
if [ "$capacity" -ge 75 ]; then if [ "$capacity" -ge 75 ]; then
color="$color10" color="#00ff00"
elif [ "$capacity" -ge 50 ]; then elif [ "$capacity" -ge 50 ]; then
color="$color15" color="#ffffff"
elif [ "$capacity" -ge 25 ]; then elif [ "$capacity" -ge 25 ]; then
color="$color11" color="#ffff00"
else else
color="$color9" color="#ff0000"
warn="❗" warn="❗"
fi fi
[ -z $warn ] && warn=" " [ -z $warn ] && warn=" "
[ "$status" = "Charging" ] && color="$color15" [ "$status" = "Charging" ] && color="#ffffff"
printf "<span color='%s'>%s%s%s</span>" "$color" "$(echo "$status" | sed -e "s/,//;s/Discharging/🔋/;s/Not Charging/🛑/;s/Charging/🔌/;s/Unknown/♻️/;s/Full/⚡/;s/ 0*/ /g;s/ :/ /g")" "$warn" "$(echo "$capacity" | sed -e 's/$/%/')" printf "<span color='%s'>%s%s%s</span>" "$color" "$(echo "$status" | sed -e "s/,//;s/Discharging/🔋/;s/Not Charging/🛑/;s/Charging/🔌/;s/Unknown/♻️/;s/Full/⚡/;s/ 0*/ /g;s/ :/ /g")" "$warn" "$(echo "$capacity" | sed -e 's/$/%/')"