/ curae ➔ ct
renamed curae to ct (caretaker), plus some bashrc tidying.
This commit is contained in:
@@ -5,15 +5,47 @@
|
|||||||
# If not running interactively, don't do anything
|
# If not running interactively, don't do anything
|
||||||
[[ $- != *i* ]] && return
|
[[ $- != *i* ]] && return
|
||||||
|
|
||||||
|
|
||||||
|
alias mamapscii='telnet mapscii.me'
|
||||||
alias ls='ls --color=auto'
|
alias ls='ls --color=auto'
|
||||||
alias grep='grep --color=auto'
|
alias grep='grep --color=auto'
|
||||||
|
alias azurevpnclient="/opt/microsoft/microsoft-azurevpnclient/microsoft-azurevpnclient"
|
||||||
|
alias ct="sudo ct"
|
||||||
|
alias ct+="sudo ct dots+"
|
||||||
|
alias ctd="sudo ct dots"
|
||||||
|
alias cts="sudo ct sw"
|
||||||
|
alias ffind="sudo find / -type f -name"
|
||||||
|
alias gparted="sudo gparted"
|
||||||
|
alias keymap="setxkbmap -model pc105 -layout us,no -option grp:caps_toggle,grp_led:scroll"
|
||||||
|
alias myip="echo $(wget http://ipinfo.io/ip -qO -)"
|
||||||
|
alias tp="tp.sh"
|
||||||
|
alias package-updates="pacman -Qu"
|
||||||
|
#alias dpi="xrandr --dpi"
|
||||||
|
#alias nr="nitrogen --restore"
|
||||||
|
#alias sb="source ~/.bashrc"
|
||||||
|
#alias cp="cp -i" # confirm before overwriting something
|
||||||
|
#alias df='df -h' # human-readable sizes
|
||||||
|
#alias free='free -m' # show sizes in MB
|
||||||
|
#alias np='nano -w PKGBUILD'
|
||||||
|
#alias more=less
|
||||||
|
|
||||||
|
|
||||||
|
# x terminal shell start string
|
||||||
PS1='[\u@\h \W]\$ '
|
PS1='[\u@\h \W]\$ '
|
||||||
|
|
||||||
|
# change the window title of x terminals
|
||||||
|
case ${TERM} in
|
||||||
|
xterm*|rxvt*|Eterm*|aterm|kterm|gnome*|interix|konsole*)
|
||||||
|
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\007"'
|
||||||
|
;;
|
||||||
|
screen*)
|
||||||
|
PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\033\\"'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
# https://github.com/gsamokovarov/jump
|
# https://github.com/gsamokovarov/jump
|
||||||
eval "$(jump shell --bind=j)"
|
eval "$(jump shell --bind=j)"
|
||||||
|
|
||||||
alias mamapscii='telnet mapscii.me'
|
|
||||||
|
|
||||||
# # ex - archive extractor
|
# # ex - archive extractor
|
||||||
# # usage: ex <file>
|
# # usage: ex <file>
|
||||||
ex ()
|
ex ()
|
||||||
@@ -38,21 +70,6 @@ ex ()
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
alias azurevpnclient="/opt/microsoft/microsoft-azurevpnclient/microsoft-azurevpnclient"
|
|
||||||
alias curae="sudo curae"
|
|
||||||
alias curd+="sudo curae dots+"
|
|
||||||
alias curd="sudo curae dots"
|
|
||||||
alias curs="sudo curae sw"
|
|
||||||
alias dpi="xrandr --dpi"
|
|
||||||
alias ffind="sudo find / -type f -name"
|
|
||||||
alias gparted="sudo gparted"
|
|
||||||
alias keymap="setxkbmap -model pc105 -layout us,no -option grp:caps_toggle,grp_led:scroll"
|
|
||||||
alias myip="echo $(wget http://ipinfo.io/ip -qO -)"
|
|
||||||
alias nr="nitrogen --restore"
|
|
||||||
alias sb="source ~/.bashrc"
|
|
||||||
alias tp="tp.sh"
|
|
||||||
alias package-updates="pacman -Qu"
|
|
||||||
|
|
||||||
nmrestart() {
|
nmrestart() {
|
||||||
systemctl restart NetworkManager
|
systemctl restart NetworkManager
|
||||||
systemctl status NetworkManager
|
systemctl status NetworkManager
|
||||||
@@ -131,22 +148,6 @@ rshift() {
|
|||||||
redshift -P -O ${temperature}
|
redshift -P -O ${temperature}
|
||||||
}
|
}
|
||||||
|
|
||||||
# # Change the window title of X terminals
|
|
||||||
# case ${TERM} in
|
|
||||||
# xterm*|rxvt*|Eterm*|aterm|kterm|gnome*|interix|konsole*)
|
|
||||||
# PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\007"'
|
|
||||||
# ;;
|
|
||||||
# screen*)
|
|
||||||
# PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\033\\"'
|
|
||||||
# ;;
|
|
||||||
# esac
|
|
||||||
|
|
||||||
# alias cp="cp -i" # confirm before overwriting something
|
|
||||||
# alias df='df -h' # human-readable sizes
|
|
||||||
# alias free='free -m' # show sizes in MB
|
|
||||||
# alias np='nano -w PKGBUILD'
|
|
||||||
# #alias more=less
|
|
||||||
|
|
||||||
# ---
|
# ---
|
||||||
# sys stuff
|
# sys stuff
|
||||||
# ---
|
# ---
|
||||||
@@ -228,16 +229,16 @@ podigy() {
|
|||||||
# ---
|
# ---
|
||||||
# hummed
|
# hummed
|
||||||
# ---
|
# ---
|
||||||
hummed-activate() {
|
#hummed-activate() {
|
||||||
cd /home/poq/syncDir/gitRepos/gt.op.fo/hummed/src
|
# cd /home/poq/syncDir/gitRepos/gt.op.fo/hummed/src
|
||||||
source venv/bin/activate
|
# source venv/bin/activate
|
||||||
}
|
#}
|
||||||
hummed() {
|
#hummed() {
|
||||||
hummed-activate
|
# hummed-activate
|
||||||
python /home/poq/syncDir/gitRepos/gt.op.fo/hummed/src/archi.py "$@"
|
# python /home/poq/syncDir/gitRepos/gt.op.fo/hummed/src/archi.py "$@"
|
||||||
deactivate
|
# deactivate
|
||||||
jump-to-downloads
|
# jump-to-downloads
|
||||||
}
|
#}
|
||||||
|
|
||||||
# ---
|
# ---
|
||||||
# jeton
|
# jeton
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# what: curae is latin an means to take care. this script takes care
|
# what: ct - for caretaker
|
||||||
# of the system (adjusted for arch linux).
|
|
||||||
# author: fk
|
# author: fk
|
||||||
# started: may 2024
|
# started: may 2024
|
||||||
#
|
#
|
||||||
@@ -16,12 +15,12 @@
|
|||||||
# WARNING: EXAMINE THE CONTENT BEFORE EXECUTION. RUN AT YOUR OWN RISK.
|
# WARNING: EXAMINE THE CONTENT BEFORE EXECUTION. RUN AT YOUR OWN RISK.
|
||||||
#
|
#
|
||||||
#############################################################################
|
#############################################################################
|
||||||
echo "<< curae.sh >>"
|
echo "<< ct.sh >>"
|
||||||
|
|
||||||
base_url=https://gt.op.fo/fro/lnx-arch/raw/branch/master
|
base_url=https://gt.op.fo/fro/lnx-arch/raw/branch/master
|
||||||
scripts_url=${base_url}/scripts
|
scripts_url=${base_url}/scripts
|
||||||
home_dir=/usr/local/bin
|
home_dir=/usr/local/bin
|
||||||
this_file=curae.sh
|
this_file=ct.sh
|
||||||
|
|
||||||
|
|
||||||
# https://stackoverflow.com/questions/18215973/how-to-check-if-running-as-root-in-a-bash-script
|
# https://stackoverflow.com/questions/18215973/how-to-check-if-running-as-root-in-a-bash-script
|
||||||
31
scripts/ctsetup.sh
Executable file
31
scripts/ctsetup.sh
Executable file
@@ -0,0 +1,31 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# klevstul
|
||||||
|
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# how to download this script (as root):
|
||||||
|
#
|
||||||
|
# cd /tmp
|
||||||
|
# wget https://gt.op.fo/fro/lnx-arch/raw/branch/master/scripts/ctsetup.sh
|
||||||
|
# cat ctsetup.sh # verify the downloaded script (IMPORTANT!)
|
||||||
|
# chmod 755 ctsetup.sh # make the script executable
|
||||||
|
# ./ctsetup.sh # run the script
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
echo "<< ctsetup.sh >>"
|
||||||
|
|
||||||
|
if [ "$EUID" -ne 0 ]
|
||||||
|
then echo "error: run as 'root'"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
base_url=https://gt.op.fo/fro/lnx-arch/raw/branch/master
|
||||||
|
src_url=${base_url}/scripts/ct.sh
|
||||||
|
home_dir=/usr/local/bin
|
||||||
|
|
||||||
|
mkdir -p ${home_dir}
|
||||||
|
wget -q ${src_url} -O ${home_dir}/ct.sh
|
||||||
|
chmod 755 ${home_dir}/ct.sh
|
||||||
|
|
||||||
|
ln -s ${home_dir}/ct.sh /usr/local/bin/ct
|
||||||
|
|
||||||
|
echo "a fresh copy of ct.sh is now located at '${home_dir}/ct.sh'"
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# klevstul
|
|
||||||
|
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
||||||
# how to download this script (as root):
|
|
||||||
#
|
|
||||||
# cd /tmp
|
|
||||||
# wget https://gt.op.fo/fro/lnx-arch/raw/branch/master/scripts/curae_setup.sh
|
|
||||||
# cat curae_setup.sh # verify the downloaded script (IMPORTANT!)
|
|
||||||
# chmod 755 curae_setup.sh # make the script executable
|
|
||||||
# ./curae_setup.sh # run the script
|
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
||||||
echo "<< curae_setup.sh >>"
|
|
||||||
|
|
||||||
if [ "$EUID" -ne 0 ]
|
|
||||||
then echo "error: run as 'root'"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
base_url=https://gt.op.fo/fro/lnx-arch/raw/branch/master
|
|
||||||
src_url=${base_url}/scripts/curae.sh
|
|
||||||
home_dir=/usr/local/bin
|
|
||||||
this_file_name=fk-arc3
|
|
||||||
|
|
||||||
mkdir -p ${home_dir}
|
|
||||||
wget -q ${src_url} -O ${home_dir}/curae.sh
|
|
||||||
chmod 755 ${home_dir}/curae.sh
|
|
||||||
|
|
||||||
ln -s ${home_dir}/curae.sh /usr/local/bin/curae
|
|
||||||
|
|
||||||
echo "a fresh copy of curae.sh is now located at '${home_dir}/curae.sh'"
|
|
||||||
Reference in New Issue
Block a user