From e343db3f5e34d3ebb9291aa5709e117954c25f42 Mon Sep 17 00:00:00 2001 From: Joachim Nielandt Date: Wed, 15 Jul 2020 14:26:34 +0200 Subject: [PATCH] Polybar nice and green. --- dot_dotfiles/i3/config | 98 ++++++++-------- dot_dotfiles/polybar/config.tmpl | 191 ++++++++++++++----------------- 2 files changed, 139 insertions(+), 150 deletions(-) diff --git a/dot_dotfiles/i3/config b/dot_dotfiles/i3/config index 195b22c..d8edd25 100644 --- a/dot_dotfiles/i3/config +++ b/dot_dotfiles/i3/config @@ -414,49 +414,57 @@ exec --no-startup-id systemctl --user start greenclip # smart_borders on|no_gaps smart_borders no_gaps -# Current color set -set_from_resource $color0 i3wm.color0 #000000 -set_from_resource $color1 i3wm.color1 #000000 -set_from_resource $color2 i3wm.color2 #000000 -set_from_resource $color3 i3wm.color3 #000000 -set_from_resource $color4 i3wm.color4 #000000 -set_from_resource $color5 i3wm.color5 #000000 -set_from_resource $color6 i3wm.color6 #000000 -set_from_resource $color7 i3wm.color7 #000000 -set_from_resource $color8 i3wm.color8 #000000 -set_from_resource $color9 i3wm.color9 #000000 -set_from_resource $color10 i3wm.color10 #000000 -set_from_resource $color11 i3wm.color11 #000000 -set_from_resource $color12 i3wm.color12 #000000 -set_from_resource $color13 i3wm.color13 #000000 -set_from_resource $color14 i3wm.color14 #000000 -set_from_resource $color15 i3wm.color15 #000000 -set_from_resource $color66 i3wm.color66 #000000 +# gruvbox colors +set $dark0_hard #1d2021 +set $dark0 #282828 +set $dark0_soft #32302f +set $dark1 #3c3836 +set $dark2 #504945 +set $dark3 #665c54 +set $dark4 #7c6f64 +set $gray_245 #928374 +set $gray_244 #928374 +set $light0_hard #f9f5d7 +set $light0 #fbf1c7 +set $light0_soft #f2e5bc +set $light1 #ebdbb2 +set $light2 #d5c4a1 +set $light3 #bdae93 +set $light4 #a89984 +set $bright_red #fb4934 +set $bright_green #b8bb26 +set $bright_yellow #fabd2f +set $bright_blue #83a598 +set $bright_purple #d3869b +set $bright_aqua #8ec07c +set $bright_orange #fe8019 +set $neutral_red #cc241d +set $neutral_green #98971a +set $neutral_yellow #d79921 +set $neutral_blue #458588 +set $neutral_purple #b16286 +set $neutral_aqua #689d6a +set $neutral_orange #d65d0e +set $faded_red #9d0006 +set $faded_green #79740e +set $faded_yellow #b57614 +set $faded_blue #076678 +set $faded_purple #8f3f71 +set $faded_aqua #427b58 +set $faded_orange #af3a03 +set $transparent #ffffff00 -set_from_resource $gruv_black i3wm.color0 #000000 -set_from_resource $gruv_darkgrey i3wm.color8 #000000 -set_from_resource $gruv_red i3wm.color9 #000000 -set_from_resource $gruv_darkred i3wm.color1 #000000 -set_from_resource $gruv_magenta i3wm.color13 #000000 -set_from_resource $gruv_darkmagenta i3wm.color5 #000000 -set_from_resource $gruv_cyan i3wm.color14 #000000 -set_from_resource $gruv_darkcyan i3wm.color6 #000000 -set_from_resource $gruv_yellow i3wm.color11 #000000 -set_from_resource $gruv_darkyellow i3wm.color3 #000000 -set_from_resource $gruv_lightgrey i3wm.color7 #000000 -set_from_resource $gruv_white i3wm.color15 #000000 -set_from_resource $gruv_foreground i3wm.foreground #000000 -set_from_resource $gruv_background i3wm.background #000000 -set_from_resource $gruv_green i3wm.color10 #000000 -set_from_resource $gruv_darkgreen i3wm.color2 #000000 +# Current color set +# This is how you would get a colors from xrdb +# set_from_resource $color0 i3wm.color0 #000000 # window color class [border|backgr.|text|indicator|child_border] -client.focused $gruv_green $gruv_background $gruv_foreground #FFFFFF $gruv_yellow -client.focused_inactive #333333 $gruv_background $gruv_foreground #484e50 $gruv_darkyellow -client.unfocused $gruv_background $gruv_background $ufg $indicator $gruv_lightgrey -client.urgent $bg $bg $fg $indicator $gruv_red -client.placeholder $bg $bg $fg $indicator $bg -client.background $gruv_background +client.focused $gray_245 $dark0_hard $light0_hard $bright_orange $light0_soft +client.focused_inactive $dark0_hard $dark0_hard $light0_hard $dark0_hard $dark0_hard +client.unfocused $dark0_hard $dark0_hard $light0_hard $dark0_hard #FFFFFF00 +client.urgent $dark0_hard $dark0 $light0_hard $dark0_hard $bright_orange +client.placeholder $dark0_hard $dark0_hard $light0_hard $dark0_hard $dark0_hard +client.background $dark0_hard # Start i3bar to display a workspace bar (plus the system information i3status # finds out, if available) @@ -465,14 +473,14 @@ client.background $gruv_background # status_command i3status # # colors { -# background $gruv_background +# background $dark0_hard # statusline $gruv_darkred # separator #666666 # -# focused_workspace $gruv_yellow $gruv_green $gruv_foreground -# active_workspace #333333 $gruv_darkgreen $gruv_foreground -# inactive_workspace #333333 $gruv_darkgreen $gruv_foreground -# urgent_workspace $gruv_red $gruv_darkgreen $gruv_foreground +# focused_workspace $gruv_yellow $gruv_green $light0_hard +# active_workspace #333333 $gruv_darkgreen $light0_hard +# inactive_workspace #333333 $gruv_darkgreen $light0_hard +# urgent_workspace $bright_red $gruv_darkgreen $light0_hard # binding_mode #2f343a #900000 #ffffff # } # } diff --git a/dot_dotfiles/polybar/config.tmpl b/dot_dotfiles/polybar/config.tmpl index 812ced6..89e8250 100644 --- a/dot_dotfiles/polybar/config.tmpl +++ b/dot_dotfiles/polybar/config.tmpl @@ -78,9 +78,9 @@ padding-right = 2 ;font-0 = "Wuncon Siji:pixelsize=15;1" ;font-1 = unifont:fontformat=truetype:size=8:antialias=false;0 ;font-2 = "Inconsolata\ For\ Powerline:pixelsize=10;1" -font-1 = FuraCode Nerd Font:pixelsize=11;1 +font-0 = FuraCode Nerd Font:pixelsize=11;1 ;font-1 = Siji:style=Regular:pixelsize=11 -font-0 = Siji:pixelsize=14;0 +font-1 = Siji:pixelsize=14;0 ; override pointers cursor-click = pointer cursor-scroll = pointer @@ -102,6 +102,7 @@ monitor = ${env:MONITOR:eDP-1} modules-left = i3 modules-center = temperature battery xkeyboard memory cpu filesystem updates-arch reboot-check xbacklight top-process modules-right = net wifi0 vpn powermenu + ; TRAY MANAGEMENT ;tray-position = right tray-position = ${env:TRAY_POSITION:none} @@ -114,6 +115,8 @@ tray-offset-x = 0 tray-offset-y = 27 tray-padding = 2 tray-scale = 1.0 +padding-left = 2 +padding-right = 2 scroll-up = i3wm-wsnext scroll-down = i3wm-wsprev cursor-click = pointer @@ -122,44 +125,35 @@ cursor-scroll = pointer [bar/secondary] -inherit = bar/general -monitor = ${env:MONITOR:eDP-1} +inherit = bar/general +monitor = ${env:MONITOR:eDP-1} ;offset-x = 2% ;offset-y = 1% ;unused modules - mpd xbacklight backlight-acpi alsa -modules-right = pulseaudio +modules-right = pulseaudio modules-center = player-mpris-tail -modules-left = host-icon date info-hackspeed - - -[module/host-icon] -type = custom/script -exec = echo 0 -;tail = false -label-foreground = ${colors.bright_orange} -{{- if eq .chezmoi.hostname "carbonraptor" }} -label = "" -{{ else }} -label = "?" -{{- end }} +modules-left = date info-hackspeed +padding-left = 3 +padding-right = 2 [module/player-mpris-tail] type = custom/script exec = ~/.config/polybar/polybar-scripts/polybar-scripts/player-mpris-tail/player-mpris-tail.py -f '{icon} {artist} - {title}' --icon-playing  --icon-paused  --icon-stopped  --icon-none ﱙ tail = true label = %output% +label-foreground = ${colors.light0_hard} [module/info-hackspeed] type = custom/script format-prefix = " " -format-prefix-foreground = ${colors.bright_blue} +format-prefix-foreground = ${colors.bright_green} exec = ~/.config/polybar/polybar-scripts/polybar-scripts/info-hackspeed/info-hackspeed.sh tail = true [module/top-process] type = custom/script format-prefix = " " -format-prefix-foreground = ${colors.bright_blue} +format-prefix-foreground = ${colors.bright_green} ;format-underline = ${colors.bright_red} interval = 5 exec = ~/.dotfiles/scripts/top.process.sh @@ -173,7 +167,7 @@ label = %title:0:30:...% type = internal/xkeyboard blacklist-0 = num lock format-prefix = " " -format-prefix-foreground = ${colors.bright_blue} +format-prefix-foreground = ${colors.bright_green} ;format-prefix-underline = ${colors.underline-keyboard} ; layout, number, name label-layout = %layout% @@ -198,9 +192,12 @@ type = internal/fs interval = 25 mount-0 = / mount-1 = /mnt/ext4 -label-mounted = %{F#0a81f5}%mountpoint%%{F-} %percentage_used%% +;label-mounted = %{F#0a81f5}%mountpoint%%{F-} %percentage_used%% +;#b8bb26 +label-mounted = %{F#b8bb26}%mountpoint%%{F-} %percentage_used%% +label-mounted-foreground = ${colors.bright_green} label-unmounted = %mountpoint% not mounted -label-unmounted-foreground = ${colors.bright_green} +label-unmounted-foreground = ${colors.faded_green} [module/bspwm] type = internal/bspwm @@ -239,69 +236,54 @@ pin-workspaces = true ; Default: false strip-wsnumbers = true -; using siji icons... see view.sh for codes -; not using siji anymore, check out nerdfonts.com! -;   -ws-icon-0 = 1:1; -ws-icon-1 = 2:2; -ws-icon-2 = 3:3; -ws-icon-3 = 4:4; -ws-icon-4 = 5:5; -ws-icon-5 = 6:6; -ws-icon-6 = 7:7; -ws-icon-7 = 8:8; -ws-icon-8 = 9:9;﬐ -ws-icon-9 = 10:10; -ws-icon-10 = 11:; -ws-icon-11 = 12:; -ws-icon-default =  +;ws-icon-0 = 1:1; +;ws-icon-1 = 2:2; +;ws-icon-2 = 3:3; +;ws-icon-3 = 4:4; +;ws-icon-4 = 5:5; +;ws-icon-5 = 6:6; +;ws-icon-6 = 7:7; +;ws-icon-7 = 8:8; +;ws-icon-8 = 9:9;﬐ +;ws-icon-9 = 10:10; +;ws-icon-10 = 11:; +;ws-icon-11 = 12:; +ws-icon-default = ﱤ -; Whenever the 'move' changes... like 'resize', ... -label-mode-padding = 2 +; mode menu styling +label-mode-padding = 1 label-mode-foreground = ${colors.light0_hard} -;label-mode-background = ${colors.primary} -label-mode-background = ${colors.bright_yellow} +label-mode-background = ${colors.dark0_hard} ;label-mode-underline = ${colors.light2} -; focused = Active workspace on focused monitor -label-focused = %icon% %name% +; can use: %icon% %name% %index +label-focused = %name% +label-unfocused = ·%name% +label-visible = ·%name% +label-urgent = ·%name% + +label-focused-foreground = ${colors.light0_hard} +label-unfocused-foreground = ${colors.light0_hard} +label-visible-foreground = ${colors.light0_hard} +label-urgent-foreground = ${colors.bright_orange} + +label-focused-padding = 1 +label-unfocused-padding = 1 +label-visible-padding = 1 +label-urgent-padding = 1 + +;label-focused = %icon% %name% ;label-focused = %index% ;label-focused-background = ${module/bspwm.label-focused-background} ;label-focused-underline = ${module/bspwm.label-focused-underline} ;label-focused-padding = ${module/bspwm.label-focused-padding} -label-focused-background = ${colors.light1} -label-focused-foreground = ${colors.dark0_hard} +;label-focused-background = ${colors.light1} ;label-focused-underline = ${colors.underline-i3-focused} -label-focused-padding = 2 ; unfocused = Inactive workspace on any monitor ;label-unfocused = %index% -label-unfocused = %icon% %name% ;label-unfocused-underline = ${colors.underline-i3-unfocused} ;label-unfocused-padding = ${module/bspwm.label-occupied-padding} -label-unfocused-padding = 2 - -; visible = Active workspace on unfocused monitor -; label-visible = %index% -label-visible = %icon% %name% -;label-visible-background = ${self.label-focused-background} -;label-visible-underline = ${self.label-focused-underline} -;label-visible-padding = ${self.label-focused-padding} -label-visible-background = ${colors.light2} -label-visible-foreground = ${colors.dark0_hard} -;label-visible-underline = #FFFFFF -label-visible-padding = 2 - -; urgent = Workspace with urgency hint set -label-urgent = %icon% %name% -; label-urgent-background = ${module/bspwm.label-urgent-background} -label-urgent-background = ${colors.light0} -label-urgent-foreground = ${colors.bright_orange} -;label-urgent-underline = ${colors.bright_orange} -label-urgent-padding = 2 - -; Separator in between workspaces -; label-separator = | [module/mpd] @@ -350,7 +332,7 @@ interval = 2 ;format-prefix = " " ;format =