Compare commits

...

4 Commits

Author SHA1 Message Date
David JULIEN 9ee6d451d6 fix: remove '---' when wifi is down 2021-07-12 17:53:48 +02:00
David JULIEN 54e7472882 feat: use .jpg files instead of .png 2021-07-12 17:53:03 +02:00
David JULIEN 425a043be2 fix: ignore /boot 2021-07-12 17:20:29 +02:00
David JULIEN 4d88409e2f fix: cursor shape in zsh 2021-07-12 17:19:48 +02:00
4 changed files with 10 additions and 11 deletions

View File

@ -51,17 +51,16 @@ function zle-keymap-select {
[[ ${KEYMAP} == viins ]] ||
[[ ${KEYMAP} = '' ]] ||
[[ $1 = 'beam' ]]; then
echo -ne '\e[5 q'
echo -ne '\e[6 q'
fi
}
zle -N zle-keymap-select
zle-line-init() {
zle -K viins # initiate `vi insert` as keymap (can be removed if `bindkey -V` has been set elsewhere)
echo -ne "\e[5 q"
echo -ne "\e[6 q"
}
zle -N zle-line-init
echo -ne '\e[5 q' # Use beam shape cursor on startup.
preexec() { echo -ne '\e[5 q' ;} # Use beam shape cursor for each new prompt.
precmd_dunctions() { zle-line-init ;} # Use beam shape cursor for each new prompt.
# Load aliases and shortcuts if existent.
[ -f "$HOME/.config/aliasrc" ] && source "$HOME/.config/aliasrc"

View File

@ -24,7 +24,7 @@ fi
}
usbdrives=$(lsblk -nrpo "name,type,size,mountpoint" | awk \
'$2=="part"&&$4!~/\/efi|\/home$|SWAP/&&length($4)>1{printf "%s (%s)\n",$4,$3}')
'$2=="part"&&$4!~/\/boot|\/efi|\/home$|SWAP/&&length($4)>1{printf "%s (%s)\n",$4,$3}')
if [ -z "$usbdrives" ]; then
notify-send -u "critical" -t 3000 " USB ERROR" "No drive to unmount."

View File

@ -10,11 +10,11 @@
# If given an argument
# if $1 is a png file, set it as a wallpaper
# if $1 is a jpg file, set it as a wallpaper
# if $1 is a directory, choose a randomized image in it, set it as wallpaper
[ -f "$1" ] && cp $1 "$XDG_CONFIG_HOME/wall.png" && dunstify -u "low" "Wallpaper changed"
[ -f "$1" ] && cp $1 "$XDG_CONFIG_HOME/wall.jpg" && dunstify -u "low" "Wallpaper changed"
[ -d "$1" ] && cp "$(find "$1"/*.png -type f | shuf -n 1)" "$XDG_CONFIG_HOME/wall.png" && dunstify -u "low" "Random wallpaper chosen"
[ -d "$1" ] && cp "$(find "$1"/*.jpg -type f | shuf -n 1)" "$XDG_CONFIG_HOME/wall.jpg" && dunstify -u "low" "Random wallpaper chosen"
xwallpaper --zoom "$XDG_CONFIG_HOME/wall.png"
xwallpaper --zoom "$XDG_CONFIG_HOME/wall.jpg"

View File

@ -12,8 +12,8 @@
# Wifi quality percentage and  icon if ethernet is connected.
wifi="$(grep "^\s*w" /proc/net/wireless | awk '{ printf int($3 * 100 / 70) }')"
[ $wifi -ne 0 ] && str="$(printf "直 %3d%%" $wifi)" || str="$(printf "睊 ---")"
eth="$(cat /sys/class/net/enp0s25/operstate)"
[ $wifi -ne 0 ] && str="$(printf "直 %3d%%" $wifi)" || str="$(printf "睊")"
eth="$(cat /sys/class/net/eno1/operstate)"
if [ "up" = "$eth" ]; then
str="$(printf "%s /  " "$str")"
fi