363 lines
12 KiB
Plaintext
363 lines
12 KiB
Plaintext
#######################################################
|
|
### MOST RECENT REMOVALS AT THE BOTTOM OF THIS PAGE ###
|
|
#######################################################
|
|
|
|
#alias dpi="xrandr --dpi"
|
|
#alias free='free -m' # show sizes in MB
|
|
#alias np='nano -w PKGBUILD'
|
|
#alias package-updates="pacman -Qu"
|
|
|
|
---
|
|
|
|
# DP-2 is laptop display
|
|
#alias res-low="xrandr --output DP-2 --size 1920x1080"
|
|
#alias res-med="xrandr --output DP-2 --size 2560x1440"
|
|
#alias res-high="xrandr --output DP-2 --size 3840x2160"
|
|
|
|
#alias nas-mount="sudo systemctl start mnt-nas.mount"
|
|
#alias nas-unmount="sudo systemctl stop mnt-nas.mount"
|
|
#alias nas-mount-2="sudo mount -v -t cifs //192.168.1.222/fro /mnt/nas -o credentials=/home/poq/syncDir/secrets/misc/lillesorteboks.txt"
|
|
#alias nas-unmount-2="sudo umount /mnt/nas"
|
|
|
|
# # ---
|
|
# # server syncs/backups/deploys
|
|
# # ---
|
|
# srv-guru-backup() {
|
|
# echo "[srv-guru-backup]: <=== download wc2sd/exec/"
|
|
# rsync -v -a --progress --stats --e 'ssh -p 1808' trunk@135.181.193.110:/home/trunk/wc2sd/exec/ /home/poq/syncDir/gitRepos/gi.op.fo/srv.guru/trunk/wc2sd/exec/
|
|
# echo "[srv-guru-backup]: <=== download wc2sd/db/"
|
|
# rsync -v -a --progress --stats -e 'ssh -p 1808' trunk@135.181.193.110:/home/trunk/wc2sd/db/ /home/poq/syncDir/gitRepos/gi.op.fo/srv.guru/trunk/wc2sd/db/
|
|
# echo "[srv-guru-backup]: <=== download cron_export/"
|
|
# rsync -v -a --progress --stats -e 'ssh -p 1808' trunk@135.181.193.110:/home/trunk/cron_export/ /home/poq/syncDir/gitRepos/gi.op.fo/srv.guru/trunk/cron_export/
|
|
# echo "[srv-guru-backup]: <=== download .ssh/"
|
|
# rsync -v -a --progress --stats -e 'ssh -p 1808' trunk@135.181.193.110:/home/trunk/.ssh/ /home/poq/syncDir/gitRepos/gi.op.fo/srv.guru/trunk/.ssh/
|
|
# }
|
|
|
|
# gpx2jon() {
|
|
# cd /home/poq/syncDir/gitRepos/gi.op.fo/gpx2jon/src
|
|
# source venv/bin/activate
|
|
# python archi.py -s /home/poq/syncDir/gitRepos/gi.op.fo/fiodb/db/gpx2jon/sites
|
|
# deactivate
|
|
# }
|
|
# gpx2jon-with-build-all() {
|
|
# gpx2jon
|
|
# frodr.com-build-all
|
|
# }
|
|
|
|
---
|
|
|
|
#alias aafire="aafire -driver curses" # terminal idle "screensaver"
|
|
#alias cacafire="DISPLAY= cacafire" # terminal idle "screensaver"
|
|
#alias cmatrix="cmatrix -a -b -s -u 5" # terminal idle "screensaver"
|
|
#alias mapscii='telnet mapscii.me'
|
|
#alias nr="nitrogen --restore"
|
|
#alias starwars="telnet towel.blinkenlights.nl"
|
|
#alias unimatrix="unimatrix.py" # terminal idle "screensaver"
|
|
#alias weba-connect="ssh -t root@178.156.192.201 -p 1808 'export TERM=xterm; cd /tmp; bash -l'"
|
|
#alias dbgate="/home/poq/syncDir/quick/swas/installationFiles/dbGate/dbgate-latest.AppImage"
|
|
|
|
#
|
|
# # ---
|
|
# # c19vaxno
|
|
# # ---
|
|
# #alias c19vaxno-deploy="/home/poq/syncDir/gitRepos/gitlab.com/c19vaxno/helperScripts/deployToGitlab.sh"
|
|
|
|
# ---
|
|
# hummed
|
|
# ---
|
|
#hummed-activate() {
|
|
# cd /home/poq/syncDir/gitRepos/gi.op.fo/hummed/src
|
|
# source venv/bin/activate
|
|
#}
|
|
#hummed() {
|
|
# hummed-activate
|
|
# python /home/poq/syncDir/gitRepos/gi.op.fo/hummed/src/archi.py "$@"
|
|
# deactivate
|
|
# jump-to-downloads
|
|
#}
|
|
|
|
#noctur.no-build() {
|
|
# jongleur-activate
|
|
# /home/poq/syncDir/gitRepos/gi.op.fo/noctur.no/jongleur/run.sh
|
|
# deactivate
|
|
# jump-to-downloads
|
|
#}
|
|
#noctur.no-build-all() {
|
|
# jongleur-activate
|
|
# /home/poq/syncDir/gitRepos/gi.op.fo/noctur.no/jongleur/runAll.sh
|
|
# deactivate
|
|
# jump-to-downloads
|
|
#}
|
|
#alias noctur.no-deploy="rsync -v -a --progress --stats --delete-delay -e 'ssh -p 1808' /home/poq/syncDir/gitRepos/gi.op.fo/noctur.no/jongleur/html_export/ usr@178.156.192.201:/var/www/noctur.no/jongleur/"
|
|
#christcast.org-build() {
|
|
# jongleur-activate
|
|
# /home/poq/syncDir/gitRepos/gi.op.fo/christcast.org/jongleur/run.sh
|
|
# deactivate
|
|
# jump-to-downloads
|
|
#}
|
|
#christcast.org-build-all() {
|
|
# jongleur-activate
|
|
# /home/poq/syncDir/gitRepos/gi.op.fo/christcast.org/jongleur/runAll.sh
|
|
# deactivate
|
|
# jump-to-downloads
|
|
#}
|
|
#alias christcast.org-deploy="rsync -v -a --progress --stats --delete-delay -e 'ssh -p 1808' /home/poq/syncDir/gitRepos/gi.op.fo/christcast.org/jongleur/html_export/ usr@178.156.192.201:/var/www/christcast.org/jongleur/"
|
|
|
|
---
|
|
|
|
#alias lock="xautolock -locknow"
|
|
|
|
# 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)
|
|
|
|
# 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'))"
|
|
#}
|
|
|
|
|
|
# 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."
|
|
#}
|
|
|
|
|
|
# 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}
|
|
#}
|
|
|
|
#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
|
|
#}
|
|
|
|
# iso-mount() {
|
|
# sudo mount -o loop "$1" /media/iso
|
|
# }
|
|
# alias iso-unmount="sudo umount /media/iso"
|
|
#
|
|
|
|
---
|
|
|
|
#alias keymap="setxkbmap -model pc105 -layout us,no -option grp:caps_toggle,grp_led:scroll"
|