mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2024-11-29 14:49:31 +01:00
Compare commits
No commits in common. "391ec83b3805feca4ed350e97a6d7d892e70eb06" and "ac6c0addf10d6af48cee4e98a55050670d8ed001" have entirely different histories.
391ec83b38
...
ac6c0addf1
@ -81,7 +81,3 @@
|
|||||||
# see also .mikaela/2src-gitconfig within the same shell-things repo
|
# see also .mikaela/2src-gitconfig within the same shell-things repo
|
||||||
[includeIf "gitdir:~/2src/"]
|
[includeIf "gitdir:~/2src/"]
|
||||||
path = ~/2src/gitconfig
|
path = ~/2src/gitconfig
|
||||||
|
|
||||||
# Don't complain about this path
|
|
||||||
[safe]
|
|
||||||
directory = /home/linuxbrew/.linuxbrew
|
|
||||||
|
@ -1,27 +0,0 @@
|
|||||||
# OK, so this could be a lot more pretty, but it works for ensuring users have
|
|
||||||
# a screenshot directory (even if I still don't know does anything else than
|
|
||||||
# grimshot care about that).
|
|
||||||
|
|
||||||
# root is neither taking screenshots nor using gui
|
|
||||||
if [[ "$(id -u)" != "0" ]]; then
|
|
||||||
# if the configuration file exists, that is good enough indication for me
|
|
||||||
# that the tools are supported.
|
|
||||||
if [[ -f "$(xdg-user-dir)/.config/user-dirs.locale)" ]]; then
|
|
||||||
# If the output differs, the path is set and there is no need to
|
|
||||||
# continue.
|
|
||||||
if [[ $(xdg-user-dir SCREENSHOTS) != $(xdg-user-dir) ]]; then
|
|
||||||
# If we are continuing anyway, ensure existence of locale file and see if it's something I support.
|
|
||||||
touch "$(cat $(xdg-user-dir)/.config/user-dirs.locale)"
|
|
||||||
XDGLOCALE="$(cat $(xdg-user-dir)/.config/user-dirs.locale)"
|
|
||||||
if [[ "$XDGLOCALE" == "fi" || "$XDGLOCALE" == "fi_FI" ]]; then
|
|
||||||
# I would say Kuvankaappaukset, but for some reason KDE Plasma says Kuvakaappaukset, and I don't care enough.
|
|
||||||
xdg-user-dirs-update --set SCREENSHOTS $(xdg-user-dir PICTURES)/Kuvakaappaukset
|
|
||||||
else
|
|
||||||
# Generic English fallack, like I think upstream does.
|
|
||||||
xdg-user-dirs-update --set SCREENSHOTS $(xdg-user-dir PICTURES)/Screenshots
|
|
||||||
fi
|
|
||||||
# Ensure the directory exists.
|
|
||||||
mkdir -p "$(xdg-user-dir SCREENSHOTS)"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
@ -1,15 +0,0 @@
|
|||||||
# https://github.com/Homebrew/brew
|
|
||||||
if [ -d /home/linuxbrew/.linuxbrew/bin ]; then
|
|
||||||
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# https://github.com/nvm-sh/nvm
|
|
||||||
if [ -d ~/.nvm ]; then
|
|
||||||
. ~/.nvm/nvm.sh
|
|
||||||
. ~/.nvm/bash_completion
|
|
||||||
elif [ -d /home/linuxbrew/.linuxbrew/opt/nvm ]; then
|
|
||||||
mkdir -p /home/linuxbrew/.nvm
|
|
||||||
export NVM_DIR=/home/linuxbrew/.nvm
|
|
||||||
. /home/linuxbrew/.linuxbrew/opt/nvm/nvm.sh
|
|
||||||
# . /home/linuxbrew/.linuxbrew/opt/nvm/etc/bash_completion.d/nvm
|
|
||||||
fi
|
|
@ -5,7 +5,6 @@ Wants=sysctl-p--system.service
|
|||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
TimeoutStartSec=infinity
|
TimeoutStartSec=infinity
|
||||||
Environment=LINUXBREWGROUP=wheel
|
|
||||||
# - means it can fail, without failing those after it.
|
# - means it can fail, without failing those after it.
|
||||||
# These aren't given --now as THEY WOULD INFINITE LOOP.
|
# These aren't given --now as THEY WOULD INFINITE LOOP.
|
||||||
ExecStartPre=-/usr/bin/systemctl enable aminda-nocron-rebootish.service
|
ExecStartPre=-/usr/bin/systemctl enable aminda-nocron-rebootish.service
|
||||||
@ -38,8 +37,6 @@ ExecStart=-/usr/bin/systemctl enable --now sshguard.service
|
|||||||
ExecStart=-/usr/bin/systemctl enable --now unbound.service
|
ExecStart=-/usr/bin/systemctl enable --now unbound.service
|
||||||
ExecStart=-/usr/bin/systemctl enable --now chrony.service
|
ExecStart=-/usr/bin/systemctl enable --now chrony.service
|
||||||
ExecStart=-/usr/bin/systemctl enable --now chronyd.service
|
ExecStart=-/usr/bin/systemctl enable --now chronyd.service
|
||||||
ExecStart=-/bin/chown -R root:$LINUXBREWGROUP /home/linuxbrew -R
|
|
||||||
ExecStart=-/bin/setfacl -R -m g:$LINUXBREWGROUP:rwx,o:rx /home/linuxbrew
|
|
||||||
User=root
|
User=root
|
||||||
StandardOutput=journal
|
StandardOutput=journal
|
||||||
StandardError=journal
|
StandardError=journal
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
# in case linuxbrew users have a group separate from wheel, this is the place
|
|
||||||
# to specify it.
|
|
||||||
[Service]
|
|
||||||
Environment=LINUXBREWGROUP=
|
|
||||||
Environment=LINUXBREWGROUP=linuxbrew
|
|
44
rc/bashrc
44
rc/bashrc
@ -144,9 +144,9 @@ if hash lsb_release 2> /dev/null; then
|
|||||||
printf "$(uptime --pretty)\t$(uptime)\n"
|
printf "$(uptime --pretty)\t$(uptime)\n"
|
||||||
printf "\nPresent:\n"
|
printf "\nPresent:\n"
|
||||||
if hash who 2> /dev/null; then
|
if hash who 2> /dev/null; then
|
||||||
who --heading --mesg --users
|
who --heading --lookup --mesg --users
|
||||||
elif hash last 2> /dev/null; then
|
elif hash last 2> /dev/null; then
|
||||||
last --hostlast --present $(date +%R) --fullnames --system --time-format notime
|
last --hostlast --dns --present $(date +%R) --fullnames --system --time-format notime
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf "\n"
|
printf "\n"
|
||||||
@ -270,13 +270,8 @@ export RES_OPTIONS="timeout:2 attempts:2 rotate edns0 trust-ad"
|
|||||||
# https://github.com/go-nv/goenv
|
# https://github.com/go-nv/goenv
|
||||||
if [ -d ~/.goenv/bin ]; then
|
if [ -d ~/.goenv/bin ]; then
|
||||||
export GOENV_ROOT="$HOME/.goenv"
|
export GOENV_ROOT="$HOME/.goenv"
|
||||||
PATH="$GOENV_ROOT/bin:$PATH"
|
PATH="$HOME/.goenv/bin:$PATH"
|
||||||
eval "$(goenv init -)"
|
#goenv init > /dev/null 2>&1
|
||||||
PATH="$GOROOT/bin:$PATH"
|
|
||||||
PATH="$PATH:$GOPATH/bin"
|
|
||||||
elif [ -d /home/linuxbrew/.linuxbrew/opt/goenv ]; then
|
|
||||||
export GOENV_ROOT="$/home/linuxbrew/.linuxbrew/opt/goenv"
|
|
||||||
PATH="$GOENV_ROOT/bin:$PATH"
|
|
||||||
eval "$(goenv init -)"
|
eval "$(goenv init -)"
|
||||||
PATH="$GOROOT/bin:$PATH"
|
PATH="$GOROOT/bin:$PATH"
|
||||||
PATH="$PATH:$GOPATH/bin"
|
PATH="$PATH:$GOPATH/bin"
|
||||||
@ -286,22 +281,14 @@ fi
|
|||||||
if [ -d ~/.nvm ]; then
|
if [ -d ~/.nvm ]; then
|
||||||
. ~/.nvm/nvm.sh
|
. ~/.nvm/nvm.sh
|
||||||
. ~/.nvm/bash_completion
|
. ~/.nvm/bash_completion
|
||||||
elif [ -d /home/linuxbrew/.linuxbrew/opt/nvm ]; then
|
|
||||||
mkdir -p /home/linuxbrew/.nvm
|
|
||||||
export NVM_DIR=/home/linuxbrew/.nvm
|
|
||||||
. /home/linuxbrew/.linuxbrew/opt/nvm/nvm.sh
|
|
||||||
#. /home/linuxbrew/.linuxbrew/opt/nvm/etc/bash_completion.d/nvm
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# https://github.com/rbenv/rbenv
|
# https://github.com/rbenv/rbenv
|
||||||
if [ -d ~/.rbenv/bin ]; then
|
if [ -d ~/.rbenv/bin ]; then
|
||||||
PATH="$HOME/.rbenv/bin:$HOME/.rbenv/shims:$PATH"
|
PATH="$HOME/.rbenv/bin:$HOME/.rbenv/shims:$PATH"
|
||||||
eval "$(rbenv init -)"
|
rbenv init > /dev/null 2>&1
|
||||||
# Remember! And verify it before running!
|
# Remember! And verify it before running!
|
||||||
# git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
|
# git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
|
||||||
elif [ -d /home/linuxbrew/.linuxbrew/opt/rbenv/bin ]; then
|
|
||||||
PATH="/home/linuxbrew/.linuxbrew/opt/rbenv/bin:/home/linuxbrew/.linuxbrew/opt/rbenv/bin/shims:$PATH"
|
|
||||||
eval "$(rbenv init -)"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Add RubyGems to PATH
|
# Add RubyGems to PATH
|
||||||
@ -312,29 +299,18 @@ fi
|
|||||||
# https://github.com/pyenv/pyenv
|
# https://github.com/pyenv/pyenv
|
||||||
if [ -d ~/.pyenv/bin ]; then
|
if [ -d ~/.pyenv/bin ]; then
|
||||||
PATH="$HOME/.pyenv/bin:$HOME/.pyenv/shims:$PATH"
|
PATH="$HOME/.pyenv/bin:$HOME/.pyenv/shims:$PATH"
|
||||||
eval "$(pyenv init -)"
|
pyenv init > /dev/null 2>&1
|
||||||
# Worth considering (and verifying before running)
|
# Worth considering (and verifying before running)
|
||||||
# git clone https://github.com/pyenv/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv
|
# git clone https://github.com/pyenv/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv
|
||||||
# git clone https://github.com/pyenv/pyenv-virtualenvwrapper.git $(pyenv root)/plugins/pyenv-virtualenvwrapper
|
# git clone https://github.com/pyenv/pyenv-virtualenvwrapper.git $(pyenv root)/plugins/pyenv-virtualenvwrapper
|
||||||
elif [ -d /home/linuxbrew/.linuxbrew/opt/pyenv/bin ]; then
|
|
||||||
PATH="/home/linuxbrew/.linuxbrew/opt/pyenv/bin:/home/linuxbrew/.linuxbrew/opt/pyenv/shims:$PATH"
|
|
||||||
eval "$(pyenv init -)"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# https://github.com/nodenv/nodenv
|
# https://github.com/nodenv/nodenv
|
||||||
if [ -d ~/.nodenv/bin ]; then
|
if [ -d ~/.nodenv/bin ]; then
|
||||||
PATH="$HOME/.nodenv/bin:$PATH"
|
PATH="$HOME/.nodenv/bin:$PATH"
|
||||||
eval "$(nodenv init -)"
|
eval "$(nodenv init - bash)"
|
||||||
# Remember! And verify it before running!
|
# Remember! And verify it before running!
|
||||||
# git clone https://github.com/nodenv/node-build.git "$(nodenv root)"/plugins/node-build
|
# git clone https://github.com/nodenv/node-build.git "$(nodenv root)"/plugins/node-build
|
||||||
elif [ -d /home/linuxbrew/.linuxbrew/opt/nodenv/bin ]; then
|
|
||||||
PATH="/home/linuxbrew/.linuxbrew/opt/nodenv/bin:$PATH"
|
|
||||||
eval "$(nodenv init -)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# https://github.com/Homebrew/brew
|
|
||||||
if [ -d /home/linuxbrew/.linuxbrew/bin ]; then
|
|
||||||
eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Removes duplicates from $PATH. Copied from https://unix.stackexchange.com/a/14896
|
# Removes duplicates from $PATH. Copied from https://unix.stackexchange.com/a/14896
|
||||||
@ -929,12 +905,6 @@ else
|
|||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# In Debian there is "sudo adduser whoever whatever", but I keep forgetting
|
|
||||||
# that the more common way is usermod -aG whatever,whereever whoever
|
|
||||||
adduser-to-group() {
|
|
||||||
usermod -aG "$2" "$1"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Source files for miscannellious modifications.
|
# Source files for miscannellious modifications.
|
||||||
|
|
||||||
# acme.sh
|
# acme.sh
|
||||||
|
2
rc/vimrc
2
rc/vimrc
@ -23,7 +23,7 @@ set number " Show line numbers.
|
|||||||
set ruler " Show the line and column number of the cursor position,
|
set ruler " Show the line and column number of the cursor position,
|
||||||
" separated by a comma.
|
" separated by a comma.
|
||||||
|
|
||||||
set background=dark
|
"set background=dark
|
||||||
|
|
||||||
"Use modelines!
|
"Use modelines!
|
||||||
set modeline
|
set modeline
|
||||||
|
44
rc/zshrc
44
rc/zshrc
@ -37,9 +37,9 @@ if hash lsb_release 2> /dev/null; then
|
|||||||
printf "$(uptime --pretty)\t$(uptime)\n"
|
printf "$(uptime --pretty)\t$(uptime)\n"
|
||||||
printf "\nPresent:\n"
|
printf "\nPresent:\n"
|
||||||
if hash who 2> /dev/null; then
|
if hash who 2> /dev/null; then
|
||||||
who --heading --mesg --users
|
who --heading --lookup --mesg --users
|
||||||
elif hash last 2> /dev/null; then
|
elif hash last 2> /dev/null; then
|
||||||
last --hostlast --present $(date +%R) --fullnames --system --time-format notime
|
last --hostlast --dns --present $(date +%R) --fullnames --system --time-format notime
|
||||||
fi
|
fi
|
||||||
printf "\n"
|
printf "\n"
|
||||||
df / $HOME --human-readable --output=source,fstype,size,used,avail,pcent | uniq
|
df / $HOME --human-readable --output=source,fstype,size,used,avail,pcent | uniq
|
||||||
@ -224,13 +224,8 @@ export RES_OPTIONS="timeout:2 attempts:2 rotate edns0 trust-ad"
|
|||||||
# https://github.com/go-nv/goenv
|
# https://github.com/go-nv/goenv
|
||||||
if [ -d ~/.goenv/bin ]; then
|
if [ -d ~/.goenv/bin ]; then
|
||||||
export GOENV_ROOT="$HOME/.goenv"
|
export GOENV_ROOT="$HOME/.goenv"
|
||||||
PATH="$GOENV_ROOT/bin:$PATH"
|
PATH="$HOME/.goenv/bin:$PATH"
|
||||||
eval "$(goenv init -)"
|
#goenv init > /dev/null 2>&1
|
||||||
PATH="$GOROOT/bin:$PATH"
|
|
||||||
PATH="$PATH:$GOPATH/bin"
|
|
||||||
elif [ -d /home/linuxbrew/.linuxbrew/opt/goenv ]; then
|
|
||||||
export GOENV_ROOT="$/home/linuxbrew/.linuxbrew/opt/goenv"
|
|
||||||
PATH="$GOENV_ROOT/bin:$PATH"
|
|
||||||
eval "$(goenv init -)"
|
eval "$(goenv init -)"
|
||||||
PATH="$GOROOT/bin:$PATH"
|
PATH="$GOROOT/bin:$PATH"
|
||||||
PATH="$PATH:$GOPATH/bin"
|
PATH="$PATH:$GOPATH/bin"
|
||||||
@ -240,22 +235,14 @@ fi
|
|||||||
if [ -d ~/.nvm ]; then
|
if [ -d ~/.nvm ]; then
|
||||||
. ~/.nvm/nvm.sh
|
. ~/.nvm/nvm.sh
|
||||||
. ~/.nvm/bash_completion
|
. ~/.nvm/bash_completion
|
||||||
elif [ -d /home/linuxbrew/.linuxbrew/opt/nvm ]; then
|
|
||||||
mkdir -p /home/linuxbrew/.nvm
|
|
||||||
export NVM_DIR=/home/linuxbrew/.nvm
|
|
||||||
. /home/linuxbrew/.linuxbrew/opt/nvm/nvm.sh
|
|
||||||
#. /home/linuxbrew/.linuxbrew/opt/nvm/etc/bash_completion.d/nvm
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# https://github.com/rbenv/rbenv
|
# https://github.com/rbenv/rbenv
|
||||||
if [ -d ~/.rbenv/bin ]; then
|
if [ -d ~/.rbenv/bin ]; then
|
||||||
PATH="$HOME/.rbenv/bin:$HOME/.rbenv/shims:$PATH"
|
PATH="$HOME/.rbenv/bin:$HOME/.rbenv/shims:$PATH"
|
||||||
eval "$(rbenv init -)"
|
rbenv init > /dev/null 2>&1
|
||||||
# Remember! And verify it before running!
|
# Remember! And verify it before running!
|
||||||
# git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
|
# git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
|
||||||
elif [ -d /home/linuxbrew/.linuxbrew/opt/rbenv/bin ]; then
|
|
||||||
PATH="/home/linuxbrew/.linuxbrew/opt/rbenv/bin:/home/linuxbrew/.linuxbrew/opt/rbenv/bin/shims:$PATH"
|
|
||||||
eval "$(rbenv init -)"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Add RubyGems to PATH
|
# Add RubyGems to PATH
|
||||||
@ -266,29 +253,18 @@ fi
|
|||||||
# https://github.com/pyenv/pyenv
|
# https://github.com/pyenv/pyenv
|
||||||
if [ -d ~/.pyenv/bin ]; then
|
if [ -d ~/.pyenv/bin ]; then
|
||||||
PATH="$HOME/.pyenv/bin:$HOME/.pyenv/shims:$PATH"
|
PATH="$HOME/.pyenv/bin:$HOME/.pyenv/shims:$PATH"
|
||||||
eval "$(pyenv init -)"
|
pyenv init > /dev/null 2>&1
|
||||||
# Worth considering (and verifying before running)
|
# Worth considering (and verifying before running)
|
||||||
# git clone https://github.com/pyenv/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv
|
# git clone https://github.com/pyenv/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv
|
||||||
# git clone https://github.com/pyenv/pyenv-virtualenvwrapper.git $(pyenv root)/plugins/pyenv-virtualenvwrapper
|
# git clone https://github.com/pyenv/pyenv-virtualenvwrapper.git $(pyenv root)/plugins/pyenv-virtualenvwrapper
|
||||||
elif [ -d /home/linuxbrew/.linuxbrew/opt/pyenv/bin ]; then
|
|
||||||
PATH="/home/linuxbrew/.linuxbrew/opt/pyenv/bin:/home/linuxbrew/.linuxbrew/opt/pyenv/shims:$PATH"
|
|
||||||
eval "$(pyenv init -)"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# https://github.com/nodenv/nodenv
|
# https://github.com/nodenv/nodenv
|
||||||
if [ -d ~/.nodenv/bin ]; then
|
if [ -d ~/.nodenv/bin ]; then
|
||||||
PATH="$HOME/.nodenv/bin:$PATH"
|
PATH="$HOME/.nodenv/bin:$PATH"
|
||||||
eval "$(nodenv init -)"
|
eval "$(nodenv init - zsh)"
|
||||||
# Remember! And verify it before running!
|
# Remember! And verify it before running!
|
||||||
# git clone https://github.com/nodenv/node-build.git "$(nodenv root)"/plugins/node-build
|
# git clone https://github.com/nodenv/node-build.git "$(nodenv root)"/plugins/node-build
|
||||||
elif [ -d /home/linuxbrew/.linuxbrew/opt/nodenv/bin ]; then
|
|
||||||
PATH="/home/linuxbrew/.linuxbrew/opt/nodenv/bin:$PATH"
|
|
||||||
eval "$(nodenv init -)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# https://github.com/Homebrew/brew
|
|
||||||
if [ -d /home/linuxbrew/.linuxbrew/bin ]; then
|
|
||||||
eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Removes duplicates from $PATH. Copied from https://unix.stackexchange.com/a/14896
|
# Removes duplicates from $PATH. Copied from https://unix.stackexchange.com/a/14896
|
||||||
@ -907,12 +883,6 @@ else
|
|||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# In Debian there is "sudo adduser whoever whatever", but I keep forgetting
|
|
||||||
# that the more common way is usermod -aG whatever,whereever whoever
|
|
||||||
adduser-to-group() {
|
|
||||||
usermod -aG "$2" "$1"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Source files for miscannellious modifications.
|
# Source files for miscannellious modifications.
|
||||||
|
|
||||||
# acme.sh
|
# acme.sh
|
||||||
|
Loading…
Reference in New Issue
Block a user