From 48af9e4d7c467de773e60065b76ee965415368e2 Mon Sep 17 00:00:00 2001 From: Riyyi Date: Tue, 31 Dec 2019 15:46:19 +0100 Subject: [PATCH] Split polybar config into multiple files --- .config/polybar/colors | 30 ++++++ .config/polybar/config | 204 +--------------------------------------- .config/polybar/modules | 175 ++++++++++++++++++++++++++++++++++ 3 files changed, 209 insertions(+), 200 deletions(-) create mode 100644 .config/polybar/colors create mode 100644 .config/polybar/modules diff --git a/.config/polybar/colors b/.config/polybar/colors new file mode 100644 index 0000000..ca861e7 --- /dev/null +++ b/.config/polybar/colors @@ -0,0 +1,30 @@ +; Xresources colors +[colors] +foreground = ${xrdb:foreground:#c5c8c6} +background = ${xrdb:background:#1c1c1c} +cursorColor = ${self.foreground} + +black = ${xrdb:color0:#282a2e} +black-bright = ${xrdb:color8:#373b41} +red = ${xrdb:color1:#a54242} +red-bright = ${xrdb:color9:#cc6666} +green = ${xrdb:color2:#8c9440} +green-bright = ${xrdb:color10:#b5bd68} +yellow = ${xrdb:color3:#de935f} +yellow-bright = ${xrdb:color11:#f0c674} +blue = ${xrdb:color4:#5f819d} +blue-bright = ${xrdb:color12:#81a2be} +magenta = ${xrdb:color5:#85678f} +magenta-bright = ${xrdb:color13:#b294bb} +cyan = ${xrdb:color6:#5e8d87} +cyan-bright = ${xrdb:color14:#8abeb7} +white = ${xrdb:color7:#707880} +white-bright = ${xrdb:color15:#c5c8c6} + +; Window manager colors +[wmcolors] +bgcolor = ${xrdb:WmColor.bgcolor:#404552} +bgcolor-inactive = ${xrdb:WmColor.bgcolor_Inactive:#2b2e39} +bgcolor-urgent = ${xrdb:WmColor.bgcolor_Urgent:#dc7a43} +fgcolor = ${xrdb:WmColor.fgcolor:#ffffff} +fgcolor-inactive = ${xrdb:WmColor.fgcolor_Inactive:#676e7d} diff --git a/.config/polybar/config b/.config/polybar/config index 87b0665..a981a2c 100644 --- a/.config/polybar/config +++ b/.config/polybar/config @@ -1,3 +1,6 @@ +include-file = $HOME/.config/polybar/colors +include-file = $HOME/.config/polybar/modules + ; https://github.com/polybar/polybar/wiki/Configuration#global-wm-settings [global/wm] margin-top = 0 @@ -16,37 +19,6 @@ screenchange-reload = true pseudo-transparency = false -; Xresources colors -[colors] -foreground = ${xrdb:foreground:#c5c8c6} -background = ${xrdb:background:#1c1c1c} -cursorColor = ${self.foreground} - -black = ${xrdb:color0:#282a2e} -black-bright = ${xrdb:color8:#373b41} -red = ${xrdb:color1:#a54242} -red-bright = ${xrdb:color9:#cc6666} -green = ${xrdb:color2:#8c9440} -green-bright = ${xrdb:color10:#b5bd68} -yellow = ${xrdb:color3:#de935f} -yellow-bright = ${xrdb:color11:#f0c674} -blue = ${xrdb:color4:#5f819d} -blue-bright = ${xrdb:color12:#81a2be} -magenta = ${xrdb:color5:#85678f} -magenta-bright = ${xrdb:color13:#b294bb} -cyan = ${xrdb:color6:#5e8d87} -cyan-bright = ${xrdb:color14:#8abeb7} -white = ${xrdb:color7:#707880} -white-bright = ${xrdb:color15:#c5c8c6} - -; Window manager colors -[wmcolors] -bgcolor = ${xrdb:WmColor.bgcolor:#404552} -bgcolor-inactive = ${xrdb:WmColor.bgcolor_Inactive:#2b2e39} -bgcolor-urgent = ${xrdb:WmColor.bgcolor_Urgent:#dc7a43} -fgcolor = ${xrdb:WmColor.fgcolor:#ffffff} -fgcolor-inactive = ${xrdb:WmColor.fgcolor_Inactive:#676e7d} - [bar/polybar] monitor = ${env:MONITOR:eDP-1} @@ -72,7 +44,7 @@ padding-right = 2 module-margin-left = 1 module-margin-right = 2 -;https://github.com/polybar/polybar/wiki/Fonts +; https://github.com/polybar/polybar/wiki/Fonts font-0 = "DejaVu Sans:pixelsize=18;3" font-1 = "Source Han Sans JP Medium:pixelsize=18;3" font-2 = "Font Awesome 5 Free:style=Regular:pixelsize=16;3" @@ -96,171 +68,3 @@ scroll-down = bspwm-deskprev cursor-click = pointer ; cursor-scroll = ns-resize - -[module/bspwm] -type = internal/bspwm - -label-focused = %name% -label-focused-foreground = ${colors.white-bright} -label-focused-background = ${wmcolors.bgcolor} -label-focused-underline= ${colors.blue} -label-focused-padding = 2 - -label-occupied = %name% -label-occupied-padding = 2 - -label-urgent = %name%! -label-urgent-background = ${wmcolors.bgcolor-urgent} -label-urgent-padding = 2 - -label-empty = %name% -label-empty-foreground = ${wmcolors.bgcolor} -label-empty-padding = 2 - -; https://github.com/polybar/polybar/wiki/Module:-xwindow -[module/title] -type = internal/xwindow -label = %title:0:50:...% -label-foreground = ${colors.white-bright} - -; https://github.com/polybar/polybar/wiki/Module:-pulseaudio -[module/pulseaudio] -type = internal/pulseaudio -interval = 5 - -sink = alsa_output.pci-0000_00_1f.3.analog-stereo -use-ui-max = false - -format-volume = %{A1:pavucontrol:}%{A2:$HOME/.scripts/mediacontrol.sh set 0:}%{A3:$HOME/.scripts/mediacontrol.sh toggle:} %{A}%{A}%{A} -format-volume-foreground = ${colors.white-bright} - -ramp-volume-0 =  -ramp-volume-1 =  -ramp-volume-2 =  -ramp-volume-3 =  - -label-volume = %percentage%% - -format-muted = %{A1:pavucontrol:}%{A2:$HOME/.scripts/mediacontrol.sh set 0:}%{A3:$HOME/.scripts/mediacontrol.sh toggle:}%{A}%{A}%{A} -format-muted-foreground = ${wmcolors.fgcolor-inactive} - -label-muted =  %percentage%% - -[module/backlight-acpi] -type = internal/backlight -card = intel_backlight - -format = %{A3:$HOME/.scripts/brightnesscontrol.sh s 30:}%{A4:$HOME/.scripts/brightnesscontrol.sh u 10:}%{A5:$HOME/.scripts/brightnesscontrol.sh d 10:}