mirror of
https://gitlab.com/dwt1/dotfiles.git
synced 2026-04-23 19:40:24 +10:00
Minor changes.
This commit is contained in:
@@ -67,6 +67,7 @@ hc keybind $Mod-Control-Right resize right +$resizestep
|
|||||||
|
|
||||||
# tags
|
# tags
|
||||||
tag_names=( {1..9} )
|
tag_names=( {1..9} )
|
||||||
|
tag_icons=( {1..9} )
|
||||||
tag_keys=( {1..9} 0 )
|
tag_keys=( {1..9} 0 )
|
||||||
|
|
||||||
hc rename default "${tag_names[0]}" || true
|
hc rename default "${tag_names[0]}" || true
|
||||||
|
|||||||
@@ -1,75 +1,17 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Panel for herbstluftwm using dzen2
|
# Terminate already running bar instances
|
||||||
|
killall -q polybar
|
||||||
## dzen stuff
|
|
||||||
FG='#CCCCCC'
|
|
||||||
BG='#333333'
|
|
||||||
FONT="-*-fixed-medium-*-*-*-12-*-*-*-*-*-*-*"
|
|
||||||
|
|
||||||
monitor=$@
|
|
||||||
|
|
||||||
rect="$(herbstclient monitor_rect $monitor)"
|
# Wait until the processes have been shut down
|
||||||
xoff=$(echo $rect | awk '{print $1}')
|
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
|
||||||
yoff=0
|
|
||||||
width=$(echo $rect | awk '{print $3}')
|
|
||||||
height=$(echo $rect | awk '{print $2}')
|
|
||||||
|
|
||||||
function uniq_linebuffered() {
|
if type "xrandr"; then
|
||||||
awk '$0 != l { print ; l=$0 ; fflush(); }' "$@"
|
for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
|
||||||
}
|
MONITOR=$m polybar --reload mainbar-xmonad &
|
||||||
|
done
|
||||||
{
|
else
|
||||||
conky -c ~/.config/herbstluftwm/statusbar | while read -r; do
|
polybar --reload mainbar-xmonad &
|
||||||
echo -e "conky $REPLY";
|
fi
|
||||||
|
|
||||||
done > >(uniq_linebuffered) &
|
echo "Bars launched..."
|
||||||
childpid=$!
|
|
||||||
herbstclient --idle
|
|
||||||
kill $childpid
|
|
||||||
} | {
|
|
||||||
TAGS=( $(herbstclient tag_status $monitor) )
|
|
||||||
conky=""
|
|
||||||
separator="^fg(#002B36)^ro(1x16)^fg()"
|
|
||||||
while true; do
|
|
||||||
for i in "${TAGS[@]}"; do
|
|
||||||
echo -n "^ca(1,herbstclient use ${i:1}) "
|
|
||||||
case ${i:0:1} in
|
|
||||||
'#')
|
|
||||||
echo -n "^fg(#2290B5)[^fg(#FFCC30)${i:1}^fg(#2290B5)]"
|
|
||||||
;;
|
|
||||||
'%')
|
|
||||||
echo -n "^fg(#2290B5)(^fg(#FFCC30)${i:1}^fg(#2290B5))"
|
|
||||||
;;
|
|
||||||
'+')
|
|
||||||
echo -n "^fg(#2290B5)[^fg(#CCCCCC)${i:1}^fg(#2290B5)]"
|
|
||||||
;;
|
|
||||||
'-')
|
|
||||||
echo -n "^fg(#2290B5)(^fg(#CCCCCC)${i:1}^fg(#2290B5))"
|
|
||||||
;;
|
|
||||||
':')
|
|
||||||
echo -n "^fg(#CCCCCC) ${i:1} "
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo -n "^fg(#2290B5) ${i:1} "
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
echo -n "^ca()"
|
|
||||||
done
|
|
||||||
echo -n " $separator"
|
|
||||||
conky_text_only=$(echo -n "$conky "|sed 's.\^[^(]*([^)]*)..g')
|
|
||||||
width=$(textwidth "$FONT" "$conky_text_only ")
|
|
||||||
echo -n "^p(_RIGHT)^p(-$width)$conky"
|
|
||||||
echo
|
|
||||||
read line || break
|
|
||||||
cmd=( $line )
|
|
||||||
case "$cmd[0]" in
|
|
||||||
tag*)
|
|
||||||
TAGS=( $(herbstclient tag_status $monitor) )
|
|
||||||
;;
|
|
||||||
conky*)
|
|
||||||
conky="${cmd[@]:1}"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
} 2> /dev/null |dzen2 -ta l -y $yoff -x $xoff -h $height -w $width -fg $FG -bg $BG -fn $FONT &
|
|
||||||
|
|||||||
@@ -371,13 +371,13 @@ monitor = ${env:MONITOR}
|
|||||||
monitor-strict = false
|
monitor-strict = false
|
||||||
override-redirect = false
|
override-redirect = false
|
||||||
width = 100%
|
width = 100%
|
||||||
height = 30
|
height = 20
|
||||||
;offset-x = 1%
|
;offset-x = 1%
|
||||||
;offset-y = 1%
|
;offset-y = 1%
|
||||||
radius = 0.0
|
radius = 0.0
|
||||||
fixed-center = true
|
fixed-center = true
|
||||||
bottom = false
|
bottom = false
|
||||||
separator = |
|
separator =
|
||||||
|
|
||||||
background = ${colors.background}
|
background = ${colors.background}
|
||||||
foreground = ${colors.foreground}
|
foreground = ${colors.foreground}
|
||||||
@@ -392,25 +392,26 @@ line-color = #f00
|
|||||||
;border-bottom-size = 25
|
;border-bottom-size = 25
|
||||||
border-color = #00000000
|
border-color = #00000000
|
||||||
|
|
||||||
padding-left = 0
|
padding-left = 1
|
||||||
padding-right = 1
|
padding-right = 1
|
||||||
|
|
||||||
module-margin-left = 3
|
module-margin-left = 0
|
||||||
module-margin-right = 3
|
module-margin-right = 0
|
||||||
|
|
||||||
; Enable support for inter-process messaging
|
; Enable support for inter-process messaging
|
||||||
; See the Messaging wiki page for more details.
|
; See the Messaging wiki page for more details.
|
||||||
enable-ipc = true
|
enable-ipc = true
|
||||||
|
|
||||||
;https://github.com/jaagr/polybar/wiki/Fonts
|
;https://github.com/jaagr/polybar/wiki/Fonts
|
||||||
font-0 = "Noto Sans:size=10;0"
|
font-0 = "UbuntuMono Nerd Font:size=10;2"
|
||||||
font-1 = "FontAwesome:size=13;0"
|
font-1 = "UbuntuMono Nerd Font:size=16;3"
|
||||||
font-2 = "Noto Sans:size=10;0"
|
font-2 = "Font Awesome 5 Free:style=Regular:pixelsize=8;1"
|
||||||
font-3 = "Noto Sans Mono:size=10;0"
|
font-3 = "Font Awesome 5 Free:style=Solid:pixelsize=8;1"
|
||||||
|
font-4 = "Font Awesome 5 Brands:pixelsize=8;1"
|
||||||
|
|
||||||
modules-left = ewmh
|
modules-left = ewmh xwindow
|
||||||
modules-center = kernel
|
modules-center =
|
||||||
modules-right = pavolume memory2 cpu2 date
|
modules-right = arrow1 networkspeedup networkspeeddown arrow2 memory2 arrow3 cpu2 arrow4 pavolume arrow5 arch-aur-updates arrow6 date
|
||||||
|
|
||||||
tray-detached = false
|
tray-detached = false
|
||||||
tray-offset-x = 0
|
tray-offset-x = 0
|
||||||
@@ -916,36 +917,44 @@ enable-click = true
|
|||||||
enable-scroll = true
|
enable-scroll = true
|
||||||
reverse-scroll = true
|
reverse-scroll = true
|
||||||
|
|
||||||
|
;extra icons to choose from
|
||||||
|
;http://fontawesome.io/cheatsheet/
|
||||||
|
; v
|
||||||
|
|
||||||
icon-0 = 1;
|
icon-0 = 1;
|
||||||
icon-1 = 2;
|
icon-1 = 2;
|
||||||
icon-2 = 3;
|
icon-2 = 3;
|
||||||
icon-3 = 4;
|
icon-3 = 4;
|
||||||
icon-4 = 5;
|
icon-4 = 5;
|
||||||
#icon-5 = 6;
|
icon-5 = 6;
|
||||||
|
icon-6 = 7;
|
||||||
|
icon-7 = 8;
|
||||||
|
icon-8 = 9;
|
||||||
|
icon-9 = 10;
|
||||||
|
icon-default = " "
|
||||||
format = <label-state>
|
format = <label-state>
|
||||||
label-monitor = %name%
|
label-monitor = %name%
|
||||||
|
|
||||||
label-active = %name%
|
;label-active = %icon% %name%
|
||||||
|
label-active = %icon%
|
||||||
label-active-foreground = ${colors.foreground}
|
label-active-foreground = ${colors.foreground}
|
||||||
label-active-background = ${colors.background}
|
label-active-background = ${colors.background}
|
||||||
label-active-underline= #6790eb
|
label-active-underline= #6790eb
|
||||||
label-active-padding = 4
|
label-active-padding = 1
|
||||||
|
|
||||||
label-occupied = %name%
|
label-occupied = %icon%
|
||||||
label-occupied-background = ${colors.background}
|
label-occupied-background = ${colors.background}
|
||||||
label-occupied-padding = 2
|
label-occupied-padding = 1
|
||||||
|
|
||||||
label-urgent = %name%
|
label-urgent = %icon%
|
||||||
label-urgent-foreground = ${colors.foreground}
|
label-urgent-foreground = ${colors.foreground}
|
||||||
label-urgent-background = ${colors.alert}
|
label-urgent-background = ${colors.alert}
|
||||||
label-urgent-underline = ${colors.alert}
|
label-urgent-underline = ${colors.alert}
|
||||||
label-urgent-padding = 2
|
label-urgent-padding = 1
|
||||||
|
|
||||||
|
label-empty = %icon%
|
||||||
label-empty = %name%
|
|
||||||
label-empty-foreground = ${colors.foreground}
|
label-empty-foreground = ${colors.foreground}
|
||||||
label-empty-padding = 2
|
label-empty-padding = 1
|
||||||
format-foreground = ${colors.foreground}
|
format-foreground = ${colors.foreground}
|
||||||
format-background = ${colors.background}
|
format-background = ${colors.background}
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,16 @@ servers = (
|
|||||||
address = "irc.undernet.org";
|
address = "irc.undernet.org";
|
||||||
chatnet = "Undernet";
|
chatnet = "Undernet";
|
||||||
port = "6667";
|
port = "6667";
|
||||||
|
},
|
||||||
|
{
|
||||||
|
address = "chat.freenode.net";
|
||||||
|
chatnet = "Freenode";
|
||||||
|
port = "6697";
|
||||||
|
password = "DistroTube:PASSSWORD";
|
||||||
|
use_tls = "yes";
|
||||||
|
tls_cert = "~/.irssi/certs/freenode.pem";
|
||||||
|
tls_verify = "no";
|
||||||
|
autoconnect = "yes";
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user