diff options
Diffstat (limited to 'config/polybar')
-rwxr-xr-x | config/polybar/config.ini | 168 | ||||
-rwxr-xr-x | config/polybar/launch.sh | 14 |
2 files changed, 182 insertions, 0 deletions
diff --git a/config/polybar/config.ini b/config/polybar/config.ini new file mode 100755 index 0000000..14c4852 --- /dev/null +++ b/config/polybar/config.ini @@ -0,0 +1,168 @@ +# Compatiable with environmental color variables, fallback theme is set to be gruvbox + +[colors] +background_inactive = ${env:XDG_COLOR_INACTIVE_FOREGROUND:#a89984} +background = ${env:XDG_COLOR_BACKGROUND:#282828} +foreground = ${env:XDG_COLOR_FOREGROUND:#ebdbb2} +warning = ${env:XDG_COLOR_WARNING:#cc241d} +non_warning = ${env:XDG_COLOR_NON_WARNING:#458588} +interactive = ${env:XDG_COLOR_INTERACTIVE:#98971a} + +[bar/example] +width = 100% +height = 19 +; Change if using another window manager +wm-restack = bspwm + +; Align modules fixed to middle +fixed-center = true + +; Colors +background = ${colors.background} +foreground = ${colors.foreground} + +; Underline +line-size = 2 +line-color = ${colors.foreground} + +; Border +border-size = 1 +border-color = ${colors.background} + +; Padding +padding-left = 4 +padding-right = 4 + +; Margin of modules +module-margin-left = 2 +module-margin-right = 2 + +; Font +font-0 = "Roboto:size=11;3" + +; Modlues +; add "date" for clock +; beggining of modules-left is recommended for date module +modules-left = pulseaudio backlight +modules-center = bspwm +modules-right = battery cpu memory + +; Cursor actions +cursor-click = pointer +cursor-scroll = ns-resize +font-2 = "Noto Sans:size=11;1" + +[module/xworkspaces] +type = internal/xworkspaces +label = %title:0:60:...% +label-active-padding = 2 +label-urgent-padding = 2 +label-empty-padding = 2 +label-occupied-padding=2 + +label-urgent-foreground = ${colors.background_inactive} +label-occupied-foreground = ${colors.background_inactive} +label-active-font = 1 + +[module/bspwm] +type = internal/bspwm + +pin-workspaces = true +label-focused = %index% +label-focused-padding = 2 + +label-occupied = %index% +label-occupied-foreground = ${colors.background_inactive} +label-occupied-padding = 2 + +label-urgent = %index% +label-urgent-foreground = ${colors.warning} +label-urgent-padding = 2 + +label-empty = + +[module/battery] +type=internal/battery +full-at=99 +low-at=15 +battery=BAT0 +adapter=ADP1 +poll-interval=5 +format-discharging=Battery: <label-discharging> +label-discharging=%percentage%% +format-charging=Charging: <label-charging> +label-charging=%percentage%% +format-discharging-foreground=${colors.background_inactive} +label-discharging-foreground=${colors.foreground} + +[module/backlight] +type = internal/backlight +card = intel_backlight +use-actual-brightness = true +enable-scroll = true +format = Brightness: <label> +label=%percentage%% +format-foreground=${colors.background_inactive} +label-foreground=${colors.foreground} + +[module/date] +type = internal/date +interval = 1.0 +date=%Y-%m-%d% +time=%H:%M +date-alt = %A, %d %B %Y +time-alt = %H:%M:%S +format=<label> +label=%time% +format-foreground=${colors.non_warning} + +[module/cpu] +type = internal/cpu +interval = 0.5 +warn-percentage = 95 +format= cpu: <label> +label=%percentage%% + +format-foreground=${colors.background_inactive} +label-foreground=${colors.foreground} + +[module/memory] +type = internal/memory +interval = 3 +warn-percentage = 95 +format=ram: <label> +label=%gb_used% + +format-foreground=${colors.background_inactive} +label-foreground=${colors.foreground} + +[module/pulseaudio] +type = internal/pulseaudio +format-volume-prefix = "VOL " +format-volume = <label-volume> +label-muted = VOL %percentage%% +label-volume = %percentage%% +label-muted-foreground = ${colors.background_inactive} +format-volume-prefix-foreground = ${colors.background_inactive} + +[network-base] +type = internal/network +interval = 5 +format-connected = <label-connected> +format-disconnected = <label-disconnected> +label-disconnected = %{F#F0C674}%ifname%%{F#707880} disconnected + +[module/wlan] +inherit = network-base +interface-type = wireless +label-connected = %essid% +label-connected-foreground = ${colors.interactive} + +[module/eth] +inherit = network-base +interface-type = wired +label-connected = %{F#F0C674}%ifname%%{F-} %local_ip% + +[module/wired-network] +type = internal/network +interface = enp2s0 diff --git a/config/polybar/launch.sh b/config/polybar/launch.sh new file mode 100755 index 0000000..75576b4 --- /dev/null +++ b/config/polybar/launch.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +# Terminate already running bar instances +# If all your bars have ipc enabled, you can use +polybar-msg cmd quit +# Otherwise you can use the nuclear option: +killall -q polybar + +# Launch bar1 and bar2 +echo "---" | tee -a /tmp/polybar1.log /tmp/polybar2.log +polybar example 2>&1 | tee -a /tmp/polybar1.log & disown +polybar bar2 2>&1 | tee -a /tmp/polybar2.log & disown + +echo "Bars launched..." |