diff options
| author | trainytrain <trainytrain@rape.lol> | 2021-05-09 01:29:07 -0700 |
|---|---|---|
| committer | trainytrain <trainytrain@rape.lol> | 2021-05-09 01:29:07 -0700 |
| commit | c765e68f05bfe9f0d2e4990bdc8dfabf11cdbc87 (patch) | |
| tree | 1dd446298beeb5d1a411d5516689dee8c2ee26ee /polybar | |
init
Diffstat (limited to 'polybar')
| -rw-r--r-- | polybar/config | 393 | ||||
| -rwxr-xr-x | polybar/launch.sh | 11 |
2 files changed, 404 insertions, 0 deletions
diff --git a/polybar/config b/polybar/config new file mode 100644 index 0000000..c6aca3c --- /dev/null +++ b/polybar/config @@ -0,0 +1,393 @@ +[global/wm] +margin-top = 0 +margin-bottom = 0 + +[color] +background = ${xrdb:color0:#222} +foreground = ${xrdb:color15:#222} +foreground-alt = ${xrdb:color4:#222} +primary = ${xrdb:color3:#222} +secondary = ${xrdb:color2:#222} +alert = ${xrdb:color1:#222} + +[bar/momiji] +monitor = ${env:MONITOR:} +override-redirect = false +wm-restack = bspwm +bottom = false +fixed-center = true + +width = 100% +height = 19 + +font-0 = "JetBrains Mono:style=Medium:pixelsize=9" +font-1 = "IPAPGothic,IPA Pゴシック:style=Regular:size=9" +font-2 = "Baekmuk Dotum,백묵 돋움:style=Regular:size=9" +font-3 = "Siji:style=Regular:size=8" +font-4 = "Font Awesome 5 Free,Font Awesome 5 Free Solid:style=Solid:size=9" +font-5 = "Font Awesome 5 Brands,Font Awesome 5 Brands Regular:style=Regular:size=9" + +background = ${color.background} +foreground = ${color.foreground} + +line-color = ${color.foreground} +underline-size = 1 +overline-size = 2 + +border-bottom-size = 2 +border-bottom-color = ${color.foreground-alt} + +spacing = 0 +padding-right = 1 +padding-left = 1 +module-margin = 1 +#module-margin-left = 1 +#module-margin-right = 1 + +tray-position = right +tray-padding = 0 +tray-maxsize = 10 +tray-detached = false + +#scroll-up = i3wm-wsnext +#scroll-down = i3wm-wsprev +#scroll-up = bspwm-desknext +#scroll-down = bspwm-deskprev + +modules-left = mpd-playing mpd +modules-center = ewmh +modules-right = ethernet pulseaudio battery date time + +[module/ewmh] +type = internal/xworkspaces + +pin-workspaces = false +enable-click = true +enable-scroll = true +reverse-scroll = false + +format = <label-state> +label-monitor = %name% + +label-active = %name% +label-active-foreground = ${color.foreground} +label-active-background = ${color.background} +label-active-underline= #6790eb +label-active-padding = 1 + +label-occupied = %name% +label-occupied-background = ${color.background} +label-occupied-padding = 1 + +label-urgent = %name% +label-urgent-foreground = ${color.foreground} +label-urgent-background = ${color.alert} +label-urgent-underline = ${color.alert} +label-urgent-padding = 1 + +label-empty = %name% +label-empty-foreground = ${color.foreground} +label-empty-padding = 1 +format-foreground = ${color.foreground} +format-background = ${color.background} +wrapping-scroll = false + + +[module/xwindow] +type = internal/xwindow +format = <label> +label = %title% +label-maxlen = 100 +label-empty = Empty + +[module/i3] +type = internal/i3 +strip-wsnumbers = true +wrapping-scroll = false + +label-focused =%name% +label-focused-foreground = ${color.foreground-alt} +label-focused-background = ${color.background} +label-focused-padding = 1 + +label-unfocused =%name% +label-unfocused-padding = 1 + +label-visible =%name% +label-visible-padding = 1 + +label-urgent =%name% +label-urgent-background = ${color.background} +label-urgent-foreground = ${color.alert} +label-urgent-underline = ${color.alert} +label-urgent-padding = 1 + +[module/bspwm] +type = internal/bspwm + +; Only show workspaces defined on the same output as the bar +; NOTE: The bspwm and XRandR monitor names must match, which they do by default. +; Default: true +pin-workspaces = true + +; Output mode flags after focused state label +; Default: false +inline-mode = false + +; Create click handler used to focus workspace +; Default: true +enable-click = true + +; Create scroll handlers used to cycle workspaces +; Default: true +enable-scroll = true + +; Set the scroll cycle direction +; Default: true +reverse-scroll = true + +; Use fuzzy (partial) matching on labels when assigning +; icons to workspaces +; Example: code;♚ will apply the icon to all workspaces +; containing 'code' in the label +; Default: false +fuzzy-match = true + +label-focused-foreground = ${color.foreground-alt} +label-urgent-background = ${color.background} +label-urgent-foreground = ${color.alert} +label-urgent-underline = ${color.alert} +label-separator = \ +label-separator-padding = 1 +label-monitor = %name% + +[module/wifi] +type = internal/network +interface = wlo1 +interval = 1.0 +udspeed-minwidth = 0 + +format-connected = <ramp-signal> <label-connected> +label-connected = %ifname% %downspeed% +format-disconnected = disconnected +format-connected-underline = ${color.foreground-alt} +format-disconnected-underline = ${color.alert} + +ramp-signal-0 = +ramp-signal-1 = +ramp-signal-2 = +ramp-signal-3 = +ramp-signal-4 = + +[module/ethernet] +type = internal/network +interface = enp0s25 +interval = 1.0 +udspeed-minwidth = 0 + +format-connected = <ramp-signal> <label-connected> +label-connected = %ifname% %downspeed% +format-disconnected = disconnected +format-connected-underline = ${color.foreground-alt} +format-disconnected-underline = ${color.alert} + +ramp-signal-0 = +ramp-signal-1 = +ramp-signal-2 = +ramp-signal-3 = +ramp-signal-4 = + +[module/cpu] +type = internal/cpu +label = %percentage%% +interval = 2 +format-prefix = " " + + +[module/memory] +type = internal/memory +interval = 2 +label = %mb_used% +format-prefix = " " + + +[module/battery] +type = internal/battery +full-at = 100 +time-format = %H:%M +battery = BAT0 +adapter = AC + +format-charging = <animation-charging> <label-charging> +format-charging-underline = ${color.foreground-alt} +label-charging = %percentage%% + +format-discharging = <ramp-capacity> <label-discharging> +format-discharging-underline = ${color.foreground-alt} +label-discharging = %percentage%% + +format-full = <ramp-capacity> <label-full> +format-full-underline = ${color.foreground-alt} +format-full-prefix = " " + +ramp-capacity-0 = +ramp-capacity-1 = +ramp-capacity-2 = + +animation-charging-0 = + +[module/pulseaudio] +type = internal/pulseaudio + +; Sink to be used, if it exists (find using `pacmd list-sinks`, name field) +; If not, uses default sink +#sink = alsa_output.pci-0000_12_00.3.analog-stereo +sink = alsa_output.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-stereo + +; Use PA_VOLUME_UI_MAX (~153%) if true, or PA_VOLUME_NORM (100%) if false +; Default: true +use-ui-max = true + +; Interval for volume increase/decrease (in percent points) (unreleased) +interval = 5 +format-volume = <ramp-volume> <label-volume> +format-volume-underline = ${color.foreground-alt} +label-volume = %percentage%% + +format-muted-prefix = " " +format-muted-underline = ${color.alert} +label-muted = MUTE + +ramp-volume-0 = +ramp-volume-1 = +ramp-volume-2 = +ramp-volume-3 = + +ramp-headphones-0 = +ramp-headphones-1 = + +[module/alsa] +type = internal/alsa + +; Soundcard to be used +; Usually in the format hw:# where # is the card number +; You can find the different card numbers in `/proc/asound/cards` +master-soundcard = default +speaker-soundcard = default +headphone-soundcard = default + +; Name of the master, speaker and headphone mixers +; Use the following command to list available mixer controls: +; $ amixer scontrols | sed -nr "s/.*'([[:alnum:]]+)'.*/\1/p" +; If master, speaker or headphone-soundcard isn't the default, +; use `amixer -c # scontrols` instead where # is the number +; of the master, speaker or headphone soundcard respectively +; +; Default: Master +master-mixer = Master + +; Optionally define speaker and headphone mixers +; Default: none +speaker-mixer = Speaker +; Default: none +headphone-mixer = Headphone + +; NOTE: This is required if headphone_mixer is defined +; Use the following command to list available device controls +; $ amixer controls | sed -r "/CARD/\!d; s/.*=([0-9]+).*name='([^']+)'.*/printf '%3.0f: %s\n' '\1' '\2'/e" | sort +; You may also need to use `amixer -c # controls` as above for the mixer names +; Default: none +headphone-id = 9 + +; Use volume mapping (similar to amixer -M and alsamixer), where the increase in volume is linear to the ear +; Default: false +mapped = true + +; Interval for volume increase/decrease (in percent points) +; Default: 5 +interval = 5 + +format-muted-prefix = " " +format-muted-underline = ${color.alert} +label-muted = MUTE + +format-volume = <ramp-volume> <label-volume> +format-volume-underline = ${color.foreground-alt} +label-volume = %percentage%% + +ramp-volume-0 = +ramp-volume-1 = +ramp-volume-2 = +ramp-volume-3 = + +ramp-headphones-0 = +ramp-headphones-1 = + +[module/xmenu] +type = custom/script + +exec = echo "" +click-left = /home/trollshotlol/Work/xmenu/xmenu.sh + +[module/date] +type = internal/date +interval=10 +label = %date% +date = %Y-%m-%d +format-underline = ${color.foreground-alt} + +[module/time] +type = internal/date +interval = 15 +label = %time% +time = %H:%M +format-underline = ${color.foreground-alt} + +[module/mpd] +type = internal/mpd + +; Host where mpd is running (either ip or domain name) +; Can also be the full path to a unix socket where mpd is running. +host = localhost +port = 6600 +format-online = <icon-prev> <icon-seekb> <toggle> <icon-seekf> <icon-next> <icon-repeat> + +; Only applies if <icon-X> is used +icon-play = +icon-pause = +icon-stop = +icon-prev = +icon-next = +icon-seekb = +icon-seekf = +icon-random = 🔀 +icon-repeat = 🔁 +icon-repeatone = 🔂 +icon-single = 🔂 +icon-consume = ✀ + +[module/mpd-playing] +type = internal/mpd + +; Host where mpd is running (either ip or domain name) +; Can also be the full path to a unix socket where mpd is running. +host = localhost +port = 6600 +interval = 1 + +format-playing = <label-song> +#format-paused = MPD is paused +format-stopped = MPD has stopped +format-offline = <label-offline> + +label-song = %title% - %artist% +label-time = %elapsed% / %total% +label-offline = MPD is offline + +; Only applies if <bar-progress> is used +bar-progress-width = 8 +bar-progress-indicator = | +bar-progress-fill = ─ +bar-progress-fill-font = 1 +bar-progress-empty = ─ +bar-progress-empty-font = 1 diff --git a/polybar/launch.sh b/polybar/launch.sh new file mode 100755 index 0000000..38d931e --- /dev/null +++ b/polybar/launch.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Terminate already running bar instances +killall -q polybar + +# Wait until the processes have been shut down +while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done + +for m in $(polybar --list-monitors | cut -d":" -f1); do + MONITOR=$m polybar --reload momiji & +done |
