From de96754e754520d0e0b404f69dd74680a82ea76d Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Wed, 20 Feb 2019 15:28:15 -0500 Subject: [PATCH] xresources was bloat anyway --- .config/i3/config | 37 +------------------------------------ .scripts/statusbar/battery | 13 +++++-------- 2 files changed, 6 insertions(+), 44 deletions(-) diff --git a/.config/i3/config b/.config/i3/config index 601956d..46effce 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -61,43 +61,8 @@ exec_always --no-startup-id mpdupdate # Podboat automatic queue and download 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 { 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 position top mode dock @@ -344,7 +309,7 @@ bindsym XF86PowerOff exec --no-startup-id prompt "Shutdown computer?" "$shutdow ##bindsym XF86Paste exec ##bindsym XF86Cut 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 XF86WakeUp exec bindsym XF86Explorer exec $term -e $FILE diff --git a/.scripts/statusbar/battery b/.scripts/statusbar/battery index 02839b1..e5f6ec7 100755 --- a/.scripts/statusbar/battery +++ b/.scripts/statusbar/battery @@ -1,9 +1,6 @@ #!/bin/sh # 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 3) pgrep -x dunst >/dev/null && notify-send "🔋 Battery module: 🔋: discharging @@ -19,18 +16,18 @@ capacity=$(cat /sys/class/power_supply/"$1"/capacity) || exit status=$(cat /sys/class/power_supply/"$1"/status) if [ "$capacity" -ge 75 ]; then - color="$color10" + color="#00ff00" elif [ "$capacity" -ge 50 ]; then - color="$color15" + color="#ffffff" elif [ "$capacity" -ge 25 ]; then - color="$color11" + color="#ffff00" else - color="$color9" + color="#ff0000" warn="❗" fi [ -z $warn ] && warn=" " -[ "$status" = "Charging" ] && color="$color15" +[ "$status" = "Charging" ] && color="#ffffff" printf "%s%s%s" "$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/$/%/')"