nix: Make nix the root
Which means now I'll have to think about real prefixes in commit names.
This commit is contained in:
parent
550eed06e0
commit
ee178b7d57
190 changed files with 5 additions and 6 deletions
11
unprocessed/config/polybar/bars.ini
Normal file
11
unprocessed/config/polybar/bars.ini
Normal file
|
@ -0,0 +1,11 @@
|
|||
[bar/base]
|
||||
monitor = ${env:display}
|
||||
bottom = true
|
||||
|
||||
[bar/primary]
|
||||
inherit = bar/base
|
||||
modules-right = date
|
||||
|
||||
[bar/secondary]
|
||||
inherit = bar/base
|
||||
modules-right = date
|
18
unprocessed/config/polybar/bbswitch
Executable file
18
unprocessed/config/polybar/bbswitch
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if [ -f /proc/acpi/bbswitch ]
|
||||
then
|
||||
echo -n
|
||||
state="$(grep -o '\w\+$' /proc/acpi/bbswitch)"
|
||||
if [ "$state" == "ON" ]
|
||||
then
|
||||
echo ""
|
||||
elif [ "$state" == "OFF" ]
|
||||
then
|
||||
echo ""
|
||||
else
|
||||
echo "?"
|
||||
fi
|
||||
else
|
||||
echo
|
||||
fi
|
390
unprocessed/config/polybar/config
Normal file
390
unprocessed/config/polybar/config
Normal file
|
@ -0,0 +1,390 @@
|
|||
;=====================================================
|
||||
;
|
||||
; To learn more about how to configure Polybar
|
||||
; go to https://github.com/jaagr/polybar
|
||||
;
|
||||
; The README contains alot of information
|
||||
;
|
||||
;=====================================================
|
||||
|
||||
[theme]
|
||||
foreground = #f1ebeb
|
||||
background = #272822
|
||||
blackB = #48483e
|
||||
blackF = #76715e
|
||||
redB = #dc2566
|
||||
redF = #fa2772
|
||||
greenB = #8fc029
|
||||
greenF = #a7e22e
|
||||
yellowB = #d4c96e
|
||||
yellowF = #e7db75
|
||||
blueB = #55bcce
|
||||
blueF = #66d9ee
|
||||
magentaB = #9358fe
|
||||
magentaF = #ae82ff
|
||||
cyanB = #56b7a5
|
||||
cyanF = #66efd5
|
||||
whiteB = #acada1
|
||||
whiteF = #cfd0c2
|
||||
|
||||
[colors]
|
||||
background = ${theme.blackB}
|
||||
foreground = ${theme.foreground}
|
||||
|
||||
[bar/base]
|
||||
monitor = ${env:display:LVDS1}
|
||||
width = 100%
|
||||
height = 20
|
||||
fixed-center = false
|
||||
|
||||
background = ${colors.background}
|
||||
foreground = ${colors.foreground}
|
||||
|
||||
line-size = 0
|
||||
|
||||
border-size = 0
|
||||
border-color = ${colors.background}
|
||||
|
||||
padding-left = 2
|
||||
padding-right = 2
|
||||
|
||||
module-margin-left = 1
|
||||
module-margin-right = 1
|
||||
|
||||
font-0 = "DejaVu Sans:size=10;0"
|
||||
font-1 = "DejaVuSansMono Nerd Font Mono:pixelsize=10;0"
|
||||
|
||||
modules-left = i3
|
||||
|
||||
;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
|
||||
|
||||
bottom = true
|
||||
|
||||
enable-ipc = true
|
||||
|
||||
[bar/primary]
|
||||
inherit = bar/base
|
||||
|
||||
modules-center = mpd
|
||||
; modules-right = cpu memory temperature mail todo vpncheck eth wlan bbswitch xbacklight volume battery shortdate
|
||||
modules-right = cpu memory temperature mail vpncheck eth wlan bbswitch xbacklight volume battery shortdate
|
||||
|
||||
tray-position = right
|
||||
tray-padding = 2
|
||||
tray-transparent = false
|
||||
|
||||
[bar/secondary]
|
||||
inherit = bar/base
|
||||
modules-right = cpu memory temperature keystore vpncheck ethMore wlanMore filesystem linuxmismatch bbswitch xbacklight volume date
|
||||
|
||||
|
||||
[module/filesystem]
|
||||
type = internal/fs
|
||||
interval = 25
|
||||
|
||||
mount-0 = /
|
||||
mount-1 = /home
|
||||
|
||||
label-mounted-foreground = ${theme.magentaB}
|
||||
label-mounted = %{F#ae81ff}%mountpoint%%{F-} %free%
|
||||
label-unmounted =
|
||||
|
||||
[module/i3]
|
||||
type = internal/i3
|
||||
pin-workspaces = true
|
||||
strip-wsnumbers = false
|
||||
index-sort = true
|
||||
enable-click = true
|
||||
enable-scroll = true
|
||||
wrapping-scroll = false
|
||||
reverse-scroll = true
|
||||
fuzzy-match = false
|
||||
|
||||
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 = ?
|
||||
|
||||
format = <label-state> <label-mode>
|
||||
|
||||
label-mode = %mode%
|
||||
label-mode-padding = 2
|
||||
label-mode-background = ${theme.redB}
|
||||
|
||||
label-focused = %index% %icon%
|
||||
label-focused-foreground = ${theme.background}
|
||||
label-focused-background = ${theme.greenB}
|
||||
label-focused-padding = 2
|
||||
|
||||
label-unfocused = ${self.label-focused}
|
||||
label-unfocused-padding = ${self.label-focused-padding}
|
||||
|
||||
label-visible = ${self.label-focused}
|
||||
label-visible-padding = ${self.label-focused-padding}
|
||||
label-visible-foreground = ${theme.greenF}
|
||||
|
||||
label-urgent = ${self.label-focused}
|
||||
label-urgent-padding = ${self.label-focused-padding}
|
||||
label-urgent-foreground = ${theme.foreground}
|
||||
label-urgent-background = ${theme.redB}
|
||||
|
||||
[module/mpd]
|
||||
type = internal/mpd
|
||||
; format-online = <icon-prev> <icon-seekb> <icon-stop> <toggle> <icon-seekf> <icon-next> <icon-repeat> <icon-random> <bar-progress> <label-time> <label-song>
|
||||
format-online = <icon-prev> <icon-seekb> <icon-stop> <toggle> <icon-seekf> <icon-next> <icon-repeat> <icon-random> <label-time> <label-song>
|
||||
format-playing = ${self.format-online}
|
||||
format-paused = ${self.format-online}
|
||||
format-stopped = <toggle>
|
||||
|
||||
label-song = %title% - %artist%
|
||||
label-song-maxlen = 35
|
||||
label-song-ellipsis = true
|
||||
|
||||
label-time = %elapsed%/%total%
|
||||
|
||||
label-offline =
|
||||
|
||||
icon-play =
|
||||
icon-pause =
|
||||
icon-stop =
|
||||
icon-prev =
|
||||
icon-next =
|
||||
icon-seekb =
|
||||
icon-seekf =
|
||||
icon-random =
|
||||
icon-repeat =
|
||||
icon-repeatone = 1
|
||||
|
||||
toggle-on-foreground = ${theme.foreground}
|
||||
toggle-off-foreground = #55
|
||||
|
||||
[module/bbswitch]
|
||||
type = custom/script
|
||||
exec = ~/.config/polybar/bbswitch
|
||||
interval = 5
|
||||
format-foreground = ${theme.redF}
|
||||
|
||||
[module/todo]
|
||||
type = custom/script
|
||||
exec = ~/.config/polybar/todo
|
||||
interval = 30
|
||||
format-prefix =
|
||||
format-foreground = ${theme.yellowF}
|
||||
|
||||
[module/mail]
|
||||
type = custom/script
|
||||
exec = cat ~/.cache/mutt/status
|
||||
interval = 1
|
||||
format-prefix =
|
||||
format-foreground = ${theme.magentaF}
|
||||
; format-background = ${theme.magentaB}
|
||||
|
||||
[module/linuxmismatch]
|
||||
type = custom/script
|
||||
exec = echo
|
||||
exec-if = ~/.config/polybar/linuxmismatch
|
||||
interval = 30
|
||||
format-foreground = ${theme.yellowF}
|
||||
; format-background = ${theme.yellowF}
|
||||
|
||||
[module/xbacklight]
|
||||
type = internal/xbacklight
|
||||
output = ${env:display:LVDS1}
|
||||
enable-scroll = true
|
||||
format = <ramp>
|
||||
ramp-0 = 🌕
|
||||
ramp-1 = 🌔
|
||||
ramp-2 = 🌓
|
||||
ramp-3 = 🌒
|
||||
ramp-4 = 🌑
|
||||
format-foreground = ${theme.redF}
|
||||
|
||||
[module/backlight-acpi]
|
||||
inherit = module/xbacklight
|
||||
type = internal/backlight
|
||||
card = intel_backlight
|
||||
|
||||
[module/cpu]
|
||||
type = internal/cpu
|
||||
interval = 1
|
||||
format = <ramp-coreload>
|
||||
format-foreground = ${theme.redF}
|
||||
ramp-coreload-0 = ▁
|
||||
ramp-coreload-1 = ▂
|
||||
ramp-coreload-2 = ▃
|
||||
ramp-coreload-3 = ▄
|
||||
ramp-coreload-4 = ▅
|
||||
ramp-coreload-5 = ▆
|
||||
ramp-coreload-6 = ▇
|
||||
ramp-coreload-7 = █
|
||||
|
||||
[module/memory]
|
||||
type = internal/memory
|
||||
interval = 1
|
||||
format-foreground = ${theme.greenF}
|
||||
label = %gb_free%
|
||||
|
||||
[module/keystore]
|
||||
type = custom/script
|
||||
exec = ~/.config/polybar/keystore
|
||||
; exec-if = pgrep openvpn
|
||||
interval = 5
|
||||
format-foreground = ${theme.greenF}
|
||||
|
||||
[module/vpncheck]
|
||||
type = custom/script
|
||||
exec = echo
|
||||
exec-if = pgrep openvpn
|
||||
interval = 5
|
||||
format-foreground = ${theme.blueF}
|
||||
|
||||
[module/eth]
|
||||
type = internal/network
|
||||
interface = ${env:ethI:eth0}
|
||||
interval = 5
|
||||
|
||||
format-connected = <label-connected>
|
||||
label-connected = %local_ip%
|
||||
format-connected-foreground = ${theme.blueF}
|
||||
|
||||
format-disconnected =
|
||||
|
||||
[module/ethMore]
|
||||
inherit = module/eth
|
||||
label-connected = ↑%upspeed% ↓%downspeed%
|
||||
|
||||
[module/wlan]
|
||||
type = internal/network
|
||||
interface = ${env:wlanI:wlan0}
|
||||
interval = 5
|
||||
|
||||
format-connected = <ramp-signal> <label-connected>
|
||||
label-connected = %local_ip% %essid%
|
||||
format-connected-foreground = ${theme.cyanF}
|
||||
|
||||
format-disconnected =
|
||||
|
||||
ramp-signal-0 = ▁
|
||||
ramp-signal-1 = ▂
|
||||
ramp-signal-2 = ▃
|
||||
ramp-signal-3 = ▄
|
||||
ramp-signal-4 = ▅
|
||||
ramp-signal-5 = ▆
|
||||
ramp-signal-6 = ▇
|
||||
ramp-signal-7 = █
|
||||
|
||||
animation-packetloss-0 =
|
||||
animation-packetloss-1 =
|
||||
animation-packetloss-framerate = 500
|
||||
|
||||
[module/wlanMore]
|
||||
inherit = module/wlan
|
||||
label-connected = ↑%upspeed% ↓%downspeed%
|
||||
|
||||
[module/date]
|
||||
type = internal/date
|
||||
interval = 1
|
||||
|
||||
date = " %d/%m/%Y"
|
||||
time = %H:%M:%S
|
||||
|
||||
format = <label>
|
||||
format-foreground = ${theme.cyanF}
|
||||
|
||||
label = %date% %time%
|
||||
|
||||
[module/shortdate]
|
||||
inherit = module/date
|
||||
date = " %d/%m"
|
||||
|
||||
|
||||
[module/volume]
|
||||
type = internal/volume
|
||||
|
||||
master-soundcard = default
|
||||
format-volume = <ramp-volume> <label-volume>
|
||||
format-volume-foreground = ${theme.greenF}
|
||||
|
||||
label-muted =
|
||||
label-muted-foreground = #66
|
||||
format-muted-foreground = ${self.format-volume-foreground}
|
||||
|
||||
ramp-volume-0 =
|
||||
ramp-volume-1 =
|
||||
ramp-volume-2 =
|
||||
|
||||
[module/battery]
|
||||
type = internal/battery
|
||||
battery = BAT0
|
||||
adapter = ADP0
|
||||
full-at = 100
|
||||
time-format = %H:%M
|
||||
|
||||
label-full =
|
||||
|
||||
format-charging = <ramp-capacity> <label-charging>
|
||||
format-charging-foreground = ${theme.yellowF}
|
||||
format-charging-prefix =
|
||||
label-charging = %percentage%% (%time%)
|
||||
|
||||
format-discharging = <ramp-capacity> <label-discharging>
|
||||
format-discharging-foreground = ${self.format-charging-foreground}
|
||||
; format-discharging-background = ${theme.redB}
|
||||
label-discharging = %percentage%% (%time%)
|
||||
|
||||
format-full-prefix = " "
|
||||
format-full-foreground = ${self.format-charging-foreground}
|
||||
|
||||
ramp-capacity-0 =
|
||||
ramp-capacity-1 =
|
||||
ramp-capacity-2 =
|
||||
ramp-capacity-3 =
|
||||
ramp-capacity-4 =
|
||||
|
||||
[module/temperature]
|
||||
type = internal/temperature
|
||||
thermal-zone = 2
|
||||
warn-temperature = 70
|
||||
|
||||
format = <ramp> <label>
|
||||
format-foreground = ${theme.yellowB}
|
||||
label = %temperature%
|
||||
|
||||
format-warn = <ramp> <label-warn>
|
||||
format-warn-foreground = ${self.format-foreground}
|
||||
format-warn-background = ${theme.redB}
|
||||
label-warn = %temperature%
|
||||
|
||||
ramp-0 =
|
||||
ramp-1 =
|
||||
ramp-2 =
|
||||
ramp-3 =
|
||||
|
||||
[settings]
|
||||
screenchange-reload = true
|
||||
;compositing-background = xor
|
||||
;compositing-background = screen
|
||||
;compositing-foreground = source
|
||||
;compositing-border = over
|
||||
|
||||
[global/wm]
|
||||
margin-top = 5
|
||||
margin-bottom = 5
|
||||
|
||||
; vim:ft=dosini
|
2
unprocessed/config/polybar/config.ini
Normal file
2
unprocessed/config/polybar/config.ini
Normal file
|
@ -0,0 +1,2 @@
|
|||
include-file = modules.ini
|
||||
include-file = bars.ini
|
9
unprocessed/config/polybar/keystore
Executable file
9
unprocessed/config/polybar/keystore
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
output="$(ssh-add -l)"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo
|
||||
else
|
||||
echo -n " "
|
||||
echo "$output" | wc -l
|
||||
fi
|
28
unprocessed/config/polybar/launch.sh
Executable file
28
unprocessed/config/polybar/launch.sh
Executable file
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
# Terminate already running bar instances
|
||||
killall -q polybar
|
||||
|
||||
# Wait until the processes have been shut down
|
||||
while pgrep -x polybar >/dev/null; do sleep 1; done
|
||||
|
||||
# Getting some vars
|
||||
primary=$(xrandr | grep primary | head -1 | cut -d' ' -f1)
|
||||
export ethI=$(/bin/ls /sys/class/net/ | grep ^enp* | head -1)
|
||||
export wlanI=$(/bin/ls /sys/class/net/ | grep ^wl* | head -1)
|
||||
|
||||
# Launch bar for each display
|
||||
polybar -m | cut -d':' -f1 | while read display
|
||||
do
|
||||
export display=$display
|
||||
if [ "$display" == "$primary" ]
|
||||
then
|
||||
bar="primary"
|
||||
else
|
||||
bar="secondary"
|
||||
fi
|
||||
polybar -q $bar -c ~/.config/polybar/config.ini &
|
||||
done
|
||||
|
||||
echo "Bars launched..."
|
||||
|
17
unprocessed/config/polybar/linuxmismatch
Executable file
17
unprocessed/config/polybar/linuxmismatch
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if ! which pacman &> /dev/null
|
||||
then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
packageVersion=$(pacman -Q linux | cut -d' ' -f2)
|
||||
runningVersion=$(uname -r)
|
||||
|
||||
if echo "$runningVersion" | grep "^$packageVersion" &> /dev/null
|
||||
then
|
||||
exit 1
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
|
3
unprocessed/config/polybar/modules.ini
Normal file
3
unprocessed/config/polybar/modules.ini
Normal file
|
@ -0,0 +1,3 @@
|
|||
[module/date]
|
||||
type = internal/date
|
||||
date = %m-%d %H:%M:%S
|
21
unprocessed/config/polybar/todo
Executable file
21
unprocessed/config/polybar/todo
Executable file
|
@ -0,0 +1,21 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
CALDIR="$HOME/.vdirsyncer/currentCalendars"
|
||||
|
||||
function status() {
|
||||
ls "$CALDIR" | while read account
|
||||
do
|
||||
displayname="$(cat "$CALDIR/$account/displayname")"
|
||||
color="$(cat "$CALDIR/$account/color")"
|
||||
nb="$(todo list "$displayname" | grep -v "^$" | wc -l)"
|
||||
|
||||
if [ $nb -gt 0 ]
|
||||
then
|
||||
echo -n " %{F$color}$nb%{F-}"
|
||||
fi
|
||||
done
|
||||
# Newline to tell polybar to update in any case
|
||||
echo
|
||||
}
|
||||
|
||||
status
|
Loading…
Add table
Add a link
Reference in a new issue