Export Xresources colors, use these in i3blocks

This commit is contained in:
Riyyi
2018-10-26 14:16:52 +02:00
parent b27e45e4f0
commit 9269c10c04
8 changed files with 42 additions and 33 deletions
+1 -1
View File
@@ -27,7 +27,7 @@
command=$HOME/.scripts/wm/$BLOCK_NAME
separator_block_width=20
markup=none
# separator=false
separator=false
align=center
[volume.sh]
+18 -17
View File
@@ -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
+5
View File
@@ -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