carrying over changes
This commit is contained in:
parent
de6180f813
commit
c8024f3d41
|
@ -121,8 +121,6 @@ cmd git_branch ${{
|
||||||
lf -remote "send $id cd \"$pwd_shell\""
|
lf -remote "send $id cd \"$pwd_shell\""
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cmd on-cd &{{
|
cmd on-cd &{{
|
||||||
DIR=$(echo $PWD | sed "s|$HOME|~|")
|
DIR=$(echo $PWD | sed "s|$HOME|~|")
|
||||||
printf "\033]0; $DIR\007" > /dev/tty
|
printf "\033]0; $DIR\007" > /dev/tty
|
||||||
|
@ -134,23 +132,23 @@ cmd on-quit ${{
|
||||||
printf "\033]0; $DIR\007" > /dev/tty
|
printf "\033]0; $DIR\007" > /dev/tty
|
||||||
}}
|
}}
|
||||||
|
|
||||||
# cmd paste &{{
|
cmd paste &{{
|
||||||
# set -- $(cat ~/.local/share/lf/files)
|
set -- $(cat ~/.local/share/lf/files)
|
||||||
# mode="$1"
|
mode="$1"
|
||||||
# shift
|
shift
|
||||||
# case "$mode" in
|
case "$mode" in
|
||||||
# copy)
|
copy)
|
||||||
# rsync -av --ignore-existing --progress -- "$@" . |
|
rsync -av --ignore-existing --progress -- "$@" . |
|
||||||
# stdbuf -i0 -o0 -e0 tr '\r' '\n' |
|
stdbuf -i0 -o0 -e0 tr '\r' '\n' |
|
||||||
# while IFS= read -r line; do
|
while IFS= read -r line; do
|
||||||
# lf -remote "send $id echo $line"
|
lf -remote "send $id echo $line"
|
||||||
# done
|
done
|
||||||
# ;;
|
;;
|
||||||
# move) mv -n -- "$@" .;;
|
move) mv -n -- "$@" .;;
|
||||||
# esac
|
esac
|
||||||
# rm ~/.local/share/lf/files
|
rm ~/.local/share/lf/files
|
||||||
# lf -remote "send clear"
|
lf -remote "send clear"
|
||||||
# }}
|
}}
|
||||||
|
|
||||||
cmd share $curl -F"file=@$fx" https://0x0.snaile.de | xclip -r -selection c
|
cmd share $curl -F"file=@$fx" https://0x0.snaile.de | xclip -r -selection c
|
||||||
|
|
||||||
|
@ -179,6 +177,7 @@ map I push A<a-b> # after extension
|
||||||
map i push A<a-b><a-b><a-f> # before extension
|
map i push A<a-b><a-b><a-f> # before extension
|
||||||
map c push A<c-u> # new rename
|
map c push A<c-u> # new rename
|
||||||
map B bulkrename
|
map B bulkrename
|
||||||
|
map b $cp "$f" "$f-COPY"
|
||||||
|
|
||||||
# Kitty Specific
|
# Kitty Specific
|
||||||
map W $setsid -f $TERMINAL -e lf >/dev/null 2>&1
|
map W $setsid -f $TERMINAL -e lf >/dev/null 2>&1
|
||||||
|
|
|
@ -2,12 +2,11 @@ map Ch cd "/home/luca"
|
||||||
map Cch cd "/home/luca/.cache"
|
map Cch cd "/home/luca/.cache"
|
||||||
map Ccf cd "/home/luca/.config"
|
map Ccf cd "/home/luca/.config"
|
||||||
map Cdt cd "/home/luca/.local/share"
|
map Cdt cd "/home/luca/.local/share"
|
||||||
map Crr cd "/home/luca/.local/git"
|
map Crr cd "/home/luca/.local/src"
|
||||||
map Csc cd "/home/luca/.local/bin"
|
map Csc cd "/home/luca/.local/bin"
|
||||||
map Cmn cd "/mnt"
|
map Cmn cd "/mnt"
|
||||||
map Cdl cd "/home/luca/Downloads"
|
map Cdl cd "/home/luca/Downloads"
|
||||||
map Cdm cd "/home/luca/Documents"
|
map Cdm cd "/home/luca/Documents"
|
||||||
map Cco cd "/home/luca/Documents/Code"
|
|
||||||
map Cms cd "/home/luca/Music"
|
map Cms cd "/home/luca/Music"
|
||||||
map Cpc cd "/home/luca/Pictures"
|
map Cpc cd "/home/luca/Pictures"
|
||||||
map Cvd cd "/home/luca/Videos"
|
map Cvd cd "/home/luca/Videos"
|
||||||
|
|
|
@ -5,11 +5,11 @@ shadow-opacity = 0.6;
|
||||||
shadow-offset-x = -12;
|
shadow-offset-x = -12;
|
||||||
shadow-offset-y = -10;
|
shadow-offset-y = -10;
|
||||||
shadow-exclude = [
|
shadow-exclude = [
|
||||||
"x = 10 && y = 10 && override_redirect = true",
|
"x = 0 && y = 0 && override_redirect = true",
|
||||||
"class_g *= 'slop'",
|
"class_g *= 'slop'",
|
||||||
"_GTK_FRAME_EXTENTS@:c",
|
"_GTK_FRAME_EXTENTS@:c",
|
||||||
"_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'",
|
"_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'",
|
||||||
"class_g = 'librewolf' && argb",
|
"class_g = 'librewolf-default' && argb"
|
||||||
];
|
];
|
||||||
|
|
||||||
# Fading
|
# Fading
|
||||||
|
@ -35,18 +35,9 @@ blur-background-exclude = [
|
||||||
"class_g *= 'slop'",
|
"class_g *= 'slop'",
|
||||||
"_GTK_FRAME_EXTENTS@:c",
|
"_GTK_FRAME_EXTENTS@:c",
|
||||||
"_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'",
|
"_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'",
|
||||||
"class_g = 'librewolf' && argb",
|
"class_g = 'librewolf-default' && argb"
|
||||||
];
|
];
|
||||||
|
|
||||||
# Window type settings
|
|
||||||
wintypes:
|
|
||||||
{
|
|
||||||
menu = { shadow = false; blur-background = false; };
|
|
||||||
dropdown_menu = { shadow = false; blur-background = false; };
|
|
||||||
popup_menu = { shadow = false; blur-background = false; };
|
|
||||||
utility = { shadow = false; blur-background = false; };
|
|
||||||
};
|
|
||||||
|
|
||||||
# Other
|
# Other
|
||||||
backend = "glx";
|
backend = "glx";
|
||||||
experimental-backends = true;
|
experimental-backends = true;
|
||||||
|
|
|
@ -3,12 +3,11 @@ h $HOME
|
||||||
ch ${XDG_CACHE_HOME:-$HOME/.cache}
|
ch ${XDG_CACHE_HOME:-$HOME/.cache}
|
||||||
cf ${XDG_CONFIG_HOME:-$HOME/.config}
|
cf ${XDG_CONFIG_HOME:-$HOME/.config}
|
||||||
dt ${XDG_DATA_HOME:-$HOME/.local/share}
|
dt ${XDG_DATA_HOME:-$HOME/.local/share}
|
||||||
rr $HOME/.local/git
|
rr $HOME/.local/src
|
||||||
sc $HOME/.local/bin
|
sc $HOME/.local/bin
|
||||||
mn /mnt
|
mn /mnt
|
||||||
dl ${XDG_DOWNLOAD_DIR:-$HOME/Downloads}
|
dl ${XDG_DOWNLOAD_DIR:-$HOME/Downloads}
|
||||||
dm ${XDG_DOCUMENTS_DIR:-$HOME/Documents}
|
dm ${XDG_DOCUMENTS_DIR:-$HOME/Documents}
|
||||||
co ${XDG_DOCUMENTS_DIR:-$HOME/Documents}/Code
|
|
||||||
ms ${XDG_MUSIC_DIR:-$HOME/Music}
|
ms ${XDG_MUSIC_DIR:-$HOME/Music}
|
||||||
pc ${XDG_PICTURES_DIR:-$HOME/Pictures}
|
pc ${XDG_PICTURES_DIR:-$HOME/Pictures}
|
||||||
vd ${XDG_VIDEOS_DIR:-$HOME/Videos}
|
vd ${XDG_VIDEOS_DIR:-$HOME/Videos}
|
||||||
|
|
|
@ -235,6 +235,5 @@ ex=:\
|
||||||
|
|
||||||
[ "$(tty)" = "/dev/tty1" ] && ! pidof -s Xorg >/dev/null 2>&1 && exec startx "$XINITRC"
|
[ "$(tty)" = "/dev/tty1" ] && ! pidof -s Xorg >/dev/null 2>&1 && exec startx "$XINITRC"
|
||||||
[ ! -f ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ] && setsid shortcuts >/dev/null 2>&1
|
[ ! -f ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ] && setsid shortcuts >/dev/null 2>&1
|
||||||
sudo -n loadkeys ${XDG_DATA_HOME:-$HOME/.local/share}/ttymaps.kmap 2>/dev/null
|
# sudo -n loadkeys ${XDG_DATA_HOME:-$HOME/.local/share}/ttymaps.kmap 2>/dev/null
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3,12 +3,11 @@ alias h="cd /home/luca && tput cuu1;tput el" \
|
||||||
ch="cd /home/luca/.cache && tput cuu1;tput el" \
|
ch="cd /home/luca/.cache && tput cuu1;tput el" \
|
||||||
cf="cd /home/luca/.config && tput cuu1;tput el" \
|
cf="cd /home/luca/.config && tput cuu1;tput el" \
|
||||||
dt="cd /home/luca/.local/share && tput cuu1;tput el" \
|
dt="cd /home/luca/.local/share && tput cuu1;tput el" \
|
||||||
rr="cd /home/luca/.local/git && tput cuu1;tput el" \
|
rr="cd /home/luca/.local/src && tput cuu1;tput el" \
|
||||||
sc="cd /home/luca/.local/bin && tput cuu1;tput el" \
|
sc="cd /home/luca/.local/bin && tput cuu1;tput el" \
|
||||||
mn="cd /mnt && tput cuu1;tput el" \
|
mn="cd /mnt && tput cuu1;tput el" \
|
||||||
dl="cd /home/luca/Downloads && tput cuu1;tput el" \
|
dl="cd /home/luca/Downloads && tput cuu1;tput el" \
|
||||||
dm="cd /home/luca/Documents && tput cuu1;tput el" \
|
dm="cd /home/luca/Documents && tput cuu1;tput el" \
|
||||||
co="cd /home/luca/Documents/Code && tput cuu1;tput el" \
|
|
||||||
ms="cd /home/luca/Music && tput cuu1;tput el" \
|
ms="cd /home/luca/Music && tput cuu1;tput el" \
|
||||||
pc="cd /home/luca/Pictures && tput cuu1;tput el" \
|
pc="cd /home/luca/Pictures && tput cuu1;tput el" \
|
||||||
vd="cd /home/luca/Videos && tput cuu1;tput el" \
|
vd="cd /home/luca/Videos && tput cuu1;tput el" \
|
||||||
|
|
|
@ -2,12 +2,11 @@ hash -d h=/home/luca
|
||||||
hash -d ch=/home/luca/.cache
|
hash -d ch=/home/luca/.cache
|
||||||
hash -d cf=/home/luca/.config
|
hash -d cf=/home/luca/.config
|
||||||
hash -d dt=/home/luca/.local/share
|
hash -d dt=/home/luca/.local/share
|
||||||
hash -d rr=/home/luca/.local/git
|
hash -d rr=/home/luca/.local/src
|
||||||
hash -d sc=/home/luca/.local/bin
|
hash -d sc=/home/luca/.local/bin
|
||||||
hash -d mn=/mnt
|
hash -d mn=/mnt
|
||||||
hash -d dl=/home/luca/Downloads
|
hash -d dl=/home/luca/Downloads
|
||||||
hash -d dm=/home/luca/Documents
|
hash -d dm=/home/luca/Documents
|
||||||
hash -d co=/home/luca/Documents/Code
|
|
||||||
hash -d ms=/home/luca/Music
|
hash -d ms=/home/luca/Music
|
||||||
hash -d pc=/home/luca/Pictures
|
hash -d pc=/home/luca/Pictures
|
||||||
hash -d vd=/home/luca/Videos
|
hash -d vd=/home/luca/Videos
|
||||||
|
|
|
@ -13,51 +13,3 @@ if [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/x11/xprofile" ]; then
|
||||||
else
|
else
|
||||||
. "$HOME/.xprofile"
|
. "$HOME/.xprofile"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Start gpg-agent if not already running
|
|
||||||
if ! pgrep -x -u "${USER}" gpg-agent 1> /dev/null 2>&1; then
|
|
||||||
gpg-connect-agent /bye 1> /dev/null 2>&1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Set SSH to use gpg-agent (see 'man gpg-agent', section EXAMPLES)
|
|
||||||
unset SSH_AGENT_PID
|
|
||||||
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
|
|
||||||
# export SSH_AUTH_SOCK="/run/user/$UID/gnupg/S.gpg-agent.ssh"
|
|
||||||
SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
|
|
||||||
export SSH_AUTH_SOCK
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Set GPG TTY as stated in 'man gpg-agent'
|
|
||||||
GPG_TTY="$(tty)"
|
|
||||||
export GPG_TTY
|
|
||||||
|
|
||||||
# Refresh gpg-agent tty
|
|
||||||
gpg-connect-agent updatestartuptty /bye > /dev/null
|
|
||||||
|
|
||||||
export XSECURELOCK_AUTH_BACKGROUND_COLOR="#24283b"
|
|
||||||
export XSECURELOCK_AUTH_FOREGROUND_COLOR="#c0caf5"
|
|
||||||
export XSECURELOCK_AUTH_WARNING_COLOR="#f7768e"
|
|
||||||
export XSECURELOCK_BACKGROUND_COLOR="#15161E"
|
|
||||||
export XSECURELOCK_DATETIME_FORMAT="%d.%m.%Y %H:%M"
|
|
||||||
export XSECURELOCK_PASSWORD_PROMPT="time_hex"
|
|
||||||
export XSECURELOCK_AUTH_TIMEOUT=10
|
|
||||||
export XSECURELOCK_SHOW_DATETIME=1
|
|
||||||
export XSECURELOCK_SAVER="saver_xscreensaver"
|
|
||||||
export XSECURELOCK_COMPOSITE_OBSCURER=0
|
|
||||||
xset s 300
|
|
||||||
xss-lock -- xsecurelock &
|
|
||||||
|
|
||||||
# Set GPU settings
|
|
||||||
# gwe --hide-window &
|
|
||||||
|
|
||||||
xset r rate 300 50
|
|
||||||
killall xcape 2>/dev/null ; xcape -e 'Super_L=Escape'
|
|
||||||
xset -q | grep "Caps Lock:\s*on" && xdotool key Caps_Lock
|
|
||||||
setxkbmap -layout de -variant nodeadkeys -option caps:super
|
|
||||||
|
|
||||||
setsid -f dwmblocks
|
|
||||||
setsid -f picom --experimental-backends
|
|
||||||
|
|
||||||
# Start Console TDM
|
|
||||||
exec dwm
|
|
||||||
|
|
||||||
|
|
|
@ -5,11 +5,57 @@ xrandr --dpi 109 --fb 4480x1633 \
|
||||||
setbg & # set the background with the `setbg` script
|
setbg & # set the background with the `setbg` script
|
||||||
xrdb ${XDG_CONFIG_HOME:-$HOME/.config}/x11/xresources & xrdbpid=$! # Uncomment to use Xresources colors/settings on startup
|
xrdb ${XDG_CONFIG_HOME:-$HOME/.config}/x11/xresources & xrdbpid=$! # Uncomment to use Xresources colors/settings on startup
|
||||||
|
|
||||||
autostart="checkup mpd dunst unclutter pipewire"
|
autostart="checkup mpd dunst unclutter pipewire dwmblocks"
|
||||||
|
|
||||||
for program in $autostart; do
|
for program in $autostart; do
|
||||||
pidof -s "$program" || "$program" &
|
pidof -s "$program" || "$program" &
|
||||||
done >/dev/null 2>&1
|
done >/dev/null 2>&1
|
||||||
|
|
||||||
|
pidof -s "picom" || picom --experimental-backends &
|
||||||
|
|
||||||
# Ensure that xrdb has finished running before moving on to start the WM/DE.
|
# Ensure that xrdb has finished running before moving on to start the WM/DE.
|
||||||
[ -n "$xrdbpid" ] && wait "$xrdbpid"
|
[ -n "$xrdbpid" ] && wait "$xrdbpid"
|
||||||
|
|
||||||
|
# Start gpg-agent if not already running
|
||||||
|
if ! pgrep -x -u "${USER}" gpg-agent 1> /dev/null 2>&1; then
|
||||||
|
gpg-connect-agent /bye 1> /dev/null 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set SSH to use gpg-agent (see 'man gpg-agent', section EXAMPLES)
|
||||||
|
unset SSH_AGENT_PID
|
||||||
|
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
|
||||||
|
# export SSH_AUTH_SOCK="/run/user/$UID/gnupg/S.gpg-agent.ssh"
|
||||||
|
SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
|
||||||
|
export SSH_AUTH_SOCK
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set GPG TTY as stated in 'man gpg-agent'
|
||||||
|
GPG_TTY="$(tty)"
|
||||||
|
export GPG_TTY
|
||||||
|
|
||||||
|
# Refresh gpg-agent tty
|
||||||
|
gpg-connect-agent updatestartuptty /bye > /dev/null
|
||||||
|
|
||||||
|
export XSECURELOCK_AUTH_BACKGROUND_COLOR="#24283b"
|
||||||
|
export XSECURELOCK_AUTH_FOREGROUND_COLOR="#c0caf5"
|
||||||
|
export XSECURELOCK_AUTH_WARNING_COLOR="#f7768e"
|
||||||
|
export XSECURELOCK_BACKGROUND_COLOR="#15161E"
|
||||||
|
export XSECURELOCK_DATETIME_FORMAT="%d.%m.%Y %H:%M"
|
||||||
|
export XSECURELOCK_PASSWORD_PROMPT="time_hex"
|
||||||
|
export XSECURELOCK_AUTH_TIMEOUT=10
|
||||||
|
export XSECURELOCK_SHOW_DATETIME=1
|
||||||
|
export XSECURELOCK_SAVER="saver_xscreensaver"
|
||||||
|
export XSECURELOCK_COMPOSITE_OBSCURER=0
|
||||||
|
xset s 300
|
||||||
|
xss-lock -- xsecurelock &
|
||||||
|
|
||||||
|
# Set GPU settings
|
||||||
|
# gwe --hide-window &
|
||||||
|
|
||||||
|
xset r rate 300 50
|
||||||
|
killall xcape 2>/dev/null ; xcape -e 'Super_L=Escape'
|
||||||
|
xset -q | grep "Caps Lock:\s*on" && xdotool key Caps_Lock
|
||||||
|
setxkbmap -layout de -variant nodeadkeys -option caps:super
|
||||||
|
|
||||||
|
# Start Console TDM
|
||||||
|
exec dwm
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,11 @@ Xcursor.theme: Fluent-dark-cursors
|
||||||
|
|
||||||
!! DWM Settings
|
!! DWM Settings
|
||||||
dwm.bordernorm: #1D202F
|
dwm.bordernorm: #1D202F
|
||||||
dwm.bordersel: #414868
|
dwm.bordersel: #414868;
|
||||||
|
dwm.font: NotoSans Nerd Font:style=Regular:pixelsize=14:antialias=true;
|
||||||
|
|
||||||
|
!! dmenu settings
|
||||||
|
dmenu.font: NotoSans Nerd Font:style=Regular:pixelsize=14:antialias=true;
|
||||||
|
|
||||||
/* name dark light */
|
/* name dark light */
|
||||||
/* black 0 8 */
|
/* black 0 8 */
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# Some optional functions in LARBS require programs not installed by default. I
|
|
||||||
# use this little script to check to see if a command exists and if it doesn't
|
|
||||||
# it informs the user that they need that command to continue. This is used in
|
|
||||||
# various other scripts for clarity's sake.
|
|
||||||
|
|
||||||
for x in "$@"; do
|
|
||||||
if ! which "$x" >/dev/null 2>&1 && ! pacman -Qq "$x" >/dev/null 2>&1; then
|
|
||||||
notify-send " $x" "must be installed for this function." && exit 1 ;
|
|
||||||
fi
|
|
||||||
done
|
|
|
@ -15,4 +15,4 @@ case "$clock" in
|
||||||
"11") icon="" ;;
|
"11") icon="" ;;
|
||||||
"12") icon="" ;;
|
"12") icon="" ;;
|
||||||
esac
|
esac
|
||||||
printf "%s \033[11m%s\033[10m %s\n" "$(date "+%H:%M")" "$icon" "$(date "+%d.%M.%Y")"
|
printf "%s \033[11m%s\033[10m %s\n" "$(date "+%H:%M")" "$icon" "$(date "+%d.%m.%Y")"
|
||||||
|
|
|
@ -12,14 +12,14 @@ echo "$stats" | while read -r row; do
|
||||||
case "$(echo "$old" | awk '{if ($1 == id)
|
case "$(echo "$old" | awk '{if ($1 == id)
|
||||||
printf "%d\n", (1 - (idle - $3) / (total - $2))*100 /12.5}' \
|
printf "%d\n", (1 - (idle - $3) / (total - $2))*100 /12.5}' \
|
||||||
id="$id" total="$total" idle="$idle")" in
|
id="$id" total="$total" idle="$idle")" in
|
||||||
"0") printf "\033[32m▁\033[0m";;
|
"0") printf "\033[32m▁";;
|
||||||
"1") printf "\033[32m▂\033[0m";;
|
"1") printf "\033[32m▂";;
|
||||||
"2") printf "\033[32m▃\033[0m";;
|
"2") printf "\033[32m▃";;
|
||||||
"3") printf "\033[33m▄\033[0m";;
|
"3") printf "\033[33m▄";;
|
||||||
"4") printf "\033[33m▅\033[0m";;
|
"4") printf "\033[33m▅";;
|
||||||
"5") printf "\033[33m▆\033[0m";;
|
"5") printf "\033[33m▆";;
|
||||||
"6"|"7"|"8") printf "\033[31m▇\033[0m";;
|
"6"|"7"|"8") printf "\033[31m▇";;
|
||||||
|
|
||||||
esac
|
esac
|
||||||
done; printf "\\n"
|
done; printf "\033[0m\\n"
|
||||||
echo "$stats" > "$cache"
|
echo "$stats" > "$cache"
|
||||||
|
|
|
@ -1,7 +1,13 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
big="\033[11m"
|
||||||
|
norm="\033[10m"
|
||||||
if grep -xq 'up' /sys/class/net/w*/operstate 2>/dev/null ; then
|
if grep -xq 'up' /sys/class/net/w*/operstate 2>/dev/null ; then
|
||||||
wifiicon="$(awk '/^\s*w/ { print "直", int($3 * 100 / 70) "% " }' /proc/net/wireless)"
|
percent="$(cat /proc/net/wireless | tail -1 | tr -s ' ' | cut -d ' ' -f3 | sed 's/\.//')"
|
||||||
|
wifi_icon="直"
|
||||||
elif grep -xq 'down' /sys/class/net/w*/operstate 2>/dev/null ; then
|
elif grep -xq 'down' /sys/class/net/w*/operstate 2>/dev/null ; then
|
||||||
grep -xq '0x1003' /sys/class/net/w*/flags && wifiicon="睊" || wifiicon=" "
|
grep -xq '0x1003' /sys/class/net/w*/flags && wifi_icon="睊" || wifi_icon=""
|
||||||
fi
|
fi
|
||||||
printf "%s%s%s%s\n" "$wifiicon" "$(sed "s/down/ /;s/up/ /" /sys/class/net/e*/operstate 2>/dev/null)" "$(sed "s/.*/嬨/" /sys/class/net/tun*/operstate 2>/dev/null)" "$(ip route get 8.8.8.8 | sed 's/.*src \([^ ]*\).*/\1/;t;d')"
|
|
||||||
|
ls /sys/class/net/tun* 1>/dev/null 2>&1 && vpn_icon="$(sed "s/.*/嬨/" /sys/class/net/tun*/operstate 2>/dev/null)" || vpn_icon=""
|
||||||
|
|
||||||
|
printf "$big%s$norm %s $big%s%s$norm" "$wifi_icon" " $percent" "$(sed "s/down//;s/up//" /sys/class/net/e*/operstate 2>/dev/null | tr "\n" " " | xargs echo -n)" "$vpn_icon"
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# https://www.maketecheasier.com/ip-address-geolocation-lookups-linux/
|
||||||
|
loc_addr="$(ip route get 9.9.9.9 | head -1 | cut -d ' ' -f3)"
|
||||||
|
pub_addr="$(curl snaile.de/ip 2>/dev/null)" || exit
|
||||||
|
flag="$(grep "flag: " "${XDG_DATA_HOME:-$HOME/.local/share}/emoji" | grep "$(geoiplookup "$addr" | sed 's/.*, //')" | sed 's/ flag: .*//')"
|
||||||
|
printf "%s %s" $loc_addr $pub_addr
|
|
@ -1,5 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
# https://www.maketecheasier.com/ip-address-geolocation-lookups-linux/
|
|
||||||
ifinstalled "geoip" || exit
|
|
||||||
addr="$(curl snaile.de/ip 2>/dev/null)" || exit
|
|
||||||
grep "flag: " "${XDG_DATA_HOME:-$HOME/.local/share}/larbs/emoji" | grep "$(geoiplookup "$addr" | sed 's/.*, //')" | sed "s/flag: //;s/;.*//"
|
|
|
@ -12,6 +12,6 @@ elif [ "$vol" -gt "0" ]; then
|
||||||
elif [ "$vol" -eq "0" ]; then
|
elif [ "$vol" -eq "0" ]; then
|
||||||
icon=""
|
icon=""
|
||||||
else
|
else
|
||||||
echo " \033[11m\033[10m " && exit
|
echo "\033[11m\033[10m " && exit
|
||||||
fi
|
fi
|
||||||
printf "\033[11m%s\033[10m %s" "$icon" "$vol"
|
printf "\033[11m%s\033[10m %s" "$icon" "$vol"
|
||||||
|
|
Loading…
Reference in New Issue