dotfiles

Linux and macOS dotfiles
git clone https://github.com/michaelneuper/dotfiles.git
README | Files | Log | Refs

dotfiles/.config/polybar/modules.ini (16015B)


;; Modules by me https://github.com/michaelneuper
[module/arch]
type = custom/script
exec = echo " "
format-foreground = ${color.blue}
format-font = 2

[module/time]
type = internal/date
interval = 1.0
time = %H:%M
time-alt = %a %d
format = <label>
format-foreground = ${color.white}
label = %time%
label-font = 2
click-right = "echo $(date +%d/%m/%y)"

[module/time-date]
type = custom/script
exec = "date +%H:%M"
interval = 5
; format-foreground = ${color.white}
; format-font = 2
click-left = echo "$(date '+%a %d')"
; click-right = "bash date +%d/%m/%y"
; exec = date '+%d/%m/%Y %H:%M:%S'
; click-left = thunderbird &
label = "%output%"

[module/powermenu]
type = custom/script
exec = echo ""
click-left = "bash ~/.config/rofi/scripts/powermenu.sh"
format-foreground = ${color.red}

[module/bspwm-layout]
type = internal/bspwm
format = <label-mode>
; The following labels will be used to indicate the layout/mode
; for the focused workspace. Requires <label-mode>
;
; Available tokens:
;   None
label-monocle = 
label-tiled = 
label-fullscreen = 
label-floating = 
label-pseudotiled = P
label-locked = 
label-locked-foreground = #bd2c40
label-sticky = 
label-sticky-foreground = #fba922
label-private = 
label-private-foreground = #bd2c40

