From c7b33a6ad7b0cb80c9ff0793f4a77fe476a10a34 Mon Sep 17 00:00:00 2001 From: Tristaan Date: Wed, 22 Aug 2018 14:00:35 +0200 Subject: [PATCH] updated polybar style, changed font in alacritty to terminess --- .config/alacritty/alacritty.yml | 6 +- .config/polybar/config | 181 +++++++++++++++++--------------- .i3/config | 4 +- .i3/scripts/polybar_launch.sh | 7 +- 4 files changed, 110 insertions(+), 88 deletions(-) diff --git a/.config/alacritty/alacritty.yml b/.config/alacritty/alacritty.yml index ebd6add..af650ad 100644 --- a/.config/alacritty/alacritty.yml +++ b/.config/alacritty/alacritty.yml @@ -56,19 +56,19 @@ draw_bold_text_with_bright_colors: true font: # The normal (roman) font face to use. normal: - family: "xos4 Terminus" # should be "Menlo" or something on macOS. + family: "xos4 Terminess Powerline" # should be "Menlo" or something on macOS. # Style can be specified to pick a specific face. style: Regular # The bold font face bold: - family: "xos4 Terminus" # should be "Menlo" or something on macOS. + family: "xos4 Terminess Powerline" # should be "Menlo" or something on macOS. # Style can be specified to pick a specific face. style: Bold # The italic font face italic: - family: "xos4 Terminus" # should be "Menlo" or something on macOS. + family: "xos4 Terminess Powerline" # should be "Menlo" or something on macOS. # Style can be specified to pick a specific face. # style: Italic diff --git a/.config/polybar/config b/.config/polybar/config index 6f20da1..5f2bef5 100644 --- a/.config/polybar/config +++ b/.config/polybar/config @@ -8,35 +8,36 @@ ;===================================================== [colors] -;background = ${xrdb:color0:#222} -background = #15325A -background-alt = #25426A -;foreground = ${xrdb:color7:#222} -foreground = #dfdfdf -foreground-alt = #55729A -alert = #bd2c40 -black = #1d1d1d -red = #d73555 -green = #35d755 -yellow = #d7d755 -blue = #3555d7 -magenta = #d755d7 -cyan = #55b7b7 -white = #e7e7e7 -bright_black = '0x303030' -bright_red = '0xc76484' -bright_green = '0x64c784' -bright_yellow = '0xc7c784' -bright_blue = '0x6484c7' -bright_magenta = '0x7355d7' -bright_cyan = '0x84c7c7' -bright_white = '0xd7d7d7' +bg = #10101000 +bg2 = #10101033 +fg = #f8f8f2 +select = #44475a +blue = ${env:COLOR_BLUE} +cyan = ${env:COLOR_CYAN} +pink = #ff79c6 +purple = #bd93f9 +green = ${env:COLOR_GREEN} +orange = #ffb86c +red = #ff5555 +yellow = #f1fa8c +;++++++++++++++++++++++ + +;background = ${xrdb:color0:#222} +background = ${colors.bg} +background-alt = ${colors.select} +background-alt2 = ${colors.bg2} +;foreground = ${xrdb:color7:#222} +foreground = ${colors.fg} +foreground-alt = ${colors.select} +primary = ${colors.purple} +secondary = ${colors.cyan} +alert = ${colors.pink} [bar/top] monitor = ${env:MONITOR} width = 100% -height = 30 +height = 28 ;offset-x = 1% ;offset-y = 1% radius = 0 @@ -45,34 +46,63 @@ fixed-center = false background = ${colors.background} foreground = ${colors.foreground} -line-size = 2 +line-size = 0 line-color = #f00 border-size = 0 -border-color = #00000000 +border-color = ${colors.background-alt} -module-padding-left = 1 -module-padding-right = 1 +spacing = 1 +padding = 1 -module-margin-left = 0 -module-margin-right = 1 +module-margin-left = 1 +module-margin-right = 0 -font-0 = "xos4 Terminus:pixelsize=16" +font-0 = "xos4 Terminess Powerline:pixelsize=16" font-1 = "Font Awesome 5 Free:style=Solid:pixelsize=16;1" -font-2 = "Font Awesome 5 Brands:style=Solid:pixelsize=16;1" +font-2 = "Font Awesome 5 Brands:style=Regular:pixelsize=16;1" -modules-left = i3 +modules-left = filesystem wired-network wireless-network volume modules-center = xwindow -modules-right = filesystem wired-network wireless-network volume battery xkeyboard cpu memory date powermenu +modules-right = battery xkeyboard date tray-position = right -tray-padding = 2 +tray-padding = 1 +tray-background = ${colors.background} +tray-transparent = true scroll-up = i3wm-wsnext scroll-down = i3wm-wsprev cursor-click = pointer cursor-scroll = ns-resize +[bar/bottom] +monitor = DP-1 +bottom = true +width = 100% +height = 30 + +background = ${colors.background} +foreground = ${colors.foreground} + +line-color = ${bar/top.background} +line-size = 4 + +font-0 = "xos4 Terminess Powerline:pixelsize=16" +font-1 = "Font Awesome 5 Free:style=Solid:pixelsize=16;1" +font-2 = "Font Awesome 5 Brands:style=Regular:pixelsize=16;1" + +spacing = 0 +padding = 1 +module-margin-left = 1 +module-margin-right = 1 + +modules-left = i3 +modules-right = cpu memory powermenu + +border-size = 3 +border-color = ${colors.background} + [module/i3] type = internal/i3 format = @@ -84,13 +114,13 @@ strip-wsnumbers = true pin-workspaces = true label-mode-padding = 1 -label-mode-foreground = ${colors.black} -label-mode-background = ${colors.cyan} +label-mode-foreground = ${colors.foreground} +label-mode-background = ${colors.background-alt2} ; focused = Active workspace on focused monitor label-focused = %name% label-focused-background = ${colors.background-alt} -label-focused-underline= ${colors.cyan} +label-focused-underline= ${colors.primary} label-focused-padding = 1 ; unfocused = Inactive workspace on any monitor @@ -105,13 +135,13 @@ label-visible-padding = ${self.label-focused-padding} ; urgent = Workspace with urgency hint set label-urgent = %index% -label-urgent-background = ${colors.red} +label-urgent-background = ${colors.alert} label-urgent-padding = 2 [module/xwindow] type = internal/xwindow label = %title:0:30:...% -format-foreground = ${colors.white} +format-foreground = ${colors.foreground-alt} [module/xkeyboard] type = internal/xkeyboard @@ -120,7 +150,6 @@ blacklist-1 = scroll lock blacklist-2 = caps lock format-prefix = " " -format-prefix-foreground = ${colors.foreground-alt} format-prefix-underline = ${colors.red} label-layout = %layout% @@ -136,8 +165,8 @@ format-unmounted = mount-0 = / mount-1 = /media -label-mounted = %{F#55b7b7}%mountpoint%%{F-}: %free% -label-unmounted = %mountpoint% +label-mounted = ${env:LABEL_MOUNTED} +label-unmounted = label-unmounted-foreground = ${colors.foreground-alt} [module/cpu] @@ -146,7 +175,6 @@ interval = 2 format = format-prefix = format-prefix-foreground = ${colors.foreground-alt} -format-underline = ${colors.yellow} ramp-coreload-0 = ▁ ramp-coreload-1 = ▂ ramp-coreload-2 = ▃ @@ -162,15 +190,14 @@ interval = 2 format = format-prefix = format-prefix-foreground = ${colors.foreground-alt} -format-underline = ${colors.green} label = %gb_used%/%gb_total% bar-used-indicator = bar-used-width = 12 -bar-used-foreground-0 = ${colors.bright_green} -bar-used-foreground-1 = ${colors.green} -bar-used-foreground-2 = ${colors.red} -bar-used-foreground-3 = ${colors.bright_red} +bar-used-foreground-0 = ${colors.green} +bar-used-foreground-1 = ${colors.foreground} +bar-used-foreground-2 = ${colors.orange} +bar-used-foreground-3 = ${colors.red} bar-used-fill = ▐ bar-used-empty = ▐ bar-used-empty-foreground = ${colors.foreground-alt} @@ -189,7 +216,7 @@ format-packetloss = label-connected = %essid% label-connected-foreground = ${colors.green} label-disconnected = %ifname% -label-disconnected-foreground = ${colors.bright_red} +label-disconnected-foreground = ${colors.alert} ramp-signal-0 = ▁ ramp-signal-1 = ▃ @@ -201,30 +228,30 @@ ramp-signal-5 = █ animation-packetloss-0 =  animation-packetloss-0-foreground = ${colors.yellow} animation-packetloss-1 =  -animation-packetloss-1-foreground = ${colors.black} +animation-packetloss-1-foreground = ${colors.foreground-alt} ; Framerate in milliseconds animation-packetloss-framerate = 500 [module/wired-network] type = internal/network -interface = enp0s20u2 -interval = 1.0 +interface = enp9s0 +interval = 2 -udspeed-minwidth = 5 +udspeed-minwidth = 2 accumulate-stats = true format-connected = format-disconnected = format-packetloss = -label-connected = %local_ip%%downspeed:1:4% +label-connected = ${env:LABEL_NETWORK_CONNECTED} label-connected-foreground = ${colors.green} label-disconnected = %ifname% -label-disconnected-foreground = ${colors.bright_red} +label-disconnected-foreground = ${colors.alert} ; Only applies if is used animation-packetloss-0 =  animation-packetloss-0-foreground = ${colors.yellow} animation-packetloss-1 =  -animation-packetloss-1-foreground = ${colors.black} +animation-packetloss-1-foreground = ${colors.foreground-alt} ; Framerate in milliseconds animation-packetloss-framerate = 500 @@ -238,6 +265,8 @@ time-format = %H:%M format-charging = format-discharging = format-full-foreground = ${colors.green} +format-charging-foreground = ${colors.yellow} +format-discharging-foreground = ${colors.cyan} label-charging = %percentage%% label-discharging = %time% label-full =  @@ -267,39 +296,27 @@ date-alt = " %d/%m/%Y" time = %H:%M time-alt = %H:%M:%S -format-prefix-foreground = ${colors.foreground-alt} +format-prefix-foreground = ${colors.foreground} format-prefix=  format-underline = ${colors.blue} label = %time%%date% [module/volume] -type = internal/alsa +type = internal/pulseaudio -format-volume = -label-volume = "VOL" -label-volume-foreground = ${root.foreground} +format-volume = : +label-muted = : MUTE +label-muted-foreground = ${colors.foreground-alt} -format-muted-prefix = " " -format-muted-foreground = ${colors.foreground-alt} -label-muted = sound muted - -bar-volume-width = 10 -bar-volume-foreground-0 = #55aa55 -bar-volume-foreground-1 = #55aa55 -bar-volume-foreground-2 = #55aa55 -bar-volume-foreground-3 = #55aa55 -bar-volume-foreground-4 = #55aa55 -bar-volume-foreground-5 = #f5a70a -bar-volume-foreground-6 = #ff5555 -bar-volume-gradient = false -bar-volume-indicator = | -bar-volume-indicator-font = 2 -bar-volume-fill = ─ -bar-volume-fill-font = 2 -bar-volume-empty = ─ -bar-volume-empty-font = 2 -bar-volume-empty-foreground = ${colors.foreground-alt} +ramp-volume-0-foreground = ${colors.cyan} +ramp-volume-1-foreground = ${colors.cyan} +ramp-volume-2-foreground = ${colors.cyan} +ramp-volume-3-foreground = ${colors.red} +ramp-volume-0 =  +ramp-volume-1 =  +ramp-volume-2 =  +ramp-volume-3 =  [module/powermenu] type = custom/menu diff --git a/.i3/config b/.i3/config index 4f71bb9..0b4854e 100644 --- a/.i3/config +++ b/.i3/config @@ -34,14 +34,14 @@ font pango: xos4 Terminus, Font Awesome 5 Free, Font Awesome 5 Brands 12 #client.background #ffffff #-----T-i3-----# -#class border backgr. text indicator +#class border backgr. text indicator client.focused #225396 #7592bA #ffffff #2e9ef4 client.focused_inactive #15325A #032048 #ffffff #484e50 client.urgent #2f343a #900000 #ffffff #900000 client.placeholder #000000 #0c0c0c #ffffff #000000 client.background #ffffff -new_window pixel 4 +new_window normal 4 new_float normal 5 hide_edge_borders smart #//APPEARANCE//# diff --git a/.i3/scripts/polybar_launch.sh b/.i3/scripts/polybar_launch.sh index 7000916..bb12b13 100755 --- a/.i3/scripts/polybar_launch.sh +++ b/.i3/scripts/polybar_launch.sh @@ -8,11 +8,16 @@ while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done if type "xrandr"; then for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do + export COLOR_CYAN="#8be9fd" + export COLOR_BLUE="#6272a4" + export COLOR_GREEN="#50fa7b" + export LABEL_MOUNTED="%{F$COLOR_CYAN}%mountpoint%%{F-}:%free%" + export LABEL_NETWORK_CONNECTED="%{F$COLOR_CYAN}%local_ip%%{F-}:%downspeed:4%" MONITOR=$m polybar --reload top & + MONITOR=$m polybar --reload bottom & done else polybar --reload top & fi - echo "Bars launched..."