wip / i3wm ➔ hyprland
and, several clean-ups at the same time
This commit is contained in:
@@ -35,6 +35,7 @@ alias dragon="dragon-drop --and-exit --all --print-path"
|
||||
alias du="du --summarize --human-readable"
|
||||
alias dus="du --summarize --human-readable * | sort -h"
|
||||
alias encrypt="gpg --encrypt --sign --recipient frode@klevstul.com"
|
||||
alias extract="extract.sh"
|
||||
alias faf="find . -type f -iname" # faf (find a file)
|
||||
alias fif="grep -rnw . -e" # fif (find in file) | https://stackoverflow.com/questions/16956810/find-all-files-containing-a-specific-text-string-on-linux
|
||||
alias gparted="sudo gparted"
|
||||
@@ -45,7 +46,6 @@ alias ipify='http https://api.ipify.org?format=json'
|
||||
alias journal='journalctl --since "1 hour ago"'
|
||||
alias keymap="setxkbmap -model pc105 -layout us,no -option grp:caps_toggle,grp_led:scroll"
|
||||
alias keyringreset="trash-put /home/poq/.local/share/keyrings/*.keyrings"
|
||||
#alias lock="xautolock -locknow"
|
||||
alias ls='ls --color=auto'
|
||||
alias myip="echo $(wget http://ipinfo.io/ip -qO -)"
|
||||
alias neofetch='fastfetch'
|
||||
@@ -87,268 +87,26 @@ case ${TERM} in
|
||||
;;
|
||||
esac
|
||||
|
||||
# tss (terminal screen saver) - start a random one
|
||||
#tss() {
|
||||
# # https://unix.stackexchange.com/questions/118714/how-can-i-get-cacafire-to-show-up-in-the-original-gnome-terminal-instead-of-a
|
||||
# OLD_DISPAY=$(echo $DISPLAY)
|
||||
# export DISPLAY=
|
||||
# commands=("aafire -driver curses" "cacafire" "cmatrix -a -b -s -u 5" "unimatrix.py")
|
||||
# random_command="${commands[ $RANDOM % ${#commands[@]} ]}"
|
||||
# $random_command
|
||||
# export DISPLAY=${OLD_DISPAY}
|
||||
#}
|
||||
#
|
||||
#alias tbt="printf '\x1b]10;red\x1b\\'; printf '\x1b]11;#000\x1b\\'" # tbt (terminal black theme) | https://sw.kovidgoyal.net/kitty/faq/#how-do-i-change-the-colors-in-a-running-kitty-instance
|
||||
#alias tdt="printf '\x1b]10;#00ffff\x1b\\'; printf '\x1b]11;#161021\x1b\\';" # tdt (terminal default theme)
|
||||
|
||||
|
||||
# ---
|
||||
# networking
|
||||
# ---
|
||||
|
||||
# https://serverfault.com/questions/170706/easy-way-to-get-ip-address-from-hostname-using-a-unix-shell
|
||||
#function hostip() {
|
||||
# python -c "import sys, socket; print (socket.gethostbyname('$1'))"
|
||||
#}
|
||||
|
||||
nmrestart() {
|
||||
systemctl restart NetworkManager
|
||||
systemctl status NetworkManager
|
||||
}
|
||||
|
||||
# https://wiki.archlinux.org/title/Proxy_server
|
||||
#function proxy_on() {
|
||||
# export no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com"
|
||||
#
|
||||
# if (( $# > 0 )); then
|
||||
# valid=$(echo $@ | sed -n 's/\([0-9]\{1,3\}.\?\)\{4\}:\([0-9]\+\)/&/p')
|
||||
# if [[ $valid != $@ ]]; then
|
||||
# >&2 echo "Invalid address"
|
||||
# return 1
|
||||
# fi
|
||||
# local proxy=$1
|
||||
# export http_proxy="$proxy" \
|
||||
# https_proxy=$proxy \
|
||||
# ftp_proxy=$proxy \
|
||||
# rsync_proxy=$proxy
|
||||
# echo "Proxy environment variable set."
|
||||
# return 0
|
||||
# fi
|
||||
#
|
||||
# echo -n "username: "; read username
|
||||
# if [[ $username != "" ]]; then
|
||||
# echo -n "password: "
|
||||
# read -es password
|
||||
# local pre="$username:$password@"
|
||||
# fi
|
||||
#
|
||||
# echo -n "server: "; read server
|
||||
# echo -n "port: "; read port
|
||||
# local proxy=$pre$server:$port
|
||||
# export http_proxy="$proxy" \
|
||||
# https_proxy=$proxy \
|
||||
# ftp_proxy=$proxy \
|
||||
# rsync_proxy=$proxy \
|
||||
# HTTP_PROXY=$proxy \
|
||||
# HTTPS_PROXY=$proxy \
|
||||
# FTP_PROXY=$proxy \
|
||||
# RSYNC_PROXY=$proxy
|
||||
#}
|
||||
#
|
||||
#function proxy_off(){
|
||||
# unset http_proxy https_proxy ftp_proxy rsync_proxy \
|
||||
# HTTP_PROXY HTTPS_PROXY FTP_PROXY RSYNC_PROXY
|
||||
# echo -e "Proxy environment variable removed."
|
||||
#}
|
||||
|
||||
|
||||
# ---
|
||||
# screens / displays / power management
|
||||
# ---
|
||||
|
||||
# https://en.wikipedia.org/wiki/List_of_common_resolutions
|
||||
#alias res-low="xrandr -s 1920x1080"
|
||||
#alias res-med="xrandr -s 2560x1440"
|
||||
#alias res-high="xrandr -s 3840x2160"
|
||||
#
|
||||
#monitor() {
|
||||
# cmd="info"
|
||||
# if [[ -n $1 ]]; then
|
||||
# cmd=$1
|
||||
# fi
|
||||
#
|
||||
# if [ ${cmd} == "on" ] ; then
|
||||
# # (standby) (suspend) (off)
|
||||
# # 18.2 hours | https://superuser.com/questions/1876254/how-to-turn-off-monitor-and-dont-enable-screen-blanking-in-arch-linux
|
||||
# xset dpms 65535 65535 65535
|
||||
# # disable screensaver
|
||||
# xautolock -disable # disable screen locker
|
||||
# elif [ ${cmd} == "off" ] ; then
|
||||
# sleep 3 # sleep, to prevent mouse movement and immediate wake up
|
||||
# xset dpms 0 0 600 # 10 min timout will be active after monitor wakes up
|
||||
# xset dpms force off # shut off the monitor
|
||||
# xautolock -enable # turns on screen locker again
|
||||
# elif [ ${cmd} == "info" ] ; then
|
||||
# xset -q
|
||||
# else
|
||||
# echo "error: unknown command \"${cmd}\""
|
||||
# fi
|
||||
#}
|
||||
#
|
||||
#screensaver() {
|
||||
# cmd="info"
|
||||
# if [[ -n $1 ]]; then
|
||||
# cmd=$1
|
||||
# fi
|
||||
#
|
||||
# if [ ${cmd} == "on" ] ; then
|
||||
# xset dpms
|
||||
# xautolock -enable
|
||||
# # tmp file used by i3status - by default screensaver is on, so no need for "screensaver_on.tmp"
|
||||
# trash-put "/tmp/screensaver_off.tmp"
|
||||
# elif [ ${cmd} == "off" ] ; then
|
||||
# xset -dpms
|
||||
# xautolock -disable
|
||||
# touch "/tmp/screensaver_off.tmp"
|
||||
# elif [ ${cmd} == "reset" ] ; then
|
||||
# if xset -q | grep -q 'DPMS is Enabled' ; then
|
||||
# xset -dpms
|
||||
# xset dpms
|
||||
# xautolock -restart
|
||||
# fi
|
||||
# elif [ ${cmd} == "set" ] ; then
|
||||
# minutes=15
|
||||
# if [[ -n $2 ]]; then
|
||||
# minutes=$2
|
||||
# fi
|
||||
# xautolock -time ${minutes} -locker i3lock_fk.sh
|
||||
# elif [ ${cmd} == "info" ] ; then
|
||||
# xset -q
|
||||
# else
|
||||
# echo "error: unknown command \"${cmd}\""
|
||||
# fi
|
||||
#}
|
||||
|
||||
#rshift() {
|
||||
# cmd="info"
|
||||
# if [[ -n $1 ]]; then
|
||||
# cmd=$1
|
||||
# fi
|
||||
#
|
||||
# temperature_file="/tmp/temperature.txt"
|
||||
#
|
||||
# if [ ${cmd} == "info" ] ; then
|
||||
# echo "{morning, day, evening, night, bedtime, off}"
|
||||
# return 1
|
||||
# elif
|
||||
# [ ${cmd} == "status" ] ||
|
||||
# [ ${cmd} == "show" ] ||
|
||||
# [ ${cmd} == "display" ] ; then
|
||||
# if [ -f "${temperature_file}" ] ; then
|
||||
# temperature=$(cat /tmp/temperature.txt)
|
||||
# echo "${temperature}K"
|
||||
# else
|
||||
# echo "unknown temperature value"
|
||||
# fi
|
||||
# return 1
|
||||
# elif
|
||||
# [ ${cmd} == "disable" ] ||
|
||||
# [ ${cmd} == "off" ] ; then
|
||||
# redshift -x
|
||||
# return 1
|
||||
# elif [ ${cmd} == "morning" ] ; then
|
||||
# temperature=4500
|
||||
# elif [ ${cmd} == "day" ] ; then
|
||||
# temperature=6500
|
||||
# elif [ ${cmd} == "evening" ] ; then
|
||||
# temperature=3500
|
||||
# elif [ ${cmd} == "night" ] ; then
|
||||
# temperature=2500
|
||||
# elif [ ${cmd} == "bedtime" ] ; then
|
||||
# temperature=1200
|
||||
# else
|
||||
# temperature=${cmd}
|
||||
# fi
|
||||
#
|
||||
# echo "setting temperature to ${temperature}K"
|
||||
# echo ${temperature} > ${temperature_file}
|
||||
# redshift -P -O ${temperature}
|
||||
#}
|
||||
|
||||
|
||||
# ---
|
||||
# misc
|
||||
# ---
|
||||
|
||||
#ascii() {
|
||||
# if [[ -n $1 ]] ; then
|
||||
# if [[ $1 == "banner" ]] && [[ -n $2 ]] ; then
|
||||
# figlet -w 200 -f ANSI\ Shadow $2
|
||||
# elif [[ $1 == "date" ]] ; then
|
||||
# date | figlet -w 200 -f future
|
||||
# elif [[ $1 == "info" ]] ; then
|
||||
# echo "toilet -f future Hello, World!"
|
||||
# echo "figlet -f future Hello, World!"
|
||||
# elif [[ $1 == "fav" ]] || [[ $1 == "favs" ]] || [[ $1 == "favorites" ]] ; then
|
||||
# text="Klevstul"
|
||||
# if [[ -n $2 ]]; then
|
||||
# text=$2
|
||||
# fi
|
||||
# echo
|
||||
# echo "3D-ASCII"
|
||||
# figlet -w 200 -f 3D-ASCII ${text}
|
||||
# echo
|
||||
# echo "Alpha"
|
||||
# figlet -w 200 -f Alpha ${text}
|
||||
# echo
|
||||
# echo "ANSI Regular"
|
||||
# figlet -w 200 -f ANSI\ Regular ${text}
|
||||
# echo
|
||||
# echo "Banner3-D"
|
||||
# figlet -w 200 -f Banner3-D ${text}
|
||||
# echo
|
||||
# echo "cyberlarge"
|
||||
# figlet -w 200 -f cyberlarge ${text}
|
||||
# echo
|
||||
# echo "cybermedium"
|
||||
# figlet -w 200 -f cybermedium ${text}
|
||||
# echo
|
||||
# echo "doh"
|
||||
# figlet -w 200 -f doh ${text}
|
||||
# echo
|
||||
# echo "future"
|
||||
# figlet -w 200 -f future ${text}
|
||||
# echo
|
||||
# echo "isometric1"
|
||||
# figlet -w 200 -f isometric1 ${text}
|
||||
# echo
|
||||
# echo "isometric2"
|
||||
# figlet -w 200 -f isometric2 ${text}
|
||||
# echo
|
||||
# echo "s-relief"
|
||||
# figlet -w 200 -f s-relief ${text}
|
||||
# echo
|
||||
# echo "smbraille"
|
||||
# figlet -w 200 -f smbraille ${text}
|
||||
# echo
|
||||
# echo "pagga"
|
||||
# figlet -w 200 -f pagga ${text}
|
||||
# elif [[ $1 == "figlets" ]] ; then
|
||||
# figlets.sh
|
||||
# elif [[ $1 == "fonts" ]] ; then
|
||||
# tree /usr/share/figlet/
|
||||
# elif [[ $1 == "help" ]] ; then
|
||||
# echo "ascii {banner [text], info, fav [text], figlets, fonts, help, toilets}"
|
||||
# elif [[ $1 == "toilets" ]] ; then
|
||||
# toilets.sh
|
||||
# else
|
||||
# toilet -f smbraille Try something else...
|
||||
# fi
|
||||
# else
|
||||
# toilet -f future --rainbow ASCII
|
||||
# fi
|
||||
#}
|
||||
|
||||
# https://boulderappsco.postach.io/post/convert-decimal-to-base-36-alpha-numeric-in-bash-linux
|
||||
function decimal_to_base36(){
|
||||
BASE36=($(echo {0..9} {A..Z}));
|
||||
@@ -566,12 +324,6 @@ nas() {
|
||||
fi
|
||||
}
|
||||
|
||||
# iso-mount() {
|
||||
# sudo mount -o loop "$1" /media/iso
|
||||
# }
|
||||
# alias iso-unmount="sudo umount /media/iso"
|
||||
#
|
||||
|
||||
|
||||
# ---
|
||||
# multimedia
|
||||
|
||||
Reference in New Issue
Block a user