;; Modules by @adi1090x and @raven2cz
; Modified by me
[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 = false

; 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

; ws-icon-[0-9]+ = label;icon
; Note that the label needs to correspond with the bspwm workspace name
ws-icon-0 = 1;一
ws-icon-1 = 2;二
ws-icon-2 = 3;三
ws-icon-3 = 4;四
ws-icon-4 = 5;五
ws-icon-5 = 6;六
ws-icon-6 = 7;七
ws-icon-7 = 8;八
ws-icon-8 = 9;九
ws-icon-9 = 10;十
ws-icon-default = 

; Available tags:
;   <label-monitor>
;   <label-state> - gets replaced with <label-(focused|urgent|occupied|empty)>
;   <label-mode> - gets replaced with <label-(monocle|tiled|fullscreen|floating|locked|sticky|private)>
; Default: <label-state>
format = <label-state> | <label-mode>

; Available tokens:
;   %name%
; Default: %name%
label-monitor = %name%

; If any values for label-dimmed-N are defined, the workspace/mode
; colors will get overridden with those values if the monitor is out of focus
; To only override workspaces in a specific state, use:
;   label-dimmed-focused
;   label-dimmed-occupied
;   label-dimmed-urgent
;   label-dimmed-empty
; label-dimmed-foreground = #555
; label-dimmed-underline = ${bar/top.background}
; label-dimmed-focused-background = #f00

; Available tokens:
;   %name%
;   %icon%
;   %index%
; Default: %icon%  %name%
label-focused = [%index%:%icon%]
label-focused-foreground = ${color.purple}
; label-focused-background = #3f3f3f
label-focused-underline = ${color.purple}

; Available tokens:
;   %name%
;   %icon%
;   %index%
; Default: %icon%  %name%
label-occupied = %icon%
label-occupied-foreground = ${color.cyan}

; Available tokens:
;   %name%
;   %icon%
;   %index%
; Default: %icon%  %name%
label-urgent = %icon%
label-urgent-foreground = ${color.red}
; label-urgent-underline = ${color.red}

; Available tokens:
;   %name%
;   %icon%
;   %index%
; Default: %icon%  %name%
label-empty = %icon%
label-empty-foreground = ${color.foreground}

; The following labels will be used to indicate the layout/mode
; for the focused workspace. Requires <label-mode>
;
; Available tokens:
;   None
label-monocle = M
label-tiled = T
label-fullscreen = F
label-floating = f
label-pseudotiled = P
label-locked = ?
label-locked-foreground = ${color.red}
label-sticky = S
label-sticky-foreground = ${color.yellow}
label-private = p
label-private-foreground = ${color.red}

; Separator in between workspaces
label-separator = " "
label-separator-padding = 0.75
label-separator-foreground = #ffb52a

[module/workspaces]
type = internal/xworkspaces

; Only show workspaces defined on the same output as the bar
;
; Useful if you want to show monitor specific workspaces
; on different bars
;
; Default: false
pin-workspaces = true

; Create click handler used to focus desktop
; Default: true
enable-click = true

; Create scroll handlers used to cycle desktops
; Default: true
enable-scroll = true

; icon-[0-9]+ = <desktop-name>;<icon>
; NOTE: The desktop name needs to match the name configured by the WM
; You can get a list of the defined desktops using:
; $ xprop -root _NET_DESKTOP_NAMES
icon-0 = 1;一
icon-1 = 2;二
icon-2 = 3;三
icon-3 = 4;四
icon-4 = 5;五
icon-5 = 6;六
icon-6 = 7;七
icon-7 = 8;八
icon-8 = 9;九
icon-9 = 10;十
icon-default = 

; Available tags:
;   <label-monitor>
;   <label-state> - gets replaced with <label-(active|urgent|occupied|empty)>
; Default: <label-state>
format = <label-state>

; Available tokens:
;   %name%
; Default: %name%
label-monitor = %name%

; Available tokens:
;   %name%
;   %icon%
;   %index%
; Default: %icon%  %name%
label-active = [%icon%]
label-active-foreground = ${color.purple}
; label-active-underline = ${color.purple}

; Available tokens:
;   %name%
;   %icon%
;   %index%
; Default: %icon%  %name%
label-occupied = %icon%
label-occupied-foreground = ${color.cyan}

; Available tokens:
;   %name%
;   %icon%
;   %index%
; Default: %icon%  %name%
label-urgent = %icon%
label-urgent-foreground = ${color.red}
label-urgent-underline = ${color.red}

; Available tokens:
;   %name%
;   %icon%
;   %index%
; Default: %icon%  %name%
label-empty = %icon%
label-empty-foreground = ${color.foreground}

label-active-padding = 1
label-urgent-padding = 1
label-occupied-padding = 1
label-empty-padding = 1

[module/filesystem]
type = internal/fs

; Mountpoints to display
mount-0 = /
;;mount-1 = /home
;;mount-2 = /var

; Seconds to sleep between updates
; Default: 30
interval = 300

; Display fixed precision values
; Default: false
fixed-values = false

; Spacing between entries
; Default: 2
;;spacing = 4

; Available tags:
;   <label-mounted> (default)
;   <bar-free>
;   <bar-used>
;   <ramp-capacity>
format-mounted = <label-mounted>
format-mounted-prefix = 
format-mounted-prefix-foreground = ${color.purple}

; Available tags:
;   <label-unmounted> (default)
format-unmounted = <label-unmounted>
format-unmounted-prefix = 
format-unmounted-prefix-foreground = ${color.red}

; Available tokens:
;   %mountpoint%
;   %type%
;   %fsname%
;   %percentage_free%
;   %percentage_used%
;   %total%
;   %free%
;   %used%
; Default: %mountpoint% %percentage_free%%
label-mounted = " %free%"

; Available tokens:
;   %mountpoint%
; Default: %mountpoint% is not mounted
label-unmounted = " %mountpoint%: NA"

click-left = "alacritty -e ncdu"

[module/memory]
type = internal/memory

; Seconds to sleep between updates
; Default: 1
interval = 1

; Available tags:
;   <label> (default)
;   <bar-used>
;   <bar-free>
;   <ramp-used>
;   <ramp-free>
;   <bar-swap-used>
;   <bar-swap-free>
;   <ramp-swap-used>
;   <ramp-swap-free>
format = <label>
format-prefix = 
format-prefix-foreground = ${color.green}

; Available tokens:
;   %percentage_used% (default)
;   %percentage_free%
;   %gb_used%
;   %gb_free%
;   %gb_total%
;   %mb_used%
;   %mb_free%
;   %mb_total%
;   %percentage_swap_used%
;   %percentage_swap_free%
;   %mb_swap_total%
;   %mb_swap_free%
;   %mb_swap_used%
;   %gb_swap_total%
;   %gb_swap_free%
;   %gb_swap_used%

label = " %mb_used%"

; Only applies if <ramp-used> is used
;;ramp-used-0 = ${memory.used0}
;;ramp-used-1 = ${memory.used1}
;;ramp-used-2 = ${memory.used2}

; Only applies if <ramp-free> is used
;;ramp-free-0 = ${memory.free0}
;;ramp-free-1 = ${memory.free1}
;;ramp-free-2 = ${memory.free2}
click-left = "alacritty -e htop"

[module/title]
type = internal/xwindow
format = <label>
format-prefix =
format-foreground = ${color.foreground}
label = "%title%"
label-maxlen = 60
label-empty = "Arch Linux"

[module/updates]
type = custom/script

; Available tokens:
;   %counter%
; Command to be executed (using "/usr/bin/env sh -c [command]")
exec = ~/.config/polybar/scripts/updates.sh

; Conditional command that, if defined, needs to exit successfully
; before the main exec command is invoked.
; Default: ""
;;exec-if = ""

; Will the script output continous content?
; Default: false
tail = true

; Seconds to sleep between updates
; Default: 2 (0 if `tail = true`)
interval = 5

; Available tags:
;   <output> - deprecated
;   <label> (default)
format = <label>
format-prefix = 
format-prefix-foreground = ${color.indigo}

; Available tokens:
;   %output%
; Default: %output%
label = " %output%"

; Available tokens:
;   %counter%
;   %pid%
;
; "click-(left|middle|right)" will be executed using "/usr/bin/env sh -c [command]"
click-left = "pamac-manager --updates"
click-right = "plasma-discover"
; click-right = exo-open --launch TerminalEmulator &
;;double-click-left = echo double left %counter%
;;double-click-middle = echo double middle %counter%
;;double-click-right = echo double right %counter%

; Available tokens:
;   %counter%
;   %pid%
;
; "scroll-(up|down)" will be executed using "/usr/bin/env sh -c [command]"
;;scroll-up = echo scroll up %counter%
;;scroll-down = echo scroll down %counter%

[module/cpu]
type = internal/cpu

; Seconds to sleep between updates
; Default: 1
interval = 1

; Available tags:
;   <label> (default)
;   <bar-load>
;   <ramp-load>
;   <ramp-coreload>
;;format = <label> <ramp-coreload>
format = <label>
format-prefix = 
format-prefix-foreground = ${color.blue}

; Available tokens:
;   %percentage% (default) - total cpu load averaged over all cores
;   %percentage-sum% - Cumulative load on all cores
;   %percentage-cores% - load percentage for each core
;   %percentage-core[1-9]% - load percentage for specific core
label = " %percentage%%"

; Spacing between individual per-core ramps
;;ramp-coreload-spacing = 1
;;ramp-coreload-0 = ${cpu.load0}
;;ramp-coreload-1 = ${cpu.load1}

;;ramp-load-0 = ${cpu.load0}
;;ramp-load-1 = ${cpu.load1}
click-left = alacritty -e htop &

[module/sep]
type = custom/text
content = |
content-foreground = ${color.sep}

[module/mpris-play-pause]
type = custom/ipc
hook-0 = echo "%{F${foreground}}   %{F-}"
hook-1 = echo "%{F${foreground}}   %{F-}"
initial = 2
click-left = playerctl play-pause
scroll-up = playerctl previous
scroll-down = playerctl next

[module/mpris]
type = custom/script
tail = true
format = <label>
exec = ~/.config/polybar/scripts/scroll_mpris_status.sh
click-left = playerctl play-pause
scroll-up = playerctl previous
scroll-down = playerctl next

[module/alsa]
type = internal/alsa
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

; Available tags:
;   <label-volume> (default)
;   <ramp-volume>
;   <bar-volume>
format-volume = <ramp-volume><label-volume>

; Available tags:
;   <label-muted> (default)
;   <ramp-volume>
;   <bar-volume>
format-muted = <label-muted>
format-muted-prefix = 
format-muted-prefix-foreground = ${color.red}

; Available tokens:
;   %percentage% (default)
label-volume = %percentage%%
label-volume-foreground = ${color.foreground}

; Available tokens:
;   %percentage% (default
label-muted = " Muted"
label-muted-foreground = ${color.sep}

; Only applies if <ramp-volume> is used
ramp-volume-0 = 
ramp-volume-1 = 
ramp-volume-2 = 
ramp-volume-foreground = ${color.blue}

; If defined, it will replace <ramp-volume> when
; headphones are plugged in to `headphone_control_numid`
; If undefined, <ramp-volume> will be used for both
; Only applies if <ramp-volume> is used
ramp-headphones-0 = 
ramp-headphones-background = ${color.blue}

click-right = "alacritty -e pulsemixer"
click-middle = pavucontrol

[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_03_00.6.analog-stereo

; Use PA_VOLUME_UI_MAX (~153%) if true, or PA_VOLUME_NORM (100%) if false
; Default: true
use-ui-max = false

; Interval for volume increase/decrease (in percent points)
; Default: 5
interval = 5

; Available tags:
;   <label-volume> (default)
;   <ramp-volume>
;   <bar-volume>
format-volume = <ramp-volume> <label-volume>

; Available tags:
;   <label-muted> (default)
;   <ramp-volume>
;   <bar-volume>
format-muted = <label-muted>
format-muted-prefix = 
format-muted-prefix-foreground = ${color.red}

; Available tokens:
;   %percentage% (default)
label-volume = %percentage%%

; Available tokens:
;   %percentage% (default
label-muted = " Muted"
label-muted-foreground = ${color.sep}

; Only applies if <ramp-volume> is used
ramp-volume-0 = 
ramp-volume-1 = 
ramp-volume-2 = 
ramp-volume-foreground = ${color.blue}

[module/mpd]
type = internal/mpd

;;host = 127.0.0.1
;;port = 6600
;;password = mysecretpassword

interval = 2

format-online = <label-song> <icon-prev> <toggle> <icon-next>
format-online-prefix = " "
format-online-prefix-foreground = ${color.green}

format-playing = ${self.format-online}
format-paused = <label-song> <toggle>

format-offline = <label-offline>
format-offline-prefix = " "
format-offline-prefix-foreground = ${color.red}
label-offline = "Offline"

label-song =  "%title% | %artist%"
label-song-maxlen = 40
label-song-ellipsis = true

icon-play = 
icon-play-font = 2
icon-play-foreground = ${color.green}
icon-pause = 
icon-pause-font = 2
icon-pause-foreground = ${color.yellow}
icon-stop = 
icon-stop-foreground = ${color.red}
icon-prev = 玲
icon-prev-font = 2
icon-prev-foreground = ${color.cyan}
icon-next = 怜
icon-next-font = 2
icon-next-foreground = ${color.cyan}

; https://github.com/VineshReddy/polybar-redshift.git
[module/redshift]
type = custom/script
format-prefix = " "  
format-prefix-foreground = ${color.amber}
exec = source ~/.config/polybar/scripts/env.sh && ~/.config/polybar/scripts/redshift.sh temperature 
click-left = source ~/.config/polybar/scripts/env.sh && ~/.config/polybar/scripts/redshift.sh toggle 
scroll-up = source ~/.config/polybar/scripts/env.sh && ~/.config/polybar/scripts/redshift.sh increase
scroll-down = source ~/.config/polybar/scripts/env.sh && ~/.config/polybar/scripts/redshift.sh decrease
interval=0.5

; https://github.com/andreykaere/ixwindow.git
[module/ixwindow]
type = custom/script
exec = ~/.config/polybar/scripts/ixwindow/ixwindow
tail = true