Populate dotfiles repository
This commit is contained in:
26
polybar/.config/polybar/battery.sh
Executable file
26
polybar/.config/polybar/battery.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
color8="#88C0D0"
|
||||
|
||||
icon(){
|
||||
printf "%s\\n" "%{F${color8}}${1}%{F}"
|
||||
}
|
||||
|
||||
icon2() {
|
||||
printf "%s\\n" "%{F${color11:-#F0F0F0}}${1}%{F}"
|
||||
}
|
||||
|
||||
status=$(acpiconf -i 0 | grep State | cut -c 10-)
|
||||
capacity=$(acpiconf -i 0 | grep % | cut -f2 | cut -c -4 | sed s/%//)
|
||||
|
||||
if [ "$status" == "charging" ]; then
|
||||
printf "%s\\n" "$(icon "") ${capacity}%"
|
||||
elif [ "$status" == "high" ]; then
|
||||
printf "%s\\n" "$(icon "") ${capacity}%"
|
||||
elif (("$capacity" <= "20")); then
|
||||
printf "%s\\n" "$(icon2 "") ${capacity}%"
|
||||
elif (("$capacity" <= "60")); then
|
||||
printf "%s\\n" "$(icon "") ${capacity}%"
|
||||
elif (("$capacity" <= "100")); then
|
||||
printf "%s\\n" "$(icon "") ${capacity}%"
|
||||
fi
|
||||
121
polybar/.config/polybar/config
Normal file
121
polybar/.config/polybar/config
Normal file
@@ -0,0 +1,121 @@
|
||||
[colors]
|
||||
foreground-alt = #D8DEE9
|
||||
icon = #88C0D0
|
||||
|
||||
[bar/main]
|
||||
monitor = eDP-1
|
||||
height = 20
|
||||
width = 100%
|
||||
|
||||
background = #211B29
|
||||
foreground = ${colors.foreground-alt}
|
||||
underline-color = #00f
|
||||
underline-size = 1
|
||||
overline-color = #f00
|
||||
|
||||
spacing = 2
|
||||
padding-right = 2
|
||||
module-margin-right = 2
|
||||
module-margin-left = 2
|
||||
|
||||
;override-redirect = true
|
||||
|
||||
font-0 = lime:size=7;0
|
||||
font-1 = Siji:size=10;0
|
||||
|
||||
modules-left = workspaces
|
||||
modules-center = date
|
||||
modules-right = mpd wifi vol bat
|
||||
|
||||
[module/title]
|
||||
type = internal/xwindow
|
||||
label = %title%
|
||||
label-maxlen = 50
|
||||
|
||||
[module/mail]
|
||||
type = custom/script
|
||||
format-prefix =" "
|
||||
exec = python3 ~/.scripts/mail
|
||||
interval = 100
|
||||
format-foreground = ${colors.foreground-alt}
|
||||
|
||||
[module/mpd]
|
||||
type = internal/mpd
|
||||
host = /home/coolneng/.mpd/socket
|
||||
|
||||
format-online = <icon-play> <icon-pause> <label-song>
|
||||
format-offline = <label-offline>
|
||||
label-song = %title%
|
||||
label-offline =
|
||||
icon-play =
|
||||
icon-pause =
|
||||
icon-play-foreground = ${colors.icon}
|
||||
icon-pause-foreground = ${colors.icon}
|
||||
|
||||
interval = 2
|
||||
|
||||
[module/date]
|
||||
type = internal/date
|
||||
|
||||
; Seconds to sleep between updates
|
||||
interval = 1.0
|
||||
|
||||
; See "man date" for details on how to format the date string
|
||||
; NOTE: if you want to use syntax tags here you need to use %%{...}
|
||||
date = %a %d %b
|
||||
|
||||
; 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
|
||||
;time-alt = %H:%M:%S
|
||||
|
||||
; Available tags:
|
||||
; <label> (default)
|
||||
format = <label>
|
||||
|
||||
; Available tokens:
|
||||
; %date%
|
||||
; %time%
|
||||
; Default: %date%
|
||||
label = %date% %time%
|
||||
format-foreground = ${colors.foreground-alt}
|
||||
|
||||
[module/workspaces]
|
||||
type = internal/xworkspaces
|
||||
pin-workspaces = false
|
||||
enable-click = false
|
||||
enable-scroll = false
|
||||
format-padding = 0
|
||||
;icon-0 = 1
|
||||
;icon-1 = 2
|
||||
;icon-2 = 3
|
||||
;icon-3 = 4
|
||||
;icon-default =
|
||||
format = <label-state>
|
||||
; active
|
||||
label-active = %name%
|
||||
label-active-padding = 1
|
||||
label-active-foreground = ${colors.icon}
|
||||
label-active-underline = ${colors.icon}
|
||||
; empty
|
||||
label-empty = %name%
|
||||
label-empty-padding = 1
|
||||
label-empty-foreground = ${colors.foreground-alt}
|
||||
|
||||
[module/vol]
|
||||
type = custom/script
|
||||
exec = ~/.config/polybar/volume.sh
|
||||
interval = 2
|
||||
|
||||
[module/bat]
|
||||
type = custom/script
|
||||
exec = ~/.config/polybar/battery.sh
|
||||
interval = 2
|
||||
|
||||
[module/wifi]
|
||||
type = custom/script
|
||||
exec = ~/.config/polybar/wifi.sh
|
||||
interval = 2
|
||||
18
polybar/.config/polybar/volume.sh
Executable file
18
polybar/.config/polybar/volume.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
color8="#88C0D0"
|
||||
|
||||
icon(){
|
||||
printf "%s\\n" "%{F${color8}}${1}%{F}"
|
||||
}
|
||||
|
||||
volume="$(mixer vol | cut -c 36- | cut -c -3)"
|
||||
|
||||
case "$volume" in
|
||||
0|[0-9]) vol_icon=" " ;;
|
||||
1?|2?|3?) vol_icon="" ;;
|
||||
4?|5?|6?) vol_icon="" ;;
|
||||
*) vol_icon="" ;;
|
||||
esac
|
||||
|
||||
printf "%s\\n" "$(icon "$vol_icon") ${volume}%"
|
||||
11
polybar/.config/polybar/wifi.sh
Executable file
11
polybar/.config/polybar/wifi.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
color8="#88C0D0"
|
||||
icon(){
|
||||
printf "%s\\n" "%{F${color8}}${1}%{F}"
|
||||
}
|
||||
|
||||
wifi="$(echo -e $(wpa_cli status | grep ssid | awk 'NR==2{print $1}' | cut -c 6-))"
|
||||
wifi_icon=""
|
||||
|
||||
printf "%s\\n" "$(icon "$wifi_icon") ${wifi}"
|
||||
Reference in New Issue
Block a user