diff --git a/.config/i3/blocks b/.config/i3/blocks index b184901..eb03024 100644 --- a/.config/i3/blocks +++ b/.config/i3/blocks @@ -27,7 +27,7 @@ command=$HOME/.scripts/wm/$BLOCK_NAME separator_block_width=20 markup=none -# separator=false +separator=false align=center [volume.sh] diff --git a/.config/i3/config b/.config/i3/config index f24fb92..566a733 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -21,11 +21,11 @@ exec --no-startup-id thunar exec --no-startup-id xss-lock -- $HOME/.scripts/wm/lock.sh & # Colors -set $bg-color #404552 -set $bg-color-inactive #2B2E39 -set $bg-color-urgent #DC7A43 -set $text-color #FFFFFF -set $text-color-inactive #676E7D +set $bgcolor #404552 +set $bgcolor-inactive #2b2e39 +set $bgcolor-urgent #dc7a43 +set $text-color #ffffff +set $textcolor-inactive #676e7d # Xresources colors set_from_resource $darkblack color0 #000000 @@ -47,22 +47,23 @@ set_from_resource $white color15 #000000 set $transparent #00000000 # Window colors -# border background text indicator -client.focused $text-color-inactive $text-color-inactive $text-color $darkgreen -client.unfocused $bg-color-inactive $bg-color-inactive $text-color-inactive $darkgreen -client.focused_inactive $bg-color-inactive $bg-color-inactive $text-color-inactive $darkgreen -client.urgent $bg-color-urgent $bg-color-urgent $text-color $darkgreen +# border background text indicator +client.focused $textcolor-inactive $textcolor-inactive $white $darkgreen +client.unfocused $bgcolor-inactive $bgcolor-inactive $darkwhite $darkgreen +client.focused_inactive $bgcolor-inactive $bgcolor-inactive $darkwhite $darkgreen +client.urgent $bgcolor-urgent $bgcolor-urgent $white $darkgreen bar { colors { - background $bg-color-inactive - separator #757575 - # border background text - focused_workspace $bg-color $bg-color $text-color - inactive_workspace $bg-color-inactive $bg-color-inactive $text-color-inactive - urgent_workspace $bg-color-urgent $bg-color-urgent $text-color + background $bgcolor-inactive + separator $darkwhite + statusline $white + # border background text + focused_workspace $bgcolor $bgcolor $white + inactive_workspace $bgcolor-inactive $bgcolor-inactive $darkwhite + urgent_workspace $bgcolor-urgent $bgcolor-urgent $white } - font pango:DejaVu Sans Mono, FontAwesome5Free Solid, FontAwesome5Brands 8 + font pango:DejaVu Sans, FontAwesome5Free Solid, FontAwesome5Brands 8 status_command i3blocks -c $HOME/.config/i3/blocks #strip_workspace_numbers yes tray_output primary diff --git a/.config/xorg/xinitrc b/.config/xorg/xinitrc index 9296998..709d141 100644 --- a/.config/xorg/xinitrc +++ b/.config/xorg/xinitrc @@ -2,6 +2,7 @@ xrdb "$XDG_CONFIG_HOME/xorg/Xresources" +# Setup display xrandr --newmode "3000x2000_48.00" 405.25 3000 3232 3552 4104 2000 2003 2013 2058 -hsync +vsync xrandr --addmode eDP-1 3000x2000_48.00 xrandr --output eDP-1 --mode 3000x2000_48.00 --primary @@ -30,4 +31,8 @@ setxkbmap -option '' # Swap capslock with escape setxkbmap -option caps:swapescape +# Export Xresources colors +COLORS="$(xrdb -query | grep '^*.color' | sort -V | awk '{print $NF}')" +$(echo "$COLORS" | awk '$0 = "export COLOR" NR - 1 "=" $0') + exec i3 diff --git a/.scripts/wm/battery.sh b/.scripts/wm/battery.sh index 0373e06..92809b3 100755 --- a/.scripts/wm/battery.sh +++ b/.scripts/wm/battery.sh @@ -12,7 +12,7 @@ else TIME="" fi -COLOR="#FFFFFF" +COLOR="$COLOR15" if [ "$(echo $BAT_INFO | awk '{ print $6 }')" = "remaining" ]; then if [ "$CAPACITY" -ge "80" ]; then ICON="" @@ -24,7 +24,7 @@ if [ "$(echo $BAT_INFO | awk '{ print $6 }')" = "remaining" ]; then ICON="" else ICON="" - COLOR="#DC7A43" + COLOR="$COLOR9" notify-send -u critical -r 1 "Battery critically low!" fi diff --git a/.scripts/wm/brightness.sh b/.scripts/wm/brightness.sh index 621ea9c..81bb66c 100755 --- a/.scripts/wm/brightness.sh +++ b/.scripts/wm/brightness.sh @@ -16,5 +16,6 @@ else ICON="" fi -echo $ICON $PERCENTAGE% - +echo "$ICON $PERCENTAGE%" +echo "$ICON $PERCENTAGE%" +echo "$COLOR15" diff --git a/.scripts/wm/iface.sh b/.scripts/wm/iface.sh index c231940..ad0bd60 100755 --- a/.scripts/wm/iface.sh +++ b/.scripts/wm/iface.sh @@ -7,7 +7,7 @@ echo "" if [ ! -d /sys/class/net/${WIRED} ] || [ "$(cat /sys/class/net/$WIRED/operstate)" = 'down' ] || [ "$(ip a | grep $WIRED | awk '/inet / {print $2}')" = "" ]; then - echo "#676E7D" + echo "$COLOR7" else - echo "#FFFFFF" + echo "$COLOR15" fi diff --git a/.scripts/wm/volume.sh b/.scripts/wm/volume.sh index b88b0fe..25da02c 100755 --- a/.scripts/wm/volume.sh +++ b/.scripts/wm/volume.sh @@ -11,11 +11,11 @@ case $BLOCK_BUTTON in esac if [ "$($MEDIACONTROL getmute)" == "0" ]; then - COLOR="#676E7D" + COLOR="$COLOR7" VOLUME="MUTE" SYMBOL="" else - COLOR="#FFF" + COLOR="$COLOR15" VOLUME="$($MEDIACONTROL getvolume)%" if [ "${VOLUME%?}" -ge "50" ]; then @@ -27,4 +27,4 @@ else fi fi -echo "$SYMBOL $VOLUME" +echo "$SYMBOL $VOLUME" diff --git a/.scripts/wm/wifi.sh b/.scripts/wm/wifi.sh index d6b6e8b..d6b2f81 100755 --- a/.scripts/wm/wifi.sh +++ b/.scripts/wm/wifi.sh @@ -2,19 +2,21 @@ WIRELESS="${BLOCK_INSTANCE:-wlan0}" +ICON="" if [ ! -d /sys/class/net/${WIRELESS}/wireless ] || [ "$(cat /sys/class/net/$WIRELESS/operstate)" = 'down' ]; then - echo "" - echo "" - echo "#676E7D" + + echo "$ICON" + echo "$ICON" + echo "$COLOR7" else SSID="$(iw dev $WIRELESS link | awk '/SSID/ { print $2 }')" QUALITY=$(grep $WIRELESS /proc/net/wireless | \ awk '{ print int($3 * 100 / 70) }') - echo " $QUALITY%" - echo " $QUALITY%" - echo "#FFFFFF" + echo "$ICON $QUALITY%" + echo "$ICON $QUALITY%" + echo "$COLOR15" fi notify() {