Change font and theme for polybar. Add notification module

This commit is contained in:
Thomas Dehaeze 2019-04-10 16:58:12 +02:00
parent a4da282758
commit 8558700a86

View File

@ -80,8 +80,8 @@
font-2 = Weather Icons:size=10;1
modules-left = i3
modules-center = xwindow
modules-right = unread_mail cpu battery temperature date
modules-center = mpd pulseaudio
modules-right = dunst unread_mail cpu battery temperature date
tray-position = right
tray-padding = 2
@ -117,14 +117,14 @@
module-margin-left = 1
module-margin-right = 1
font-0 = SauceCodePro Nerd Font:style=Medium,Regular:pixelsize=10;1
font-0 = Hack Nerd Font:style=Medium,Regular:pixelsize=10;1
font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
font-2 = Weather Icons:size=10;1
# font-3 = siji:pixelsize=10;1
modules-left = mpd pulseaudio
# modules-center = xwindow
modules-right = filesystem xkeyboard nordvpn chromecast screenshot weather emacs caffeine redshift
modules-right = filesystem nordvpn chromecast screenshot weather emacs caffeine redshift
# tray-position = right
# tray-padding = 2
@ -183,110 +183,96 @@
wrapping-scroll = false
#+END_SRC
** TODO - Choose some nice icons
#+BEGIN_SRC conf
ws-icon-default = 
ws-icon-0 = 1;
ws-icon-1 = 2;
ws-icon-2 = 3;
ws-icon-3 = 4;
ws-icon-4 = 5;
#+END_SRC
#+BEGIN_SRC conf
format = <label-state> <label-mode>
index-sort = true
#+END_SRC
** Colors
#+BEGIN_SRC conf
label-mode-foreground = ${colors.foreground}
label-mode-background = ${colors.turquoise}
label-mode-padding = 1
label-mode-foreground = ${colors.background}
label-mode-background = ${colors.foreground}
label-mode-padding = 1
# focused = Active workspace on focused monitor
label-focused = %icon% %index%
label-focused-foreground = ${colors.foreground}
label-focused-background = ${colors.background}
label-focused-underline = ${colors.turquoise}
label-focused-padding = 1
# focused = Active workspace on focused monitor
label-focused = %icon% %index%
label-focused-foreground = ${colors.foreground}
label-focused-background = ${colors.background}
label-focused-underline = ${colors.turquoise}
label-focused-padding = 1
# unfocused = Inactive workspace on any monitor
label-unfocused = %icon% %index%
label-unfocused-foreground = ${colors.foreground}
label-unfocused-background = ${colors.background}
label-unfocused-underline = ${colors.background}
label-unfocused-padding = 1
# unfocused = Inactive workspace on any monitor
label-unfocused = %icon% %index%
label-unfocused-foreground = ${colors.foreground}
label-unfocused-background = ${colors.background}
label-unfocused-underline = ${colors.background}
label-unfocused-padding = 1
# visible = Active workspace on unfocused monitor
label-visible = %icon% %index%
label-visible-background = ${colors.background}
label-visible-underline = ${colors.turquoise}
label-visible-padding = 1
# visible = Active workspace on unfocused monitor
label-visible = %icon% %index%
label-visible-background = ${colors.background}
label-visible-underline = ${colors.turquoise}
label-visible-padding = 1
# urgent = Workspace with urgency hint set
label-urgent = %icon% %index%
label-urgent-background = ${colors.red}
label-urgent-padding = 1
# Separator in between workspaces
#label-separator = |
# urgent = Workspace with urgency hint set
label-urgent = %icon% %index%
label-urgent-background = ${colors.red}
label-urgent-padding = 1
#+END_SRC
* Music using MPD
#+BEGIN_SRC conf
[module/mpd]
type = internal/mpd
format-online = <icon-prev> <toggle> <icon-next> %{A1:termite -e "ncmpcpp" &:}<label-song>%{A}
[module/mpd]
type = internal/mpd
format-online = <icon-prev> <toggle> <icon-next> %{A1:termite -e "ncmpcpp" &:}<label-song>%{A}
format-online-spacing = 0
format-online-padding = 0
format-online-spacing = 0
format-online-padding = 0
label-offline = mpd is offline
format-offline = <label-offline>
format-offline-foreground = #777
label-offline = mpd is offline
format-offline = <label-offline>
format-offline-foreground = #777
label-song = %artist% - %title%
label-song-maxlen = 30
label-song-ellipsis = true
label-song = %artist% - %title%
label-song-maxlen = 30
label-song-ellipsis = true
icon-prev = 寧
icon-stop = 栗
icon-play = 契
icon-pause = 
icon-next = 嶺
icon-random = 咽
icon-repeat = 凌
icon-prev = 寧
icon-stop = 栗
icon-play = 契
icon-pause = 
icon-next = 嶺
icon-random = 咽
icon-repeat = 凌
# Used to display the state of random/repeat/repeatone/single
# Only applies if <icon-[random|repeat|repeatone|single]> is used
toggle-on-foreground = ${colors.foreground-light}
toggle-off-foreground = ${colors.comments}
# Used to display the state of random/repeat/repeatone/single
# Only applies if <icon-[random|repeat|repeatone|single]> is used
toggle-on-foreground = ${colors.foreground-light}
toggle-off-foreground = ${colors.comments}
bar-progress-width = 15
bar-progress-indicator = |
bar-progress-fill = ─
bar-progress-empty = ─
bar-progress-width = 15
bar-progress-indicator = |
bar-progress-fill = ─
bar-progress-empty = ─
#+END_SRC
* Backlight level
#+BEGIN_SRC conf
[module/xbacklight]
type = internal/xbacklight
[module/xbacklight]
type = internal/xbacklight
format = <ramp>
ramp-0 = 
ramp-1 = 
ramp-2 = 
ramp-3 = 
ramp-4 = 
ramp-5 = 
ramp-6 = 
ramp-7 = 
ramp-8 = 
ramp-9 = 
ramp-10 = 
ramp-11 = 
format = <ramp>
ramp-0 = 
ramp-1 = 
ramp-2 = 
ramp-3 = 
ramp-4 = 
ramp-5 = 
ramp-6 = 
ramp-7 = 
ramp-8 = 
ramp-9 = 
ramp-10 = 
ramp-11 = 
#+END_SRC
* CPU Usage
@ -437,28 +423,17 @@ ramp-11 = 
ramp-foreground = ${colors.foreground}
#+END_SRC
* Settings
#+BEGIN_SRC conf
[settings]
screenchange-reload = true
#compositing-background = xor
#compositing-background = screen
#compositing-foreground = source
#compositing-border = over
#+END_SRC
* Unread Mails
#+BEGIN_SRC conf
[module/unread_mail]
type = custom/script
[module/unread_mail]
type = custom/script
label-font = 2
format-underline = ${colors.background}
click-left = termite -e "tmuxinator start neomutt" &
format = <label>
exec = ~/.config/polybar/scripts/unread_mails.sh
interval = 1
label-font = 2
format-underline = ${colors.background}
click-left = termite -e "tmuxinator start neomutt" &
format = <label>
exec = ~/.config/polybar/scripts/unread_mails.sh
interval = 1
#+END_SRC
** Unread Mail Scripts
@ -479,15 +454,15 @@ interval = 1
* Redshift
#+BEGIN_SRC conf
[module/redshift]
type = custom/script
[module/redshift]
type = custom/script
label-font = 2
format-underline = ${colors.background}
click-left = ~/.config/polybar/scripts/redshift.sh toggle
format = <label>
exec = ~/.config/polybar/scripts/redshift.sh
interval = 1
label-font = 2
format-underline = ${colors.background}
click-left = ~/.config/polybar/scripts/redshift.sh toggle
format = <label>
exec = ~/.config/polybar/scripts/redshift.sh
interval = 1
#+END_SRC
** Redshift Scripts
@ -513,7 +488,6 @@ interval = 1
#+end_src
* Emacs
#+begin_src conf
[module/emacs]
type = custom/script
@ -555,14 +529,14 @@ interval = 1
* NordVPN
#+BEGIN_SRC conf
[module/nordvpn]
type = custom/script
[module/nordvpn]
type = custom/script
format-underline = ${colors.background}
click-left = ~/.config/polybar/scripts/nordvpn-toggle.sh
format = <label>
exec = ~/.config/polybar/scripts/nordvpn.sh
interval = 5
format-underline = ${colors.background}
click-left = ~/.config/polybar/scripts/nordvpn-toggle.sh
format = <label>
exec = ~/.config/polybar/scripts/nordvpn.sh
interval = 5
#+END_SRC
** Nordvpn Toggle script
@ -600,16 +574,25 @@ interval = 5
* TODO Caffeine
#+BEGIN_SRC conf
[module/caffeine]
type = custom/script
[module/caffeine]
type = custom/script
label-font = 2
format-underline = ${colors.background}
click-left = xautolock -disable && notify-send "Lock Disabled"
click-right = xautolock -enable && notify-send "Lock Enabled"
format = <label>
exec = echo -e "\uf0f4"
interval = 1
label-font = 2
format-underline = ${colors.background}
click-left = xautolock -disable && notify-send "Lock Disabled"
click-right = xautolock -enable && notify-send "Lock Enabled"
format = <label>
exec = echo -e "\uf0f4"
interval = 1
#+END_SRC
* Dunst
#+BEGIN_SRC conf
[module/dunst]
type = custom/text
content = ""
click-left = notify-send "Notifications Disabled" && sleep 2 && notify-send "DUNST_COMMAND_PAUSE"
click-right = notify-send "DUNST_COMMAND_RESUME" && notify-send "Notifications Resumed"
#+END_SRC
* Weather
@ -846,42 +829,42 @@ click-left = ~/.config/polybar/scripts/weatheropen.sh
* Logout
#+BEGIN_SRC conf
[module/logout]
type = custom/text
content = ""
click-left = i3exit switch_user
[module/logout]
type = custom/text
content = ""
click-left = i3exit switch_user
#+END_SRC
* Hibernate
#+BEGIN_SRC conf
[module/hibernate]
type = custom/text
content = ""
click-left = i3exit hibernate
[module/hibernate]
type = custom/text
content = ""
click-left = i3exit hibernate
#+END_SRC
* Shutdown
#+BEGIN_SRC conf
[module/shutdown]
type = custom/text
content = ""
click-left = i3exit shutdown
[module/shutdown]
type = custom/text
content = ""
click-left = i3exit shutdown
#+END_SRC
* Reboot
#+BEGIN_SRC conf
[module/reboot]
type = custom/text
content = ""
click-left = i3exit logout
[module/reboot]
type = custom/text
content = ""
click-left = i3exit logout
#+END_SRC
* Lock
#+BEGIN_SRC conf
[module/lock]
type = custom/text
content = ""
click-left = blurlock
[module/lock]
type = custom/text
content = ""
click-left = blurlock
#+END_SRC
* TODO [#B] Screenshot
@ -895,14 +878,6 @@ click-left = blurlock
click-right = scrot -s -e 'feh $f -x'
#+END_SRC
* ChromeCast Play/Pause
#+BEGIN_SRC conf
[module/chromecast]
type = custom/script
content = "懶"
click-left = catt play
click-right = catt pause
#+END_SRC
* Scripts
** Launch
:PROPERTIES:
@ -920,7 +895,7 @@ click-left = blurlock
# Launch Polybar, using default config location ~/.config/polybar/config
polybar top &
polybar bottom &
# polybar bottom &
echo "Polybar launched..."
#+end_src