Compare commits
4 Commits
4cde32d45e
...
9ee6d451d6
Author | SHA1 | Date |
---|---|---|
David JULIEN | 9ee6d451d6 | |
David JULIEN | 54e7472882 | |
David JULIEN | 425a043be2 | |
David JULIEN | 4d88409e2f |
|
@ -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"
|
||||
|
|
|
@ -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."
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
Reference in New Issue