mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2025-08-04 13:17:21 +02:00
Compare commits
No commits in common. "e644ce1111a67b41624516b35c1175717b2c63ba" and "b1bb34a1e49e1f609caf35fedb1b0a474a9836e9" have entirely different histories.
e644ce1111
...
b1bb34a1e4
@ -1,3 +1,5 @@
|
|||||||
|
/** @format */
|
||||||
|
|
||||||
//
|
//
|
||||||
// Remember to start writing at line 2. This is my second attempt at Firefox
|
// Remember to start writing at line 2. This is my second attempt at Firefox
|
||||||
// autoconfig after being taught by LibreAwoo, but this time I am trying to
|
// autoconfig after being taught by LibreAwoo, but this time I am trying to
|
||||||
|
@ -1,16 +1,15 @@
|
|||||||
[General]
|
[General]
|
||||||
# Request setting regulatory domain (ISO-Alpha-2). Check with `iw reg get`.
|
# Request setting regulatory domain (ISO-Alpha-2). Check with `iw reg get`.
|
||||||
# Location-Aided Routing (LAR) or self-managed devices will just set
|
# Location-Aided Routing (LAR) or self-managed devices will just set
|
||||||
# the country by nearby APs which again don't expose that configuration to
|
# the country by nearby APs and for some reason a stock configuration by a
|
||||||
# their administrator in that great detail resulting to devices within the EU
|
# local ISP in my neighbourhood is incorrectly advertising DE rathar than FI
|
||||||
# advertising country DE.
|
# so Lumina gets it wrong. Luckily FI and DE share regulation judging by
|
||||||
# To check/refresh regdomain, `iw wlan0 scan | grep -E "SSID:|Country:"`
|
# https://archive.softwareheritage.org/swh:1:cnt:3f74194de9b0bdcf6052b505067363f17427c28f;origin=https://git.kernel.org/pub/scm/linux/kernel/git/sforshee/wireless-regdb.git;visit=swh:1:snp:1b8d84b34965cbea94ad57200121527c5ad51616;anchor=swh:1:rev:fe05cc94e070c71486047002fc2edf68f5f2a07a;path=/db.txt
|
||||||
|
# To check/refresh regdomain, `iw wlan0 scan | egrep -e "SSID:|Country:"`
|
||||||
Country=FI
|
Country=FI
|
||||||
|
|
||||||
# Stop iwd from destroying and recreating the interface. I think I am having
|
# Legacy compatibility. Doesn't seem necessary on Lumina.
|
||||||
# stability issues with systemd-networkd if I have to restart anything
|
#use_default_interface=true
|
||||||
# networking related by hand, which seems to be mitigated by this.
|
|
||||||
use_default_interface=true
|
|
||||||
|
|
||||||
# Build-in network configuration including DHCP client (and server when
|
# Build-in network configuration including DHCP client (and server when
|
||||||
# tethering), true if not using systemd-networkd!
|
# tethering), true if not using systemd-networkd!
|
||||||
|
35
etc/systemd/network/00-family-visit.network.sample
Normal file
35
etc/systemd/network/00-family-visit.network.sample
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
[Match]
|
||||||
|
Type=ether
|
||||||
|
|
||||||
|
[Link]
|
||||||
|
RequiredForOnline=false
|
||||||
|
#ActivationPolicy=always-up
|
||||||
|
|
||||||
|
[Network]
|
||||||
|
DHCP=false
|
||||||
|
Address=192.168.0.2/24
|
||||||
|
Gateway=192.168.8.1
|
||||||
|
IPv6PrivacyExtensions=true
|
||||||
|
IPv6LinkLocalAddressGenerationMode=stable-privacy
|
||||||
|
DNS=
|
||||||
|
DNS=::1
|
||||||
|
DNS=127.0.0.1
|
||||||
|
Domains=.
|
||||||
|
|
||||||
|
[Match]
|
||||||
|
Type=wlan
|
||||||
|
|
||||||
|
[Link]
|
||||||
|
ActivationPolicy=always-up
|
||||||
|
|
||||||
|
[Network]
|
||||||
|
DHCP=false
|
||||||
|
Address=192.168.0.3/24
|
||||||
|
Gateway=192.168.8.1
|
||||||
|
IPv6PrivacyExtensions=true
|
||||||
|
IPv6LinkLocalAddressGenerationMode=stable-privacy
|
||||||
|
DNS=
|
||||||
|
DNS=::1
|
||||||
|
DNS=127.0.0.1
|
||||||
|
DNS=127.0.0.53
|
||||||
|
Domains=.
|
@ -1,15 +1,25 @@
|
|||||||
[Match]
|
[Match]
|
||||||
|
#MACAddress=
|
||||||
Type=ether
|
Type=ether
|
||||||
|
|
||||||
[Link]
|
[Link]
|
||||||
RequiredForOnline=false
|
RequiredForOnline=false
|
||||||
|
# Takes "ipv4", "ipv6", "both", or "any" (default).
|
||||||
|
RequiredFamilyForOnline=both
|
||||||
# If something else (like NetworkManager) manages network, uncomment
|
# If something else (like NetworkManager) manages network, uncomment
|
||||||
#Unmanaged=true
|
#Unmanaged=true
|
||||||
|
# Always set administrative state to up. Implies RequiredForOnline=true
|
||||||
|
#ActivationPolicy=always-up
|
||||||
# Required for mDNS
|
# Required for mDNS
|
||||||
#Multicast=true
|
#Multicast=true
|
||||||
|
|
||||||
[Network]
|
[Network]
|
||||||
DHCP=true
|
#DHCP=true
|
||||||
|
# /24, /16, /8 are the the class C, B, A networks
|
||||||
|
Address=192.168.0.2/24
|
||||||
|
Gateway=192.168.0.1
|
||||||
|
IPv6PrivacyExtensions=true
|
||||||
|
IPv6LinkLocalAddressGenerationMode=stable-privacy
|
||||||
# systemctl enable systemd-resolved && systemctl start systemd-resolved
|
# systemctl enable systemd-resolved && systemctl start systemd-resolved
|
||||||
# ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
|
# ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
|
||||||
DNS=
|
DNS=
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
[Match]
|
|
||||||
# Dock MACAddress here?
|
|
||||||
MACAddress=ff:ff:ff:ff:ff:ff
|
|
||||||
|
|
||||||
[Link]
|
|
||||||
RequiredForOnline=true
|
|
||||||
# Takes "ipv4", "ipv6", "both", or "any" (default).
|
|
||||||
#RequiredFamilyForOnline=both
|
|
||||||
ActivationPolicy=always-up
|
|
||||||
|
|
||||||
[Network]
|
|
||||||
# /24, /16, /8 are the the class C, B, A networks
|
|
||||||
Address=192.168.0.2/24
|
|
||||||
Gateway=192.168.0.1
|
|
||||||
IPv6PrivacyExtensions=true
|
|
||||||
IPv6LinkLocalAddressGenerationMode=stable-privacy
|
|
@ -4,3 +4,17 @@ Type=none
|
|||||||
|
|
||||||
[Link]
|
[Link]
|
||||||
Unmanaged=true
|
Unmanaged=true
|
||||||
|
#Multicast=false
|
||||||
|
|
||||||
|
[Network]
|
||||||
|
IPv6PrivacyExtensions=true
|
||||||
|
IPv6LinkLocalAddressGenerationMode=stable-privacy
|
||||||
|
Domains=.
|
||||||
|
#MulticastDNS=false
|
||||||
|
#LLMNR=false
|
||||||
|
DNSSEC=true
|
||||||
|
DNSOverTLS=opportunistic
|
||||||
|
DNS=
|
||||||
|
DNS=::1
|
||||||
|
DNS=127.0.0.1
|
||||||
|
DNS=127.0.0.53
|
||||||
|
@ -3,3 +3,17 @@ Type=wireguard
|
|||||||
|
|
||||||
[Link]
|
[Link]
|
||||||
Unmanaged=true
|
Unmanaged=true
|
||||||
|
#Multicast=false
|
||||||
|
|
||||||
|
[Network]
|
||||||
|
IPv6PrivacyExtensions=true
|
||||||
|
IPv6LinkLocalAddressGenerationMode=stable-privacy
|
||||||
|
Domains=.
|
||||||
|
#MulticastDNS=false
|
||||||
|
#LLMNR=false
|
||||||
|
DNSSEC=true
|
||||||
|
DNSOverTLS=opportunistic
|
||||||
|
DNS=
|
||||||
|
DNS=::1
|
||||||
|
DNS=127.0.0.1
|
||||||
|
DNS=127.0.0.53
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
[Match]
|
|
||||||
SSID=ExampleSSID_nomap BusinessSSID_nomap
|
|
||||||
|
|
||||||
[Network]
|
|
||||||
DHCP=false
|
|
||||||
Address=10.1.2.3/8
|
|
||||||
Gateway=10.0.0.1
|
|
@ -1,8 +0,0 @@
|
|||||||
# As opposed to 00-mikaela.preset, this will just enable the units I have
|
|
||||||
# written by myself, although they may call others.
|
|
||||||
enable aminda-duperemove.service
|
|
||||||
enable aminda-duperemove.timer
|
|
||||||
enable aminda-nocron-rebootish.service
|
|
||||||
enable aminda-nocron-rebootish.timer
|
|
||||||
enable aminda-nocron-reboot.service
|
|
||||||
enable aminda-nocron-reboot.timer
|
|
2
etc/xdg/autostart/.gitignore
vendored
2
etc/xdg/autostart/.gitignore
vendored
@ -1,3 +1 @@
|
|||||||
org.telegram.desktop
|
org.telegram.desktop
|
||||||
de.haeckerfelix.Shortwave.desktop
|
|
||||||
io.github.tdesktop_x64.TDesktop.desktop
|
|
||||||
|
@ -1 +0,0 @@
|
|||||||
/var/lib/flatpak/exports/share/applications/de.haeckerfelix.Shortwave.desktop
|
|
@ -1,6 +1,5 @@
|
|||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Name=EasyEffects gapplication service
|
Name=EasyEffects
|
||||||
Exec=/usr/bin/flatpak run com.github.wwmm.easyeffects --gapplication-service
|
Exec=/usr/bin/flatpak run com.github.wwmm.easyeffects --gapplication-service
|
||||||
Type=Application
|
Type=Application
|
||||||
Icon=com.github.wwmm.easyeffects
|
Icon=com.github.wwmm.easyeffects
|
||||||
NoDisplay=true
|
|
||||||
|
@ -1 +0,0 @@
|
|||||||
/var/lib/flatpak/exports/share/applications/io.github.tdesktop_x64.TDesktop.desktop
|
|
121
rc/bashrc
121
rc/bashrc
@ -19,12 +19,19 @@ if [[ "$(id -u)" == "0" ]]; then
|
|||||||
export LC_IDENTIFICATION="en_DK.UTF-8"
|
export LC_IDENTIFICATION="en_DK.UTF-8"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
UNAME=$(uname)
|
||||||
# TOC
|
# TOC
|
||||||
# Defaults etc... M0TZLS
|
# Defaults etc... M0TZLS
|
||||||
# Environment 7RS56S
|
# Environment 7RS56S
|
||||||
# Aliases RJ706I
|
# Aliases RJ706I
|
||||||
# Functions ZGC5QQ
|
# Functions ZGC5QQ
|
||||||
|
|
||||||
|
# enable terminal bell
|
||||||
|
|
||||||
|
if [ -f /usr/bin/xset ]; then
|
||||||
|
(xset b on &)
|
||||||
|
fi
|
||||||
|
|
||||||
##### Defaults etc... M0TZLS #####
|
##### Defaults etc... M0TZLS #####
|
||||||
|
|
||||||
# ~/.bashrc: executed by bash(1) for non-login shells.
|
# ~/.bashrc: executed by bash(1) for non-login shells.
|
||||||
@ -98,16 +105,27 @@ case "$TERM" in
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
# enable color support of ls and also add handy aliases
|
# enable color support of ls and also add handy aliases
|
||||||
if hash dircolors 2> /dev/null; then
|
if [ -x /usr/bin/dircolors ]; then
|
||||||
#test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||||
eval $(dircolors --bourne-shell)
|
|
||||||
alias ls='ls --color=auto'
|
alias ls='ls --color=auto'
|
||||||
alias dir='dir --color=auto'
|
alias dir='dir --color=auto'
|
||||||
alias vdir='vdir --color=auto'
|
alias vdir='vdir --color=auto'
|
||||||
|
|
||||||
|
alias grep='grep --color=auto'
|
||||||
|
alias fgrep='grep -F --color=auto'
|
||||||
|
alias egrep='grep -E --color=auto'
|
||||||
|
fi
|
||||||
|
|
||||||
|
# some more ls aliases
|
||||||
|
if [[ $UNAME != Darwin ]]; then
|
||||||
|
alias ll='ls -alFh --color=auto' && alias la='ls -A --color=auto' && alias l='ls -CF --color=auto'
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $UNAME == Darwin ]]; then
|
||||||
|
alias ls="ls -Gp"
|
||||||
|
alias ll="ls -alFHGp"
|
||||||
|
alias l="ls -CFGp"
|
||||||
fi
|
fi
|
||||||
alias grep='grep --color=auto'
|
|
||||||
alias fgrep='grep -F --color=auto'
|
|
||||||
alias egrep='grep -E --color=auto'
|
|
||||||
|
|
||||||
# Add an "alert" alias for long running commands. Use like so:
|
# Add an "alert" alias for long running commands. Use like so:
|
||||||
# sleep 10; alert
|
# sleep 10; alert
|
||||||
@ -132,57 +150,48 @@ fi
|
|||||||
#Shopt settings.
|
#Shopt settings.
|
||||||
#shopt -s autocd
|
#shopt -s autocd
|
||||||
|
|
||||||
# Kind of my welcome screen when I open a terminal?
|
# Show the hostname, uptime and users logged in on shell start
|
||||||
# Existence of lsb_release implies both being on Linux and me having touched
|
if hash hostname 2> /dev/null; then
|
||||||
# the system, so I can do away with a lot of checks for Darwin
|
(hostname &)
|
||||||
if hash lsb_release 2> /dev/null; then
|
fi
|
||||||
(
|
(uptime &)
|
||||||
export LC_ALL="en_DK.UTF-8"
|
(echo "")
|
||||||
hostname --all-fqdns
|
if [[ $UNAME != Darwin ]]; then
|
||||||
hostname --all-ip-addresses
|
(who -H -w -u | head -n10 &)
|
||||||
printf "\n"
|
(echo "")
|
||||||
printf "$(uptime --pretty)\t$(uptime)\n"
|
# (last -10 -w -x&)
|
||||||
printf "\nPresent:\n"
|
fi
|
||||||
if hash who 2> /dev/null; then
|
|
||||||
who --heading --lookup --mesg --users
|
|
||||||
elif hash last 2> /dev/null; then
|
|
||||||
last --hostlast --dns --present $(date +%R) --fullnames --system --time-format notime
|
|
||||||
fi
|
|
||||||
|
|
||||||
printf "\n"
|
if [[ $UNAME == Darwin ]]; then
|
||||||
df / $HOME --human-readable --output=source,fstype,size,used,avail,pcent | uniq
|
(who -H -u | head -n10 &)
|
||||||
unset LC_ALL
|
(echo "")
|
||||||
)
|
(last -10 &)
|
||||||
|
fi
|
||||||
|
|
||||||
# Only print motivational phrases if username is aminda or mikaela
|
# Only print motivational phrases if username is aminda or mikaela
|
||||||
if [[ $(whoami) == aminda ]] || [[ $(whoami) == mikaela ]]; then
|
if [[ $(whoami) == aminda ]] || [[ $(whoami) == mikaela ]]; then
|
||||||
(
|
|
||||||
printf "\n"
|
|
||||||
# Tavun OM värähtely poistaa ylpeyttä, MA kateutta, NI takertumista. PE leikkaa tietämättömyyden läpi, ME hälventää ahneuden ja rintakehässä värähtelevä HUNG muuntaa vihan.
|
# Tavun OM värähtely poistaa ylpeyttä, MA kateutta, NI takertumista. PE leikkaa tietämättömyyden läpi, ME hälventää ahneuden ja rintakehässä värähtelevä HUNG muuntaa vihan.
|
||||||
# Kuinka asiat ovat (s. 74-75) - Lama Ole Nydahl
|
# Kuinka asiat ovat (s. 74-75) - Lama Ole Nydahl
|
||||||
printf "\tAferoj emas funkcii sin mem... \t OM MANI PEME HUNG...\n"
|
(printf "\u26A7\ufe0e Aferoj emas funkcii sin mem.\n\tFaru jogon, sentu, ne provu perfektecon.\n\t\tDancu kiel neniu rigardas, kvankam estu vidita kaj aŭdata.\nOM MANI PEME HUNG\n")
|
||||||
printf "\tAlways remember the existence of spotlight effect...\n"
|
(printf "\u26A7\ufe0e Any movement at any time is better than nothing.\n")
|
||||||
#(printf "\u26A7\ufe0e Aferoj emas funkcii sin mem.\n\tFaru jogon, sentu, ne provu perfektecon.\n\t\tDancu kiel neniu rigardas, kvankam estu vidita kaj aŭdata.\nOM MANI PEME HUNG\n")
|
(printf "\u2744\ufe0e Take the cold showers, hot ones are a disservice. And walk in cold, which is no excuse just like rain.\n\tOtherwise there will be dry skin and the vagus nerve will be upset leading to anxiety, depression and poor mental health.\n\t\tBesides the environment thanks.\n")
|
||||||
#(printf "\u26A7\ufe0e Any movement at any time is better than nothing.\n")
|
|
||||||
#(printf "\u2744\ufe0e Take the cold showers, hot ones are a disservice. And walk in cold, which is no excuse just like rain.\n\tOtherwise there will be dry skin and the vagus nerve will be upset leading to anxiety, depression and poor mental health.\n\t\tBesides the environment thanks.\n")
|
|
||||||
# Tempus Finis - Takeharu Ishimoto
|
# Tempus Finis - Takeharu Ishimoto
|
||||||
#(printf "\u1f54a\ufe0e \tFine fortasse nihil est vobis dire\n\tFine fortasse nihil est vobis Lucrari\n\tFine fortasse nihil est tamen\n")
|
(printf "\u1f54a\ufe0e \tFine fortasse nihil est vobis dire\n\tFine fortasse nihil est vobis Lucrari\n\tFine fortasse nihil est tamen\n")
|
||||||
#(printf "\u26A7\ufe0e Your adventure begins in the dead of night.\n\u26A7\ufe0e Your road won't be easy, but a rising sun awaits your journey's end.\n\n")
|
#(printf "\u26A7\ufe0e Your adventure begins in the dead of night.\n\u26A7\ufe0e Your road won't be easy, but a rising sun awaits your journey's end.\n\n")
|
||||||
#(printf "\u26A7\ufe0e The darker than black is, the brighter the moon is\n")
|
#(printf "\u26A7\ufe0e The darker than black is, the brighter the moon is\n")
|
||||||
#(printf "\u26A7\ufe0e Agoraphobia/social anxiety advice: \n\tAct like you belong! Like you own the place, but keep everyone comfortable! Remember the Spotlight Effect!\n \t\tMaybe even wear hi-viz so you really belong anywhere \U1F61D \n\t\t\tAnd as always, fake it till you make it!\n")
|
(printf "\u26A7\ufe0e Agoraphobia/social anxiety advice: \n\tAct like you belong! Like you own the place, but keep everyone comfortable! Remember the Spotlight Effect!\n \t\tMaybe even wear hi-viz so you really belong anywhere \U1F61D \n\t\t\tAnd as always, fake it till you make it!\n")
|
||||||
# (printf "\n\u26A7\ufe0e\tThat's what I am, that's what I'll always be\n\u26A7\ufe0e\tI don't wanna be silent 'cause this is my destiny\n\u26A7\ufe0e\tThat's what I was, that's what feels good to me\n\u26A7\ufe0e\tAnd nothing will change me, that's what I'm meant to be.\n\u26A7\ufe0e\t\t—Conchita Wurst: That's What I Am\n\n")
|
# (printf "\n\u26A7\ufe0e\tThat's what I am, that's what I'll always be\n\u26A7\ufe0e\tI don't wanna be silent 'cause this is my destiny\n\u26A7\ufe0e\tThat's what I was, that's what feels good to me\n\u26A7\ufe0e\tAnd nothing will change me, that's what I'm meant to be.\n\u26A7\ufe0e\t\t—Conchita Wurst: That's What I Am\n\n")
|
||||||
#(printf "https://en.m.wikipedia.org/wiki/First_they_came_...#Text\n")
|
#(printf "https://en.m.wikipedia.org/wiki/First_they_came_...#Text\n")
|
||||||
printf "\tMay your heart be your guiding key ;)"
|
elif [[ "$(id -u)" == "0" ]]; then
|
||||||
printf "\n"
|
|
||||||
)
|
|
||||||
elif [[ "$(id -u)" == "0" ]]; then
|
|
||||||
# This comes from Charybdis IRCd
|
# This comes from Charybdis IRCd
|
||||||
(printf "\nWe would like to take this moment to remind you that we accept\nabsolutely no liability for the insanity you're about to endure.\n\n")
|
(printf "\nWe would like to take this moment to remind you that we accept\nabsolutely no liability for the insanity you're about to endure.\n\n")
|
||||||
# And this from sudo + the general advice for auditability
|
# And this from sudo + the general advice for auditability
|
||||||
(printf "We trust you have received the usual lecture from the local System\nAdministrator. It usually boils down to these three things:\n\n\t#1) Respect the privacy of others.\n\t#2) Think before you type.\n\t#3) With great power comes great responsibility.\n\nAdditionally you shouldn't be logging in as root directly.\n\n")
|
(printf "We trust you have received the usual lecture from the local System\nAdministrator. It usually boils down to these three things:\n\n\t#1) Respect the privacy of others.\n\t#2) Think before you type.\n\t#3) With great power comes great responsibility.\n\nAdditionally you shouldn't be logging in as root directly.\n\n")
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# fix dircolors for Selenized https://github.com/jan-warchol/selenized/blob/master/other-apps/dircolors/README.md
|
||||||
|
export LS_COLORS="$LS_COLORS:ow=1;7;34:st=30;44:su=30;41"
|
||||||
|
|
||||||
##### Environment 7RS56S #####
|
##### Environment 7RS56S #####
|
||||||
# Environment should be placed to .environment or .bash_environment.
|
# Environment should be placed to .environment or .bash_environment.
|
||||||
|
|
||||||
@ -231,6 +240,10 @@ export LESS_TERMCAP_so=$'\E[01;44;33m'
|
|||||||
export LESS_TERMCAP_ue=$'\E[0m'
|
export LESS_TERMCAP_ue=$'\E[0m'
|
||||||
export LESS_TERMCAP_us=$'\E[01;32m'
|
export LESS_TERMCAP_us=$'\E[01;32m'
|
||||||
|
|
||||||
|
# Sets environment variable CPUARCH to output of "uname -p" & UNAME to "uname"
|
||||||
|
UNAME=$(uname)
|
||||||
|
CPUARCH=$(uname -p)
|
||||||
|
|
||||||
# If we are on Linux, enable apt progress bar and colours
|
# If we are on Linux, enable apt progress bar and colours
|
||||||
#if [[ $USER == "root" ]]; then
|
#if [[ $USER == "root" ]]; then
|
||||||
# mkdir -p /etc/apt/apt.conf.d/
|
# mkdir -p /etc/apt/apt.conf.d/
|
||||||
@ -373,6 +386,19 @@ alias supybot-check-plugin-trans="sandbox/check_trans.py plugins/"
|
|||||||
alias supybot-check-core-trans="sandbox/check_trans.py --core"
|
alias supybot-check-core-trans="sandbox/check_trans.py --core"
|
||||||
alias supybot-generate-messages.pot-mass="find . -type d -exec sh -c '(cd {} && pygettext --docstrings config.py plugin.py)' ';'"
|
alias supybot-generate-messages.pot-mass="find . -type d -exec sh -c '(cd {} && pygettext --docstrings config.py plugin.py)' ';'"
|
||||||
|
|
||||||
|
## -- Start of aliases which are saved from Ubuntu default bashrc. --
|
||||||
|
|
||||||
|
# enable color support of ls and also add handy aliases
|
||||||
|
if [[ $UNAME != Darwin ]]; then
|
||||||
|
alias ls='ls --color=auto'
|
||||||
|
fi
|
||||||
|
# some more ls aliases
|
||||||
|
if [[ $UNAME != Darwin ]]; then
|
||||||
|
alias ll='ls -alFh --color=auto' && alias la='ls -A --color=auto' && alias l='ls -CF --color=auto'
|
||||||
|
fi
|
||||||
|
|
||||||
|
## -- End of aliases which are saved from Ubuntu default bashrc. --
|
||||||
|
|
||||||
# Enable colours for diff when in terminal
|
# Enable colours for diff when in terminal
|
||||||
alias diff="diff --color=auto"
|
alias diff="diff --color=auto"
|
||||||
|
|
||||||
@ -390,6 +416,11 @@ alias sshguard6-unban-all="sudo ip6tables -F sshguard"
|
|||||||
# For locally rsync copying folder1 to folder2.
|
# For locally rsync copying folder1 to folder2.
|
||||||
alias rsync-folder="rsync -h --progress -azvv "
|
alias rsync-folder="rsync -h --progress -azvv "
|
||||||
|
|
||||||
|
# SSHGuard seems to prefer users to run this always when connecting with keys in ssh-agent...
|
||||||
|
#if [[ $UNAME != Darwin ]]; then
|
||||||
|
# alias ssh-add="\ssh-add -D && \ssh-add "
|
||||||
|
#fi
|
||||||
|
|
||||||
# Use GPG2 instead of GPG!
|
# Use GPG2 instead of GPG!
|
||||||
if hash gpg2 2> /dev/null; then
|
if hash gpg2 2> /dev/null; then
|
||||||
alias gpg=gpg2
|
alias gpg=gpg2
|
||||||
@ -921,5 +952,3 @@ fi
|
|||||||
if [ -f ~/.bash_custom ]; then
|
if [ -f ~/.bash_custom ]; then
|
||||||
source ~/.bash_custom
|
source ~/.bash_custom
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# vim: filetype=bash
|
|
||||||
|
143
rc/zshrc
143
rc/zshrc
@ -25,54 +25,33 @@ fi
|
|||||||
# Aliases RJ706I
|
# Aliases RJ706I
|
||||||
# Functions ZGC5QQ
|
# Functions ZGC5QQ
|
||||||
|
|
||||||
# Kind of my welcome screen when I open a terminal?
|
# uname should be readable in $uname
|
||||||
# Existence of lsb_release implies both being on Linux and me having touched
|
uname=$(uname)
|
||||||
# the system, so I can do away with a lot of checks for Darwin
|
UNAME=$(uname)
|
||||||
if hash lsb_release 2> /dev/null; then
|
|
||||||
(
|
|
||||||
export LC_ALL="en_DK.UTF-8"
|
|
||||||
hostname --all-fqdns
|
|
||||||
hostname --all-ip-addresses
|
|
||||||
printf "\n"
|
|
||||||
printf "$(uptime --pretty)\t$(uptime)\n"
|
|
||||||
printf "\nPresent:\n"
|
|
||||||
if hash who 2> /dev/null; then
|
|
||||||
who --heading --lookup --mesg --users
|
|
||||||
elif hash last 2> /dev/null; then
|
|
||||||
last --hostlast --dns --present $(date +%R) --fullnames --system --time-format notime
|
|
||||||
fi
|
|
||||||
printf "\n"
|
|
||||||
df / $HOME --human-readable --output=source,fstype,size,used,avail,pcent | uniq
|
|
||||||
unset LC_ALL
|
|
||||||
)
|
|
||||||
|
|
||||||
# Only print motivational phrases if username is aminda or mikaela
|
# Dynamic window title via https://stackoverflow.com/a/20772424
|
||||||
if [[ $(whoami) == aminda ]] || [[ $(whoami) == mikaela ]]; then
|
## BREAKS TMUX TITLE CHANGING WHICH IS BETTER THAN THIS.
|
||||||
(
|
#case $TERM in
|
||||||
printf "\n"
|
# (*xterm* | *rxvt*)
|
||||||
# Tavun OM värähtely poistaa ylpeyttä, MA kateutta, NI takertumista. PE leikkaa tietämättömyyden läpi, ME hälventää ahneuden ja rintakehässä värähtelevä HUNG muuntaa vihan.
|
|
||||||
# Kuinka asiat ovat (s. 74-75) - Lama Ole Nydahl
|
# Write some info to terminal title.
|
||||||
printf "\tAferoj emas funkcii sin mem... \t OM MANI PEME HUNG...\n"
|
# This is seen when the shell prompts for input.
|
||||||
printf "\tAlways remember the existence of spotlight effect...\n"
|
# function precmd {
|
||||||
#(printf "\u26A7\ufe0e Aferoj emas funkcii sin mem.\n\tFaru jogon, sentu, ne provu perfektecon.\n\t\tDancu kiel neniu rigardas, kvankam estu vidita kaj aŭdata.\nOM MANI PEME HUNG\n")
|
# print -Pn "\e]0;zsh%L %(1j,%j job%(2j|s|); ,)%~\a"
|
||||||
#(printf "\u26A7\ufe0e Any movement at any time is better than nothing.\n")
|
# }
|
||||||
#(printf "\u2744\ufe0e Take the cold showers, hot ones are a disservice. And walk in cold, which is no excuse just like rain.\n\tOtherwise there will be dry skin and the vagus nerve will be upset leading to anxiety, depression and poor mental health.\n\t\tBesides the environment thanks.\n")
|
# Write command and args to terminal title.
|
||||||
# Tempus Finis - Takeharu Ishimoto
|
# This is seen while the shell waits for a command to complete.
|
||||||
#(printf "\u1f54a\ufe0e \tFine fortasse nihil est vobis dire\n\tFine fortasse nihil est vobis Lucrari\n\tFine fortasse nihil est tamen\n")
|
# function preexec {
|
||||||
#(printf "\u26A7\ufe0e Your adventure begins in the dead of night.\n\u26A7\ufe0e Your road won't be easy, but a rising sun awaits your journey's end.\n\n")
|
# printf "\033]0;%s\a" "$1"
|
||||||
#(printf "\u26A7\ufe0e The darker than black is, the brighter the moon is\n")
|
# }
|
||||||
#(printf "\u26A7\ufe0e Agoraphobia/social anxiety advice: \n\tAct like you belong! Like you own the place, but keep everyone comfortable! Remember the Spotlight Effect!\n \t\tMaybe even wear hi-viz so you really belong anywhere \U1F61D \n\t\t\tAnd as always, fake it till you make it!\n")
|
#
|
||||||
# (printf "\n\u26A7\ufe0e\tThat's what I am, that's what I'll always be\n\u26A7\ufe0e\tI don't wanna be silent 'cause this is my destiny\n\u26A7\ufe0e\tThat's what I was, that's what feels good to me\n\u26A7\ufe0e\tAnd nothing will change me, that's what I'm meant to be.\n\u26A7\ufe0e\t\t—Conchita Wurst: That's What I Am\n\n")
|
#;;
|
||||||
#(printf "https://en.m.wikipedia.org/wiki/First_they_came_...#Text\n")
|
#esac
|
||||||
printf "\tMay your heart be your guiding key ;)"
|
|
||||||
printf "\n"
|
# enable terminal bell
|
||||||
)
|
|
||||||
elif [[ "$(id -u)" == "0" ]]; then
|
if [[ -f /usr/bin/xset ]]; then
|
||||||
# This comes from Charybdis IRCd
|
(xset b on &)
|
||||||
(printf "\nWe would like to take this moment to remind you that we accept\nabsolutely no liability for the insanity you're about to endure.\n\n")
|
|
||||||
# And this from sudo + the general advice for auditability
|
|
||||||
(printf "We trust you have received the usual lecture from the local System\nAdministrator. It usually boils down to these three things:\n\n\t#1) Respect the privacy of others.\n\t#2) Think before you type.\n\t#3) With great power comes great responsibility.\n\nAdditionally you shouldn't be logging in as root directly.\n\n")
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
##### Defaults etc... M0TZLS #####
|
##### Defaults etc... M0TZLS #####
|
||||||
@ -118,6 +97,9 @@ zstyle ':completion:*' completer _expand _complete _correct _approximate
|
|||||||
zstyle ':completion:*' format 'Completing %d'
|
zstyle ':completion:*' format 'Completing %d'
|
||||||
zstyle ':completion:*' group-name ''
|
zstyle ':completion:*' group-name ''
|
||||||
zstyle ':completion:*' menu select=2
|
zstyle ':completion:*' menu select=2
|
||||||
|
if [[ $UNAME != Darwin ]]; then
|
||||||
|
eval "$(dircolors -b)"
|
||||||
|
fi
|
||||||
#zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
|
#zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
|
||||||
zstyle ':completion:*' list-colors ''
|
zstyle ':completion:*' list-colors ''
|
||||||
zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
|
zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
|
||||||
@ -130,9 +112,48 @@ zstyle ':completion:*' verbose true
|
|||||||
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
|
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
|
||||||
zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
|
zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
|
||||||
|
|
||||||
if hash dircolors 2> /dev/null; then
|
# Show the hostname, uptime and users logged in on shell start
|
||||||
eval $(dircolors --bourne-shell)
|
if hash hostname 2> /dev/null; then
|
||||||
|
(hostname &)
|
||||||
fi
|
fi
|
||||||
|
(uptime &)
|
||||||
|
(echo "")
|
||||||
|
|
||||||
|
#if [[ $UNAME != Darwin ]] then;
|
||||||
|
# (who -H -w -u|head -n10&)
|
||||||
|
# (echo "")
|
||||||
|
# (last -10 -w -x&)
|
||||||
|
#fi
|
||||||
|
|
||||||
|
#if [[ $UNAME = Darwin ]]; then
|
||||||
|
# (who -H -u|head -n10&)
|
||||||
|
# (echo "")
|
||||||
|
# (last -10&)
|
||||||
|
#fi
|
||||||
|
|
||||||
|
# Only print motivational phrases if username is aminda or mikaela
|
||||||
|
if [[ $(whoami) == aminda ]] || [[ $(whoami) == mikaela ]]; then
|
||||||
|
# Tavun OM värähtely poistaa ylpeyttä, MA kateutta, NI takertumista. PE leikkaa tietämättömyyden läpi, ME hälventää ahneuden ja rintakehässä värähtelevä HUNG muuntaa vihan.
|
||||||
|
# Kuinka asiat ovat (s. 74-75) - Lama Ole Nydahl
|
||||||
|
(printf "\u26A7\ufe0e Aferoj emas funkcii sin mem.\n\tFaru jogon, sentu, ne provu perfektecon.\n\t\tDancu kiel neniu rigardas, kvankam estu vidita kaj aŭdata.\nOM MANI PEME HUNG\n")
|
||||||
|
(printf "\u26A7\ufe0e Any movement at any time is better than nothing.\n")
|
||||||
|
(printf "\u2744\ufe0e Take the cold showers, hot ones are a disservice. And walk in cold, which is no excuse just like rain.\n\tOtherwise there will be dry skin and the vagus nerve will be upset leading to anxiety, depression and poor mental health.\n\t\tBesides the environment thanks.\n")
|
||||||
|
# Tempus Finis - Takeharu Ishimoto
|
||||||
|
(printf "\u1f54a\ufe0e \tFine fortasse nihil est vobis dire\n\tFine fortasse nihil est vobis Lucrari\n\tFine fortasse nihil est tamen\n")
|
||||||
|
#(printf "\u26A7\ufe0e Your adventure begins in the dead of night.\n\u26A7\ufe0e Your road won't be easy, but a rising sun awaits your journey's end.\n\n")
|
||||||
|
#(printf "\u26A7\ufe0e The darker than black is, the brighter the moon is\n")
|
||||||
|
(printf "\u26A7\ufe0e Agoraphobia/social anxiety advice: \n\tAct like you belong! Like you own the place, but keep everyone comfortable! Remember the Spotlight Effect!\n \t\tMaybe even wear hi-viz so you really belong anywhere \U1F61D \n\t\t\tAnd as always, fake it till you make it!\n")
|
||||||
|
# (printf "\n\u26A7\ufe0e\tThat's what I am, that's what I'll always be\n\u26A7\ufe0e\tI don't wanna be silent 'cause this is my destiny\n\u26A7\ufe0e\tThat's what I was, that's what feels good to me\n\u26A7\ufe0e\tAnd nothing will change me, that's what I'm meant to be.\n\u26A7\ufe0e\t\t—Conchita Wurst: That's What I Am\n\n")
|
||||||
|
#(printf "https://en.m.wikipedia.org/wiki/First_they_came_...#Text\n")
|
||||||
|
elif [[ "$(id -u)" == "0" ]]; then
|
||||||
|
# This comes from Charybdis IRCd
|
||||||
|
(printf "\nWe would like to take this moment to remind you that we accept\nabsolutely no liability for the insanity you're about to endure.\n\n")
|
||||||
|
# And this from sudo + the general advice for auditability
|
||||||
|
(printf "We trust you have received the usual lecture from the local System\nAdministrator. It usually boils down to these three things:\n\n\t#1) Respect the privacy of others.\n\t#2) Think before you type.\n\t#3) With great power comes great responsibility.\n\nAdditionally you shouldn't be logging in as root directly.\n\n")
|
||||||
|
fi
|
||||||
|
|
||||||
|
# fix dircolors for Selenized https://github.com/jan-warchol/selenized/blob/master/other-apps/dircolors/README.md
|
||||||
|
export LS_COLORS="$LS_COLORS:ow=1;7;34:st=30;44:su=30;41"
|
||||||
|
|
||||||
##### Environment 7RS56S #####
|
##### Environment 7RS56S #####
|
||||||
# Environment should be placed to .environment or .zsh_environment (or .zshenv).
|
# Environment should be placed to .environment or .zsh_environment (or .zshenv).
|
||||||
@ -185,6 +206,9 @@ export LESS_TERMCAP_so=$'\E[01;44;33m'
|
|||||||
export LESS_TERMCAP_ue=$'\E[0m'
|
export LESS_TERMCAP_ue=$'\E[0m'
|
||||||
export LESS_TERMCAP_us=$'\E[01;32m'
|
export LESS_TERMCAP_us=$'\E[01;32m'
|
||||||
|
|
||||||
|
# Sets environment variable CPUARCH to output of "uname -p" & UNAME to "uname"
|
||||||
|
CPUARCH=$(uname -p)
|
||||||
|
|
||||||
# if gpg[-agent] has sshcontrol file, use it as ssh-agent. sshcontrol should
|
# if gpg[-agent] has sshcontrol file, use it as ssh-agent. sshcontrol should
|
||||||
# include the authentication subkey keygrip from
|
# include the authentication subkey keygrip from
|
||||||
# `gpg --with-keygrip --list-keys`
|
# `gpg --with-keygrip --list-keys`
|
||||||
@ -333,7 +357,10 @@ alias theme="prompt "
|
|||||||
|
|
||||||
## -- Start of aliases which are saved from Ubuntu default bashrc. --
|
## -- Start of aliases which are saved from Ubuntu default bashrc. --
|
||||||
|
|
||||||
alias ls='ls --color=auto'
|
# enable color support of ls and also add handy aliases
|
||||||
|
if [[ $UNAME != Darwin ]]; then
|
||||||
|
alias ls='ls --color=auto'
|
||||||
|
fi
|
||||||
alias dir='dir --color=auto'
|
alias dir='dir --color=auto'
|
||||||
alias vdir='vdir --color=auto'
|
alias vdir='vdir --color=auto'
|
||||||
|
|
||||||
@ -341,6 +368,17 @@ alias grep='grep --color=auto'
|
|||||||
alias fgrep='fgrep -F --color=auto'
|
alias fgrep='fgrep -F --color=auto'
|
||||||
alias egrep='egrep -E --color=auto'
|
alias egrep='egrep -E --color=auto'
|
||||||
|
|
||||||
|
# some more ls aliases
|
||||||
|
if [[ "$UNAME" != "Darwin" ]]; then
|
||||||
|
alias ll='ls -alFh --color=auto' && alias la='ls -A --color=auto' && alias l='ls -CF --color=auto'
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $UNAME = Darwin ]]; then
|
||||||
|
alias ls="ls -Gp"
|
||||||
|
alias ll="ls -alFHGp"
|
||||||
|
alias l="ls -CFGp"
|
||||||
|
fi
|
||||||
|
|
||||||
# Add an "alert" alias for long running commands. Use like so:
|
# Add an "alert" alias for long running commands. Use like so:
|
||||||
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
|
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
|
||||||
|
|
||||||
@ -364,6 +402,9 @@ alias sshguard6-unban-all="sudo ip6tables -F sshguard"
|
|||||||
alias rsync-folder="rsync -h --progress -azvv "
|
alias rsync-folder="rsync -h --progress -azvv "
|
||||||
|
|
||||||
# SSHGuard seems to prefer users to run this always when connecting with keys in ssh-agent...
|
# SSHGuard seems to prefer users to run this always when connecting with keys in ssh-agent...
|
||||||
|
#if [[ $UNAME != Darwin ]]; then
|
||||||
|
# alias ssh-add="\ssh-add -D && \ssh-add "
|
||||||
|
#fi
|
||||||
|
|
||||||
# Use GPG2 instead of GPG!
|
# Use GPG2 instead of GPG!
|
||||||
if hash gpg2 2> /dev/null; then
|
if hash gpg2 2> /dev/null; then
|
||||||
@ -904,5 +945,3 @@ fi
|
|||||||
if [ -f ~/.warnings ]; then
|
if [ -f ~/.warnings ]; then
|
||||||
source ~/.warnings
|
source ~/.warnings
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# vim: filetype=zsh
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user