Switch to GNU stow
This commit is contained in:
parent
a2605c4254
commit
d34cecb27e
137 changed files with 39244 additions and 141 deletions
274
polybar/.config/polybar/config
Normal file
274
polybar/.config/polybar/config
Normal file
|
|
@ -0,0 +1,274 @@
|
|||
;==========================================================
|
||||
;
|
||||
;
|
||||
; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗
|
||||
; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
|
||||
; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝
|
||||
; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗
|
||||
; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║
|
||||
; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
|
||||
;
|
||||
;
|
||||
; To learn more about how to configure Polybar
|
||||
; go to https://github.com/polybar/polybar
|
||||
;
|
||||
; The README contains a lot of information
|
||||
;
|
||||
;==========================================================
|
||||
|
||||
[colors]
|
||||
;background = ${xrdb:color0:#222}
|
||||
background = #222
|
||||
background-alt = #444
|
||||
;foreground = ${xrdb:color7:#222}
|
||||
foreground = #dfdfdf
|
||||
foreground-alt = #555
|
||||
primary = #ffb52a
|
||||
secondary = #e60053
|
||||
alert = #bd2c40
|
||||
|
||||
[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
|
||||
|
||||
[global/wm]
|
||||
margin-top = 0
|
||||
margin-bottom = 0
|
||||
|
||||
[bar/simple-top]
|
||||
; Put the bar at the bottom of the screen
|
||||
bottom=false
|
||||
|
||||
width = 100%
|
||||
height = 25
|
||||
padding-left = 0
|
||||
padding-right = 0
|
||||
module-margin-left = 2
|
||||
|
||||
modules-left = workspaces
|
||||
modules-center = mprisdisplay date
|
||||
modules-right = networkspeed archupdates cpu temp backlight volume battery
|
||||
; do not use offsets for the bar, would only work with override-redirect
|
||||
; and will mess up tray https://github.com/polybar/polybar/issues/1355
|
||||
tray-position = right
|
||||
|
||||
; Basic Colors, defined further up
|
||||
background = ${colors.background}
|
||||
foreground = ${colors.foreground}
|
||||
line-size = 2
|
||||
line-color = ${colors.primary}
|
||||
|
||||
; Prefer fixed center position for the `modules-center` block.
|
||||
; The center block will stay in the middle of the bar whenever
|
||||
; possible. It can still be pushed around if other blocks need
|
||||
; more space.
|
||||
; When false, the center block is centered in the space between
|
||||
; the left and right block.
|
||||
fixed-center = true
|
||||
|
||||
; Fonts are defined using <font-name>;<vertical-offset>
|
||||
; Font names are specified using a fontconfig pattern.
|
||||
; font-0 = NotoSans-Regular:size=8;2
|
||||
; font-1 = MaterialIcons:size=10
|
||||
; font-2 = Termsynu:size=8;-1
|
||||
; font-3 = FontAwesome:size=10
|
||||
; See the Fonts wiki page for more details
|
||||
font-0 = Comic Neue
|
||||
font-1 = NotoSans
|
||||
font-2 = Iosevka:size=18
|
||||
|
||||
cursor-click = pointer
|
||||
|
||||
[module/workspaces]
|
||||
; module type
|
||||
type = internal/i3
|
||||
; default formatting
|
||||
format = <label-mode><label-state>
|
||||
; removes numbers for workspaces which have distinct names / icons
|
||||
strip-wsnumbers = true
|
||||
|
||||
ws-icon-0 = 1;
|
||||
ws-icon-1 = 2;
|
||||
ws-icon-2 = 3;
|
||||
ws-icon-3 = 4;4
|
||||
ws-icon-4 = 5;5
|
||||
ws-icon-5 = 6;6
|
||||
ws-icon-6 = 7;7
|
||||
ws-icon-7 = 8;8
|
||||
ws-icon-8 = 9;
|
||||
ws-icon-9 = 10;
|
||||
ws-icon-default = ♟
|
||||
|
||||
; Available tokens:
|
||||
; %name%
|
||||
; %icon%
|
||||
; %index%
|
||||
; %output%
|
||||
; Default: %icon% %name%
|
||||
; unfocused = Inactive workspace on any monitor
|
||||
label-unfocused = %icon%
|
||||
label-unfocused-padding = 4
|
||||
label-unfocused-underline = ${colors.background-alt}
|
||||
; focused = Active workspace on focused monitor
|
||||
label-focused = %icon%
|
||||
label-focused-foreground = ${colors.foreground}
|
||||
label-focused-background = ${colors.background-alt}
|
||||
label-focused-underline = ${colors.primary}
|
||||
label-focused-padding = ${self.label-unfocused-padding}
|
||||
; visible = Active workspace on unfocused monitor
|
||||
label-visible = %icon%
|
||||
label-visible-background = ${self.label-focused-background}
|
||||
label-visible-underline = ${self.label-focused-underline}
|
||||
label-visible-padding = ${self.label-unfocused-padding}
|
||||
; urgent = Workspace with urgency hint set
|
||||
label-urgent = %icon%
|
||||
label-urgent-background = ${colors.alert}
|
||||
label-urgent-padding = ${self.label-unfocused-padding}
|
||||
; formatting of the mode display
|
||||
label-mode = %mode%
|
||||
label-mode-padding = ${self.label-unfocused-padding}
|
||||
label-mode-foreground = ${colors.background}
|
||||
label-mode-background = ${colors.primary}
|
||||
|
||||
[module/cpu]
|
||||
; module type
|
||||
type = internal/cpu
|
||||
; Seconds to sleep between updates
|
||||
interval = 1.0
|
||||
; Available tags:
|
||||
; <label> (default)
|
||||
; <bar-load>
|
||||
; <ramp-load>
|
||||
; <ramp-coreload>
|
||||
format = <ramp-load>
|
||||
; 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 =
|
||||
; enable large icon font
|
||||
label-font = 2
|
||||
; Spacing between individual per-core ramps
|
||||
ramp-load-0 = ▁
|
||||
ramp-load-1 = %{F#ffe5e5}▂%{F-}
|
||||
ramp-load-2 = %{F#ffcccc}▃%{F-}
|
||||
ramp-load-3 = %{F#ffb2b2}▄%{F-}
|
||||
ramp-load-4 = %{F#ff9999}▅%{F-}
|
||||
ramp-load-5 = %{F#ff6666}▆%{F-}
|
||||
ramp-load-6 = %{F#ff3232}▇%{F-}
|
||||
ramp-load-7 = %{F#ff0000}█%{F-}
|
||||
|
||||
[module/temp]
|
||||
type = internal/temperature
|
||||
; Seconds to sleep between updates
|
||||
interval = 1.0
|
||||
; Thermal zone to use
|
||||
; To list all the zone types, run
|
||||
; $ for i in /sys/class/thermal/thermal_zone*; do echo "$i: $(<$i/type)"; done
|
||||
; Default: 0
|
||||
thermal-zone = 0
|
||||
; Use `sensors` to find preferred temperature source, then run
|
||||
; $ for i in /sys/class/hwmon/hwmon*/temp*_input; do echo "$(<$(dirname $i)/name): $(cat ${i%_*}_label 2>/dev/null || echo $(basename ${i%_*})) $(readlink -f $i)"; done
|
||||
; hwmon-path = /sys/devices/platform/coretemp.0/hwmon/hwmon0/temp1_input
|
||||
; Base temperature for where to start the ramp (in degrees celsius)
|
||||
base-temperature = 40
|
||||
; Threshold temperature to display warning label (in degrees celsius)
|
||||
warn-temperature = 70
|
||||
units = true
|
||||
format = <ramp>
|
||||
format-warn = <ramp> <label-warn>
|
||||
label-warn = %temperature-c%
|
||||
label-warn-foreground = ${colors.alert}
|
||||
ramp-0 =
|
||||
ramp-1 = %{F#ff9999}ﲲﲲ%{F-}
|
||||
ramp-2 = %{F#ff0000}ﲲﲲﲲ%{F-}
|
||||
|
||||
[module/date]
|
||||
type = internal/date
|
||||
; Seconds to sleep between updates
|
||||
interval = 1.0
|
||||
; See "http://en.cppreference.com/w/cpp/io/manip/put_time" for details on how to format the date string
|
||||
; NOTE: if you want to use syntax tags here you need to use %%{...}
|
||||
date = %d/%m
|
||||
; Optional time format
|
||||
time = %H:%M
|
||||
; if `date-alt` or `time-alt` is defined, clicking
|
||||
; the module will toggle between formats
|
||||
date-alt = %A, %d %B %Y (W %V)
|
||||
time-alt = %H:%M
|
||||
label = %date% %{T2} %{T-}%time%
|
||||
|
||||
[module/archupdates]
|
||||
type = custom/script
|
||||
exec = $XDG_CONFIG_HOME/polybar/scripts/poly-archupdates
|
||||
interval = 600
|
||||
format = <label>
|
||||
format-foreground = ${colors.primary}
|
||||
label = %output%
|
||||
|
||||
[module/networkspeed]
|
||||
type = custom/script
|
||||
exec = $XDG_CONFIG_HOME/polybar/scripts/poly-networkspeed
|
||||
tail = true
|
||||
|
||||
[module/mprisdisplay]
|
||||
type = custom/script
|
||||
exec = $XDG_CONFIG_HOME/polybar/scripts/poly-mprisdisplay
|
||||
interval = 3
|
||||
click-left = playerctl play-pause &
|
||||
; TODO: add album art display (on click?) - retrieved by playerctl metadata mpris:artUrl
|
||||
|
||||
[module/volume]
|
||||
type = internal/pulseaudio
|
||||
; Available tags:
|
||||
; <label-volume> (default)
|
||||
; <ramp-volume>
|
||||
; <bar-volume>
|
||||
format-volume = <ramp-volume>
|
||||
|
||||
; Use PA_VOLUME_UI_MAX (~153%) if true, or PA_VOLUME_NORM (100%) if false
|
||||
use-ui-max = false
|
||||
|
||||
label-muted = ﱝ
|
||||
label-muted-foreground = ${colors.foreground-alt}
|
||||
|
||||
; Only applies if <ramp-volume> is used
|
||||
ramp-volume-0 =
|
||||
ramp-volume-1 =
|
||||
ramp-volume-2 =
|
||||
ramp-volume-3 = 墳
|
||||
|
||||
[module/backlight]
|
||||
type = internal/xbacklight
|
||||
format = <ramp><label>
|
||||
ramp-0 =
|
||||
ramp-1 =
|
||||
ramp-2 =
|
||||
ramp-3 =
|
||||
ramp-4 =
|
||||
|
||||
[module/battery]
|
||||
type = internal/battery
|
||||
battery = BAT0
|
||||
adapter = AC
|
||||
label-charging = %percentage%%
|
||||
label-discharging = %percentage%%
|
||||
format-discharging = <ramp-capacity> <label-discharging>
|
||||
format-charging = <label-charging>
|
||||
ramp-capacity-0 =
|
||||
ramp-capacity-1 =
|
||||
ramp-capacity-2 =
|
||||
ramp-capacity-3 =
|
||||
ramp-capacity-4 =
|
||||
; vim:ft=dosini
|
||||
403
polybar/.config/polybar/exampleconf
Normal file
403
polybar/.config/polybar/exampleconf
Normal file
|
|
@ -0,0 +1,403 @@
|
|||
[colors]
|
||||
;background = ${xrdb:color0:#222}
|
||||
background = #222
|
||||
background-alt = #444
|
||||
;foreground = ${xrdb:color7:#222}
|
||||
foreground = #dfdfdf
|
||||
foreground-alt = #555
|
||||
primary = #ffb52a
|
||||
secondary = #e60053
|
||||
alert = #bd2c40
|
||||
|
||||
[bar/example]
|
||||
;monitor = ${env:MONITOR:HDMI-1}
|
||||
width = 100%
|
||||
height = 27
|
||||
;offset-x = 1%
|
||||
;offset-y = 1%
|
||||
radius = 6.0
|
||||
fixed-center = false
|
||||
|
||||
background = ${colors.background}
|
||||
foreground = ${colors.foreground}
|
||||
|
||||
line-size = 3
|
||||
line-color = #f00
|
||||
|
||||
border-size = 0
|
||||
border-color = #00000000
|
||||
|
||||
padding-left = 15
|
||||
padding-right = 15
|
||||
|
||||
module-margin-left = 1
|
||||
module-margin-right = 2
|
||||
|
||||
font-0 = fixed:pixelsize=10;1
|
||||
font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
|
||||
font-2 = siji:pixelsize=10;1
|
||||
|
||||
modules-left = bspwm i3
|
||||
modules-center = mpd
|
||||
modules-right = filesystem xbacklight alsa pulseaudio xkeyboard memory cpu wlan eth battery temperature powermenu date
|
||||
|
||||
tray-position = right
|
||||
tray-padding = 2
|
||||
tray-background = #0063ff
|
||||
|
||||
;wm-restack = bspwm
|
||||
;wm-restack = i3
|
||||
|
||||
;override-redirect = true
|
||||
|
||||
;scroll-up = bspwm-desknext
|
||||
;scroll-down = bspwm-deskprev
|
||||
|
||||
scroll-up = i3wm-wsnext
|
||||
scroll-down = i3wm-wsprev
|
||||
|
||||
cursor-click = pointer
|
||||
cursor-scroll = ns-resize
|
||||
|
||||
[module/xwindow]
|
||||
type = internal/xwindow
|
||||
label = %title:0:30:...%
|
||||
|
||||
[module/xkeyboard]
|
||||
type = internal/xkeyboard
|
||||
blacklist-0 = num lock
|
||||
|
||||
format-prefix = " "
|
||||
format-prefix-foreground = ${colors.foreground-alt}
|
||||
format-prefix-underline = ${colors.secondary}
|
||||
|
||||
label-layout = %layout%
|
||||
label-layout-underline = ${colors.secondary}
|
||||
|
||||
label-indicator-padding = 2
|
||||
label-indicator-margin = 1
|
||||
label-indicator-background = ${colors.secondary}
|
||||
label-indicator-underline = ${colors.secondary}
|
||||
|
||||
[module/filesystem]
|
||||
type = internal/fs
|
||||
interval = 25
|
||||
|
||||
mount-0 = /
|
||||
|
||||
label-mounted = %{F#0a81f5}%mountpoint%%{F-}: %percentage_used%%
|
||||
label-unmounted = %mountpoint% not mounted
|
||||
label-unmounted-foreground = ${colors.foreground-alt}
|
||||
|
||||
[module/bspwm]
|
||||
type = internal/bspwm
|
||||
|
||||
label-focused = %index%
|
||||
label-focused-background = ${colors.background-alt}
|
||||
label-focused-underline= ${colors.primary}
|
||||
label-focused-padding = 2
|
||||
|
||||
label-occupied = %index%
|
||||
label-occupied-padding = 2
|
||||
|
||||
label-urgent = %index%!
|
||||
label-urgent-background = ${colors.alert}
|
||||
label-urgent-padding = 2
|
||||
|
||||
label-empty = %index%
|
||||
label-empty-foreground = ${colors.foreground-alt}
|
||||
label-empty-padding = 2
|
||||
|
||||
; Separator in between workspaces
|
||||
; label-separator = |
|
||||
|
||||
[module/i3]
|
||||
type = internal/i3
|
||||
format = <label-state> <label-mode>
|
||||
index-sort = true
|
||||
wrapping-scroll = false
|
||||
|
||||
; Only show workspaces on the same output as the bar
|
||||
;pin-workspaces = true
|
||||
|
||||
label-mode-padding = 2
|
||||
label-mode-foreground = #000
|
||||
label-mode-background = ${colors.primary}
|
||||
|
||||
; focused = Active workspace on focused monitor
|
||||
label-focused = %index%
|
||||
label-focused-background = ${colors.background-alt}
|
||||
label-focused-underline= ${colors.primary}
|
||||
label-focused-padding = 2
|
||||
|
||||
; unfocused = Inactive workspace on any monitor
|
||||
label-unfocused = %index%
|
||||
label-unfocused-padding = 2
|
||||
|
||||
; visible = Active workspace on unfocused monitor
|
||||
label-visible = %index%
|
||||
label-visible-background = ${self.label-focused-background}
|
||||
label-visible-underline = ${self.label-focused-underline}
|
||||
label-visible-padding = ${self.label-focused-padding}
|
||||
|
||||
; urgent = Workspace with urgency hint set
|
||||
label-urgent = %index%
|
||||
label-urgent-background = ${colors.alert}
|
||||
label-urgent-padding = 2
|
||||
|
||||
; Separator in between workspaces
|
||||
; label-separator = |
|
||||
|
||||
|
||||
[module/mpd]
|
||||
type = internal/mpd
|
||||
format-online = <label-song> <icon-prev> <icon-stop> <toggle> <icon-next>
|
||||
|
||||
icon-prev =
|
||||
icon-stop =
|
||||
icon-play =
|
||||
icon-pause =
|
||||
icon-next =
|
||||
|
||||
label-song-maxlen = 25
|
||||
label-song-ellipsis = true
|
||||
|
||||
[module/xbacklight]
|
||||
type = internal/xbacklight
|
||||
|
||||
format = <label> <bar>
|
||||
label = BL
|
||||
|
||||
bar-width = 10
|
||||
bar-indicator = |
|
||||
bar-indicator-foreground = #fff
|
||||
bar-indicator-font = 2
|
||||
bar-fill = ─
|
||||
bar-fill-font = 2
|
||||
bar-fill-foreground = #9f78e1
|
||||
bar-empty = ─
|
||||
bar-empty-font = 2
|
||||
bar-empty-foreground = ${colors.foreground-alt}
|
||||
|
||||
[module/backlight-acpi]
|
||||
inherit = module/xbacklight
|
||||
type = internal/backlight
|
||||
card = intel_backlight
|
||||
|
||||
[module/cpu]
|
||||
type = internal/cpu
|
||||
interval = 2
|
||||
format-prefix = " "
|
||||
format-prefix-foreground = ${colors.foreground-alt}
|
||||
format-underline = #f90000
|
||||
label = %percentage:2%%
|
||||
|
||||
[module/memory]
|
||||
type = internal/memory
|
||||
interval = 2
|
||||
format-prefix = " "
|
||||
format-prefix-foreground = ${colors.foreground-alt}
|
||||
format-underline = #4bffdc
|
||||
label = %percentage_used%%
|
||||
|
||||
[module/wlan]
|
||||
type = internal/network
|
||||
interface = wlp0s29u1u1
|
||||
interval = 3.0
|
||||
|
||||
format-connected = <ramp-signal> <label-connected>
|
||||
format-connected-underline = #9f78e1
|
||||
label-connected = %essid%
|
||||
|
||||
format-disconnected =
|
||||
;format-disconnected = <label-disconnected>
|
||||
;format-disconnected-underline = ${self.format-connected-underline}
|
||||
;label-disconnected = %ifname% disconnected
|
||||
;label-disconnected-foreground = ${colors.foreground-alt}
|
||||
|
||||
ramp-signal-0 =
|
||||
ramp-signal-1 =
|
||||
ramp-signal-2 =
|
||||
ramp-signal-3 =
|
||||
ramp-signal-4 =
|
||||
ramp-signal-foreground = ${colors.foreground-alt}
|
||||
|
||||
[module/eth]
|
||||
type = internal/network
|
||||
interface = enp6s0
|
||||
interval = 3.0
|
||||
|
||||
format-connected-underline = #55aa55
|
||||
format-connected-prefix = " "
|
||||
format-connected-prefix-foreground = ${colors.foreground-alt}
|
||||
label-connected = %local_ip%
|
||||
|
||||
format-disconnected =
|
||||
;format-disconnected = <label-disconnected>
|
||||
;format-disconnected-underline = ${self.format-connected-underline}
|
||||
;label-disconnected = %ifname% disconnected
|
||||
;label-disconnected-foreground = ${colors.foreground-alt}
|
||||
|
||||
[module/date]
|
||||
type = internal/date
|
||||
interval = 5
|
||||
|
||||
date =
|
||||
date-alt = " %Y-%m-%d"
|
||||
|
||||
time = %H:%M
|
||||
time-alt = %H:%M:%S
|
||||
|
||||
format-prefix =
|
||||
format-prefix-foreground = ${colors.foreground-alt}
|
||||
format-underline = #0a6cf5
|
||||
|
||||
label = %date% %time%
|
||||
|
||||
[module/pulseaudio]
|
||||
type = internal/pulseaudio
|
||||
|
||||
format-volume = <label-volume> <bar-volume>
|
||||
label-volume = VOL %percentage%%
|
||||
label-volume-foreground = ${root.foreground}
|
||||
|
||||
label-muted = 🔇 muted
|
||||
label-muted-foreground = #666
|
||||
|
||||
bar-volume-width = 10
|
||||
bar-volume-foreground-0 = #55aa55
|
||||
bar-volume-foreground-1 = #55aa55
|
||||
bar-volume-foreground-2 = #55aa55
|
||||
bar-volume-foreground-3 = #55aa55
|
||||
bar-volume-foreground-4 = #55aa55
|
||||
bar-volume-foreground-5 = #f5a70a
|
||||
bar-volume-foreground-6 = #ff5555
|
||||
bar-volume-gradient = false
|
||||
bar-volume-indicator = |
|
||||
bar-volume-indicator-font = 2
|
||||
bar-volume-fill = ─
|
||||
bar-volume-fill-font = 2
|
||||
bar-volume-empty = ─
|
||||
bar-volume-empty-font = 2
|
||||
bar-volume-empty-foreground = ${colors.foreground-alt}
|
||||
|
||||
[module/alsa]
|
||||
type = internal/alsa
|
||||
|
||||
format-volume = <label-volume> <bar-volume>
|
||||
label-volume = VOL
|
||||
label-volume-foreground = ${root.foreground}
|
||||
|
||||
format-muted-prefix = " "
|
||||
format-muted-foreground = ${colors.foreground-alt}
|
||||
label-muted = sound muted
|
||||
|
||||
bar-volume-width = 10
|
||||
bar-volume-foreground-0 = #55aa55
|
||||
bar-volume-foreground-1 = #55aa55
|
||||
bar-volume-foreground-2 = #55aa55
|
||||
bar-volume-foreground-3 = #55aa55
|
||||
bar-volume-foreground-4 = #55aa55
|
||||
bar-volume-foreground-5 = #f5a70a
|
||||
bar-volume-foreground-6 = #ff5555
|
||||
bar-volume-gradient = false
|
||||
bar-volume-indicator = |
|
||||
bar-volume-indicator-font = 2
|
||||
bar-volume-fill = ─
|
||||
bar-volume-fill-font = 2
|
||||
bar-volume-empty = ─
|
||||
bar-volume-empty-font = 2
|
||||
bar-volume-empty-foreground = ${colors.foreground-alt}
|
||||
|
||||
[module/battery]
|
||||
type = internal/battery
|
||||
battery = BAT0
|
||||
adapter = ADP1
|
||||
full-at = 98
|
||||
|
||||
format-charging = <animation-charging> <label-charging>
|
||||
format-charging-underline = #ffb52a
|
||||
|
||||
format-discharging = <animation-discharging> <label-discharging>
|
||||
format-discharging-underline = ${self.format-charging-underline}
|
||||
|
||||
format-full-prefix = " "
|
||||
format-full-prefix-foreground = ${colors.foreground-alt}
|
||||
format-full-underline = ${self.format-charging-underline}
|
||||
|
||||
ramp-capacity-0 =
|
||||
ramp-capacity-1 =
|
||||
ramp-capacity-2 =
|
||||
ramp-capacity-foreground = ${colors.foreground-alt}
|
||||
|
||||
animation-charging-0 =
|
||||
animation-charging-1 =
|
||||
animation-charging-2 =
|
||||
animation-charging-foreground = ${colors.foreground-alt}
|
||||
animation-charging-framerate = 750
|
||||
|
||||
animation-discharging-0 =
|
||||
animation-discharging-1 =
|
||||
animation-discharging-2 =
|
||||
animation-discharging-foreground = ${colors.foreground-alt}
|
||||
animation-discharging-framerate = 750
|
||||
|
||||
[module/temperature]
|
||||
type = internal/temperature
|
||||
thermal-zone = 0
|
||||
warn-temperature = 60
|
||||
|
||||
format = <ramp> <label>
|
||||
format-underline = #f50a4d
|
||||
format-warn = <ramp> <label-warn>
|
||||
format-warn-underline = ${self.format-underline}
|
||||
|
||||
label = %temperature-c%
|
||||
label-warn = %temperature-c%
|
||||
label-warn-foreground = ${colors.secondary}
|
||||
|
||||
ramp-0 =
|
||||
ramp-1 =
|
||||
ramp-2 =
|
||||
ramp-foreground = ${colors.foreground-alt}
|
||||
|
||||
[module/powermenu]
|
||||
type = custom/menu
|
||||
|
||||
expand-right = true
|
||||
|
||||
format-spacing = 1
|
||||
|
||||
label-open =
|
||||
label-open-foreground = ${colors.secondary}
|
||||
label-close = cancel
|
||||
label-close-foreground = ${colors.secondary}
|
||||
label-separator = |
|
||||
label-separator-foreground = ${colors.foreground-alt}
|
||||
|
||||
menu-0-0 = reboot
|
||||
menu-0-0-exec = menu-open-1
|
||||
menu-0-1 = power off
|
||||
menu-0-1-exec = menu-open-2
|
||||
|
||||
menu-1-0 = cancel
|
||||
menu-1-0-exec = menu-open-0
|
||||
menu-1-1 = reboot
|
||||
menu-1-1-exec = sudo reboot
|
||||
|
||||
menu-2-0 = power off
|
||||
menu-2-0-exec = sudo poweroff
|
||||
menu-2-1 = cancel
|
||||
menu-2-1-exec = menu-open-0
|
||||
|
||||
[settings]
|
||||
screenchange-reload = true
|
||||
;compositing-background = xor
|
||||
;compositing-background = screen
|
||||
;compositing-foreground = source
|
||||
;compositing-border = over
|
||||
;pseudo-transparency = false
|
||||
|
||||
[global/wm]
|
||||
margin-top = 5
|
||||
margin-bottom = 5
|
||||
21
polybar/.config/polybar/scripts/poly-archupdates
Executable file
21
polybar/.config/polybar/scripts/poly-archupdates
Executable file
|
|
@ -0,0 +1,21 @@
|
|||
#!/bin/sh
|
||||
|
||||
if ! updates_arch=$(yay -Qun 2>/dev/null | wc -l); then
|
||||
updates_arch=0
|
||||
fi
|
||||
|
||||
if ! updates_aur=$(yay -Qum 2>/dev/null | wc -l); then
|
||||
# if ! updates_aur=$(cower -u 2> /dev/null | wc -l); then
|
||||
# if ! updates_aur=$(trizen -Su --aur --quiet | wc -l); then
|
||||
# if ! updates_aur=$(pikaur -Qua 2> /dev/null | wc -l); then
|
||||
# if ! updates_aur=$(rua upgrade --printonly 2> /dev/null | wc -l); then
|
||||
updates_aur=0
|
||||
fi
|
||||
|
||||
updates=$(("$updates_arch" + "$updates_aur"))
|
||||
|
||||
if [ "$updates" -gt 0 ]; then
|
||||
echo "$updates"
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
11
polybar/.config/polybar/scripts/poly-mprisdisplay
Executable file
11
polybar/.config/polybar/scripts/poly-mprisdisplay
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
player_status=$(playerctl status 2>/dev/null)
|
||||
|
||||
if [ "$player_status" = "Playing" ]; then
|
||||
echo "ﱘ $(playerctl metadata artist) - $(playerctl metadata title)"
|
||||
elif [ "$player_status" = "Paused" ]; then
|
||||
echo " $(playerctl metadata artist) - $(playerctl metadata title)"
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
83
polybar/.config/polybar/scripts/poly-networkspeed
Executable file
83
polybar/.config/polybar/scripts/poly-networkspeed
Executable file
|
|
@ -0,0 +1,83 @@
|
|||
#!/bin/bash
|
||||
|
||||
INTERVAL=3
|
||||
# interfaces for desktop and laptop
|
||||
INTERFACES="enp6s0 wlp0s29u1u1 wlp56s0"
|
||||
|
||||
print_bytes() {
|
||||
if [ "$1" -eq 0 ] || [ "$1" -lt 1000 ]; then
|
||||
bytes="0"
|
||||
elif [ "$1" -lt 1000000 ]; then
|
||||
bytes="$(echo "scale=0;$1/1000" | bc -l)k"
|
||||
else
|
||||
bytes="$(echo "scale=1;$1/1000000" | bc -l)M"
|
||||
fi
|
||||
|
||||
echo "$bytes"
|
||||
}
|
||||
|
||||
print_bit() {
|
||||
if [ "$1" -eq 0 ] || [ "$1" -lt 10 ]; then
|
||||
bit="0 B"
|
||||
elif [ "$1" -lt 100 ]; then
|
||||
bit="$(echo "scale=0;$1*8" | bc -l) B"
|
||||
elif [ "$1" -lt 100000 ]; then
|
||||
bit="$(echo "scale=0;$1*8/1000" | bc -l) K"
|
||||
else
|
||||
bit="$(echo "scale=1;$1*8/1000000" | bc -l) M"
|
||||
fi
|
||||
|
||||
echo "$bit"
|
||||
}
|
||||
|
||||
declare -A bytes
|
||||
|
||||
get_initial_throughput() {
|
||||
for interface in $INTERFACES; do
|
||||
|
||||
local dir="/sys/class/net/$interface"
|
||||
if [ -d "$dir" ]; then
|
||||
bytes[past_rx_$interface]="$(cat "$dir"/statistics/rx_bytes)"
|
||||
bytes[past_tx_$interface]="$(cat "$dir"/statistics/tx_bytes)"
|
||||
fi
|
||||
|
||||
done
|
||||
}
|
||||
|
||||
get_throughput() {
|
||||
while true; do
|
||||
down=0
|
||||
up=0
|
||||
|
||||
for interface in $INTERFACES; do
|
||||
local dir="/sys/class/net/$interface"
|
||||
if [ -d "$dir" ]; then
|
||||
bytes[now_rx_$interface]="$(cat "$dir"/statistics/rx_bytes)"
|
||||
bytes[now_tx_$interface]="$(cat "$dir"/statistics/tx_bytes)"
|
||||
|
||||
bytes_down=$((((${bytes[now_rx_$interface]} - ${bytes[past_rx_$interface]})) / INTERVAL))
|
||||
bytes_up=$((((${bytes[now_tx_$interface]} - ${bytes[past_tx_$interface]})) / INTERVAL))
|
||||
|
||||
down=$(((("$down" + "$bytes_down"))))
|
||||
up=$(((("$up" + "$bytes_up"))))
|
||||
|
||||
bytes[past_rx_$interface]=${bytes[now_rx_$interface]}
|
||||
bytes[past_tx_$interface]=${bytes[now_tx_$interface]}
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$down" -gt 1000 ] || [ "$up" -gt 1000 ]; then
|
||||
echo " $(print_bytes $down) 祝$(print_bytes $up)"
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
|
||||
# echo "Download: $(print_bytes $down) / Upload: $(print_bytes $up)"
|
||||
# echo "Download: $(print_bit $down) / Upload: $(print_bit $up)"
|
||||
|
||||
sleep $INTERVAL
|
||||
done
|
||||
}
|
||||
|
||||
get_initial_throughput
|
||||
get_throughput
|
||||
Loading…
Add table
Add a link
Reference in a new issue