dotfiles/polybar/config.ini
2021-04-10 18:26:18 +03:00

448 lines
10 KiB
INI

;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
;;
;; ____ __ __
;; / __ \____ / /_ __/ /_ ____ ______
;; / /_/ / __ \/ / / / / __ \/ __ `/ ___/
;; / ____/ /_/ / / /_/ / /_/ / /_/ / /
;; /_/ \____/_/\__, /_.___/\__,_/_/
;; /____/
;;
;; Created By Aditya Shakya @adi1090x
;;
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
;; Global WM Settings
[global/wm]
; Adjust the _NET_WM_STRUT_PARTIAL top value
; Used for top aligned bars
margin-bottom = 0
; Adjust the _NET_WM_STRUT_PARTIAL bottom value
; Used for bottom aligned bars
margin-top = 0
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
;; Bar Settings
[bar/main]
monitor = ${env:MONITOR:}
monitor-fallback =
; Require the monitor to be in connected state
; XRandR sometimes reports my monitor as being disconnected (when in use)
monitor-strict = true
; Tell the Window Manager not to configure the window.
; Use this to detach the bar if your WM is locking its size/position.
override-redirect = false
; Hide when using fullscreen applications
wm-restack = bspwm
; Put the bar at the bottom of the screen
bottom = true
; Prefer fixed center position for the `modules-center` block
; When false, the center position will be based on the size of the other blocks.
fixed-center = true
; Dimension defined as pixel value (e.g. 35) or percentage (e.g. 50%),
; the percentage can optionally be extended with a pixel offset like so:
; 50%:-10, this will result in a width or height of 50% minus 10 pixels
width = 99%
height = 30
; Offset defined as pixel value (e.g. 35) or percentage (e.g. 50%)
; the percentage can optionally be extended with a pixel offset like so:
; 50%:-10, this will result in an offset in the x or y direction
; of 50% minus 10 pixels
offset-x = 0.5%
offset-y = 0%
; Background ARGB color (e.g. #f00, #ff992a, #ddff1023)
background = ${color.alpha}
; Foreground ARGB color (e.g. #f00, #ff992a, #ddff1023)
foreground = ${color.fg}
; Value used for drawing rounded corners
; Note: This shouldn't be used together with border-size because the border
; doesn't get rounded
; Individual top/bottom values can be defined using:
; radius-{top,bottom}
radius-top = 0.0
radius-bottom = 0.0
; Under-/overline pixel size and argb color
; Individual values can be defined using:
; {overline,underline}-size
; {overline,underline}-color
line-size = 2
line-color = ${color.shade5}
font-0 = "scientifica:size=8;2"
font-1 = "Siji:size=8;2"
modules-left = xwindow sep
modules-center = workspaces
modules-right = sep memory cpu pulseaudio battery date
wm-name = bspwm
locale = ro_RO.UTF-8
tray-position = right
tray-detached = false
tray-maxsize = 16
tray-background = ${color.bg}
tray-offset-x = 0
tray-offset-y = 0
tray-padding = 0
tray-scale = 1.0
enable-ipc = true
; Requires polybar to be built with xcursor support (xcb-util-cursor)
; Possible values are:
; - default : The default pointer as before, can also be an empty string (default)
; - pointer : Typically in the form of a hand
; - ns-resize : Up and down arrows, can be used to indicate scrolling
cursor-click = pointer
cursor-scroll = default
;; Application Settings
[settings]
; The throttle settings lets the eventloop swallow up til X events
; if they happen within Y millisecond after first event was received.
; This is done to prevent flood of update event.
;
; For example if 5 modules emit an update event at the same time, we really
; just care about the last one. But if we wait too long for events to swallow
; the bar would appear sluggish so we continue if timeout
; expires or limit is reached.
throttle-output = 5
throttle-output-for = 10
; Time in milliseconds that the input handler will wait between processing events
throttle-input-for = 30
; Reload upon receiving XCB_RANDR_SCREEN_CHANGE_NOTIFY events
screenchange-reload = false
; Compositing operators
; @see: https://www.cairographics.org/manual/cairo-cairo-t.html#cairo-operator-t
compositing-background = source
compositing-foreground = over
compositing-overline = over
compositing-underline = over
compositing-border = over
; Define fallback values used by all module formats
format-foreground =
format-background =
format-underline =
format-overline =
format-spacing =
format-padding =
format-margin =
format-offset =
; Enables pseudo-transparency for the bar
; If set to true the bar can be transparent without a compositor.
pseudo-transparency = false
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
;;
;; ______ __
;; / ____/___ / /___ __________
;; / / / __ \/ / __ \/ ___/ ___/
;; / /___/ /_/ / / /_/ / / (__ )
;; \____/\____/_/\____/_/ /____/
;;
;; Created By Aditya Shakya @adi1090x
;;
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[color]
; bg = #141C21
; fg = #D9DBDF this is something white
; fg = #AFB42B
; fg-alt = #141C21
; alpha = #00000000
; shade1 = #AFB42B
; shade2 = #C0CA33
; shade3 = #CDDC39
; shade4 = #D4E157
; shade5 = #DCE775
; shade6 = #E6EE9C
bg = ${xrdb:background}
fg = ${xrdb:foreground}
fg-alt = ${xrdb:color0}
alpha = #00000000
shade1 = ${xrdb:color4}
shade2 = ${xrdb:color12}
shade3 = ${xrdb:color1}
shade4 = ${xrdb:color9}
shade5 = ${xrdb:color7}
shade6 = ${xrdb:color15}
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
;;
;; __ ___ __ __
;; / |/ /___ ____/ /_ __/ /__ _____
;; / /|_/ / __ \/ __ / / / / / _ \/ ___/
;; / / / / /_/ / /_/ / /_/ / / __(__ )
;; /_/ /_/\____/\__,_/\__,_/_/\___/____/
;;
;; Created By Aditya Shakya @adi1090x
;;
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/pulseaudio]
type = internal/pulseaudio
use-ui-max = true
format-volume = <ramp-volume> <label-volume>
format-volume-background = ${color.shade4}
format-volume-foreground = ${color.fg-alt}
format-volume-padding = 2
# Shows percentage and launches pavucntrol on left click
label-volume = %{A3:pavucontrol &:}%percentage%%%{A}
format-muted-background = ${color.shade4}
format-muted-foreground = ${color.fg-alt}
format-muted-padding = 2
label-muted = %{A3:pavucntrol &:}%{A}
ramp-volume-0 =
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/battery]
type = internal/battery
full-at = 99
battery = BAT0
adapter = AC
poll-interval = 5
time-format = %H:%M
format-charging = <label-charging>
format-charging-background = ${color.shade3}
format-charging-foreground = ${color.fg-alt}
format-charging-padding = 2
format-discharging = <ramp-capacity> <label-discharging>
format-discharging-background = ${color.shade3}
format-discharging-foreground = ${color.fg-alt}
format-discharging-padding = 2
format-full = <label-full>
format-full-background = ${color.shade3}
format-full-foreground = ${color.fg-alt}
format-full-padding = 2
label-charging = %{A1:xfce4-power-manager-settings &:} %percentage%%%{A}
label-discharging = %{A1:xfce4-power-manager-settings &:}%percentage%%%{A}
label-full = %{A1:xfce4-power-manager-settings &:} 100%%{A}
; Only applies if <ramp-capacity> is used
ramp-capacity-0 =
ramp-capacity-1 =
ramp-capacity-2 =
ramp-capacity-3 =
ramp-capacity-4 =
ramp-capacity-5 =
ramp-capacity-6 =
ramp-capacity-7 =
ramp-capacity-8 =
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/cpu]
type = internal/cpu
interval = 5
format = <label>
format-prefix =
format-background = ${color.shade5}
format-foreground = ${color.fg-alt}
format-padding = 2
label = " %percentage%%"
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/date]
type = internal/date
interval = 1.0
time = %H:%M
time-alt =  %d-%m-%Y%
format = <label>
format-background = ${color.bg}
format-foreground = ${color.fg}
format-padding = 2
;TODO on-click calendar (`cal` output) similar to what's used in awesomewm
label = %time%
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/memory]
type = internal/memory
interval = 5
format = <label>
format-prefix =
format-background = ${color.shade6}
format-foreground = ${color.fg-alt}
format-padding = 2
label = " %gb_used%"
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/mpd]
type = internal/mpd
interval = 2
format-online = <label-song>
format-online-background = ${color.bg}
format-online-foreground = ${color.fg}
format-online-padding = 2
label-song = "%artist% - %title%"
label-song-maxlen = 30
label-song-ellipsis = true
label-offline = "MPD is offline"
[module/mpd_i]
type = internal/mpd
interval = 2
format-online = <icon-prev> <toggle> <icon-next>
format-online-background = ${color.shade5}
format-online-foreground = ${color.fg-alt}
format-online-padding = 2
label-offline = "MPD is offline"
; Only applies if <icon-X> is used
icon-play =
icon-pause =
icon-stop =
icon-prev =
icon-next =
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/workspaces]
type = internal/bspwm
pin-workspaces = false
enable-click = true
enable-scroll = true
reverse-scroll = true
format = <label-state>
ws-icon-0 = 1;I
ws-icon-1 = 2;II
ws-icon-2 = 3;III
ws-icon-3 = 4;IV
ws-icon-4 = 5;V
ws-icon-5 = 6;VI
ws-icon-6 = 7;VII
ws-icon-7 = 8;VIII
ws-icon-8 = 9;IX
ws-icon-9 = 0;X
ws-icon-default = o
label-monitor = %name%
label-focused = %icon%
label-focused-foreground = ${color.fg-alt}
label-focused-background = ${color.shade6}
label-occupied = %icon%
label-occupied-underline = ${color.shade4}
label-occupied-background = ${color.bg}
label-urgent = %icon%
label-urgent-foreground = ${color.fg}
label-urgent-background = ${color.bg}
label-empty = %icon%
label-empty-foreground = ${color.fg}
label-empty-background = ${color.bg}
label-focused-padding = 2
label-urgent-padding = 2
label-occupied-padding = 2
label-empty-padding = 2
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/sep]
type = custom/text
content = "| "
content-background = ${color.alpha}
content-foreground = ${color.alpha}
content-padding = 0
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/colors]
type = custom/text
content =
content-background = #FFFFFF
content-foreground = #CC6666
content-padding = 2
click-left = ~/.config/polybar/scripts/colors_rofi.sh &
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/xwindow]
type = internal/xwindow
format = <label>
format-background = ${color.bg}
format-foreground = ${color.fg}
format-padding = 4
label = %title%
label-maxlen = 100
; Used instead of label when there is no window title
; Available tokens:
; None
label-empty =
label-empty-foreground = #707880
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
;; __________ ______
;; / ____/ __ \/ ____/
;; / __/ / / / / /_
;; / /___/ /_/ / __/
;; /_____/\____/_/
;;
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_