Compare commits
14
Commits
macos
..
34e2e7193c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
34e2e7193c | ||
|
|
1a7a850efa | ||
|
|
f24e250f77 | ||
|
|
bbcf389ace | ||
|
|
a92c1c340f | ||
|
|
6e01d0308e | ||
|
|
5653b8caf0 | ||
|
|
d94d9177d3 | ||
|
|
6968a93343 | ||
|
|
6738296ace | ||
|
|
55d2607035 | ||
|
|
df189f9ec1 | ||
|
|
6a53ee36fd | ||
|
|
7000bde368 |
@@ -1,6 +1,3 @@
|
||||
[submodule "3rd-party/z"]
|
||||
path = 3rd-party/z
|
||||
url = https://github.com/rupa/z.git
|
||||
[submodule "3rd-party/complete-alias"]
|
||||
path = 3rd-party/complete-alias
|
||||
url = https://github.com/cykerway/complete-alias.git
|
||||
|
||||
+16
-16
@@ -1,27 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
function basedir() {
|
||||
(cd "$(dirname \"$-2\")" && pwd)
|
||||
}
|
||||
|
||||
function _source_file_if_exists() {
|
||||
if [ -r "$1" ]; then
|
||||
test -n "$DEBUG_BASHRC" && echo "-- Sourcing file $1"
|
||||
test -n "${DEBUG_BASHRC}" && echo "-- Sourcing file $1"
|
||||
source "$1"
|
||||
fi
|
||||
}
|
||||
|
||||
function _source_dir_files() {
|
||||
if [ -d "$1" ]; then
|
||||
test -n "$DEBUG_BASHRC" && echo "-- Sourcing files in directory $1"
|
||||
test -n "${DEBUG_BASHRC}" && echo "-- Sourcing files in directory $1"
|
||||
|
||||
# Safe loops for empty dirs
|
||||
shopt -s nullglob
|
||||
|
||||
for file in "$1"/*; do
|
||||
if [ -e "$file" ]; then
|
||||
test -n "$DEBUG_BASHRC" && echo " * sourcing file $file"
|
||||
source "$file"
|
||||
if [ -e "${file}" ]; then
|
||||
test -n "${DEBUG_BASHRC}" && echo " * sourcing file ${file}"
|
||||
source "${file}"
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -31,14 +25,20 @@ function _source_dir_files() {
|
||||
}
|
||||
|
||||
# Source : https://superuser.com/questions/39751/add-directory-to-path-if-its-not-already-there
|
||||
_path_add() {
|
||||
if [ -d "$1" ] && [[ ":$PATH:" != *":$1:"* ]]; then
|
||||
PATH="${PATH:+"$PATH:"}$1"
|
||||
_path_append() {
|
||||
if [ -d "$1" ] && [[ ":${PATH}:" != *":$1:"* ]]; then
|
||||
PATH="${PATH:+"${PATH}:"}$1"
|
||||
fi
|
||||
}
|
||||
|
||||
_path_prepend() {
|
||||
if [ -d "$1" ] && [[ ":${PATH}:" != *":$1:"* ]]; then
|
||||
PATH="$1${PATH:+":${PATH}"}"
|
||||
fi
|
||||
}
|
||||
|
||||
_prompt_command_add() {
|
||||
if [ -n "$1" ] && [[ ":$PROMPT_COMMAND:" != *":$1:"* ]]; then
|
||||
PROMPT_COMMAND="${PROMPT_COMMAND:+"$PROMPT_COMMAND;"}$1"
|
||||
if [ -n "$1" ] && [[ ":${PROMPT_COMMAND}:" != *":$1:"* ]]; then
|
||||
PROMPT_COMMAND="${PROMPT_COMMAND:+"${PROMPT_COMMAND};"}$1"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
if (command -v bat &>/dev/null); then
|
||||
alias cat=bat
|
||||
fi
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
if (which colordiff &> /dev/null)
|
||||
then
|
||||
alias diff=colordiff
|
||||
|
||||
+1
-3
@@ -1,7 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Colors
|
||||
alias ls='ls -G'
|
||||
alias ls='ls --color=auto'
|
||||
alias grep='grep --color=auto'
|
||||
alias fgrep='fgrep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
|
||||
+1
-3
@@ -1,7 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Fun
|
||||
alias matrix='tr -c "[:digit:]" " " < /dev/urandom | dd cbs=$COLUMNS conv=unblock | GREP_COLOR="1;32" grep --color "[^ ]"'
|
||||
alias matrix='tr -c "[:digit:]" " " < /dev/urandom | dd cbs=${COLUMNS} conv=unblock | GREP_COLOR="1;32" grep --color "[^ ]"'
|
||||
|
||||
if (command -v beep &> /dev/null)
|
||||
then
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Cd
|
||||
alias cdup='cd ..'
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
if [ -f /etc/gentoo-release -a "$UID" -ne 0 ]
|
||||
if [ -f /etc/gentoo-release -a "${UID}" -ne 0 ]
|
||||
then
|
||||
alias emerge='sudo emerge'
|
||||
alias etc-update='sudo etc-update'
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Git
|
||||
if [ -x /usr/bin/git ]; then
|
||||
alias gs='git status'
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
if (command -v 'gopass' && ! command -v pass ) &> /dev/null
|
||||
then
|
||||
alias pass='gopass'
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
# [ "$TERM" = "xterm-kitty" ] && alias ssh="kitty +kitten ssh"
|
||||
if [ -n "${KITTY_INSTALLATION_DIR}" ]; then
|
||||
alias ssh="kitty +kitten ssh"
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
if (command -v kubectl &>/dev/null); then
|
||||
|
||||
# create some usefull aliases
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
if (command -v lsd &> /dev/null)
|
||||
then
|
||||
alias ls='lsd'
|
||||
|
||||
+2
-4
@@ -1,7 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
if (which mc &> /dev/null); then
|
||||
if [ "$TERM" = "rxvt-unicode" ]; then
|
||||
if (command -v mc &> /dev/null); then
|
||||
if [ "${TERM}" = "rxvt-unicode" ]; then
|
||||
alias mc="TERM=rxvt-unicode-256color mc"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Vim Editor
|
||||
if [ -x ~/AppImages/nvim.appimage ]
|
||||
then
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
if (which ovs-appctl &> /dev/null); then alias appctl='sudo ovs-appctl'; fi
|
||||
if (which ovs-vsctl &> /dev/null); then alias vsctl='sudo ovs-vsctl'; fi
|
||||
if (which ovs-ofctl &> /dev/null); then alias ofctl='sudo ovs-ofctl'; fi
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Power
|
||||
alias reboot='sudo reboot'
|
||||
alias halt='sudo halt'
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Security
|
||||
alias rm='rm -i'
|
||||
alias mv='mv -i'
|
||||
|
||||
@@ -1,4 +1,2 @@
|
||||
#!/bin/bash
|
||||
|
||||
# SSH
|
||||
alias ssh!='ssh -q -oStrictHostKeyChecking=no -oIdentitiesOnly=yes'
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
# System tools
|
||||
if [ -f /sbin/ifconfig ] && [ -x /sbin/ifconfig ]; then alias ifconfig='/sbin/ifconfig'; fi
|
||||
if [ -f /sbin/ip ] && [ -x /sbin/ip ]; then alias ip='/sbin/ip'; fi
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
#!/bin/bash
|
||||
|
||||
alias tree='tree -A -C'
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Vim Editor
|
||||
if (command -v nvim &> /dev/null)
|
||||
then
|
||||
|
||||
@@ -1,4 +1,2 @@
|
||||
#!/bin/bash
|
||||
|
||||
if (which zfs &> /dev/null); then alias zfs='sudo zfs'; fi
|
||||
if (which zpool &> /dev/null); then alias zpool='sudo zpool'; fi
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -f "${HOME}"/.nix-profile/etc/profile.d/hm-session-vars.sh ]; then
|
||||
source "${HOME}"/.nix-profile/etc/profile.d/hm-session-vars.sh
|
||||
fi
|
||||
|
||||
@@ -79,7 +79,14 @@ _source_dir_files "${BASH_CONFIG_DIR}"/aliases
|
||||
_source_dir_files "${BASH_CONFIG_DIR}"/aliases.d
|
||||
|
||||
# Source bash completion definitions
|
||||
#for file in /etc/bash*completion /etc/profile.d/bash*completion* ; do source $file ; done
|
||||
# System-wide bash completion (bash-completion package) is expected to
|
||||
# already be wired by the distro itself, typically via
|
||||
# /etc/profile.d/bash_completion.sh for login shells and the package's
|
||||
# own non-login hook — no need to re-source it manually here.
|
||||
#
|
||||
# Use bash-completion, if available
|
||||
[[ $PS1 && -f /usr/share/bash-completion/bash_completion ]] && \
|
||||
. /usr/share/bash-completion/bash_completion
|
||||
|
||||
_source_file_if_exists ~/.bash_completion
|
||||
_source_file_if_exists "${BASH_CONFIG_DIR}"/completion
|
||||
@@ -88,7 +95,7 @@ _source_dir_files "${BASH_CONFIG_DIR}"/completion.d
|
||||
_source_dir_files ~/.nix-profile/share/bash-completion/completions
|
||||
|
||||
if (command -v _complete_alias &>/dev/null); then
|
||||
for alias in $(alias -p | awk '{print $2}' | awk -F= '{print $1}'); do complete -o default -F _complete_alias "$alias"; done
|
||||
for alias in $(alias -p | awk '{print $2}' | awk -F= '{print $1}'); do complete -o default -F _complete_alias "${alias}"; done
|
||||
fi
|
||||
|
||||
# Late customization
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
if (command -v aws && command -v aws_completer) &>/dev/null; then
|
||||
complete -C aws_completer aws
|
||||
fi
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
if (command -v chezmoi &>/dev/null); then
|
||||
source <(chezmoi completion bash)
|
||||
fi
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
if (command -v flux &>/dev/null); then
|
||||
source <(flux completion bash)
|
||||
fi
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
if (command -v glab &>/dev/null); then
|
||||
source <(glab completion)
|
||||
fi
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
if (command -v helm &> /dev/null)
|
||||
then
|
||||
source <( helm completion bash )
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
if (command -v k3d &>/dev/null); then
|
||||
source <(k3d completion bash)
|
||||
fi
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
if (command -v kind &>/dev/null); then
|
||||
source <(kind completion bash)
|
||||
fi
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
if (command -v kubectl &> /dev/null)
|
||||
then
|
||||
source <(kubectl completion bash)
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
if (command -v minikube &>/dev/null); then
|
||||
source <(minikube completion bash)
|
||||
fi
|
||||
|
||||
+2
-3
@@ -1,5 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
if (command -v mise &>/dev/null); then
|
||||
source <(mise completion bash --include-bash-completion-lib)
|
||||
#source <(mise completion bash --include-bash-completion-lib)
|
||||
source <(mise completion bash)
|
||||
fi
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
if (command -v podman &>/dev/null); then
|
||||
source <(podman completion bash)
|
||||
fi
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
if ( command -v poetry &> /dev/null )
|
||||
then
|
||||
source <(poetry completions bash)
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
#SSH
|
||||
#if [ -e ~/.ssh/config ]; then
|
||||
# complete -W "$(cat ~/.ssh/config | egrep -i "^\s*host\s+[a-zA-Z]" | sed -e "s/^host\s*//i")" ssh
|
||||
#fi
|
||||
#
|
||||
#if [ -e ~/.ssh/known_hosts ]; then
|
||||
# complete -W "$(cat ~/.ssh/known_hosts | cut -f 1 -d ' ' | sed -e s/,.*//g | uniq | grep -v "\[")" ssh
|
||||
#fi
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
if (command -v stern &> /dev/null)
|
||||
then
|
||||
source <(stern --completion bash)
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
if (command -v tea &>/dev/null); then
|
||||
source <(tea completion bash)
|
||||
fi
|
||||
|
||||
+1
-31
@@ -2,37 +2,7 @@
|
||||
|
||||
# Define the path to the directory of this file if not already set
|
||||
if [ -z "${BASH_CONFIG_DIR}" ]; then
|
||||
# Define a function to get the real path of a script
|
||||
# (works for most cases : either sourced script or executed script, posix shells)
|
||||
get_script_dir() {
|
||||
local target
|
||||
# Si appelé depuis un script (Bash), on regarde qui a appelé la fonction (${BASH_SOURCE[1]})
|
||||
# Si la fonction est exécutée directement dans le terminal, on se rabat sur ${BASH_SOURCE[0]} ou ${0}
|
||||
if [ -n "${BASH_SOURCE}" ]; then
|
||||
if [ "${#BASH_SOURCE[@]}" -gt 1 ]; then
|
||||
target="${BASH_SOURCE[1]}"
|
||||
else
|
||||
target="${BASH_SOURCE[0]}"
|
||||
fi
|
||||
elif [ -n "${ZSH_VERSION}" ]; then
|
||||
target="${(%):-%x}"
|
||||
else
|
||||
target="${0}"
|
||||
fi
|
||||
|
||||
# Résolution des liens symboliques POSIX
|
||||
while [ -L "${target}" ]; do
|
||||
local link
|
||||
link=$(readlink "${target}")
|
||||
case "${link}" in
|
||||
/*) target="${link}" ;;
|
||||
*) target="$(dirname "${target}")/${link}" ;;
|
||||
esac
|
||||
done
|
||||
|
||||
(cd "$(dirname "${target}")" && pwd -P)
|
||||
}
|
||||
BASH_CONFIG_DIR=$(get_script_dir)
|
||||
BASH_CONFIG_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
|
||||
fi
|
||||
|
||||
cd "${HOME}" || exit 1
|
||||
|
||||
+1
-3
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
function devenv() {
|
||||
|
||||
local status
|
||||
@@ -11,7 +9,7 @@ function devenv() {
|
||||
if [ "${status}" != "RUNNING" ]; then lxc start devenv; fi
|
||||
|
||||
# Rename tmux window if inside tmux
|
||||
if [ -n "$TMUX" ]; then tmux rename-window "devenv"; fi
|
||||
if [ -n "${TMUX}" ]; then tmux rename-window "devenv"; fi
|
||||
|
||||
# Login as user xavier
|
||||
lxc exec devenv -- login -f xavier
|
||||
|
||||
@@ -1 +1 @@
|
||||
grepp() { x=$1; shift; perl -00ne ' print if /'"$x"'/i ' "$*" ; }
|
||||
grepp() { x=$1; shift; perl -00ne ' print if /'"${x}"'/i ' "$*" ; }
|
||||
|
||||
@@ -12,5 +12,5 @@ function ldifparse ()
|
||||
if (length) print
|
||||
next
|
||||
}
|
||||
{print}' "$FILE"
|
||||
{print}' "${FILE}"
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
_path_add() {
|
||||
if [ -d "$1" ] && [[ ":$PATH:" != *":$1:"* ]]; then
|
||||
PATH="${PATH:+"$PATH:"}$1"
|
||||
if [ -d "$1" ] && [[ ":${PATH}:" != *":$1:"* ]]; then
|
||||
PATH="${PATH:+"${PATH}:"}$1"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
_prompt_command_add() {
|
||||
if [ -n "$1" ] && [[ ":$PROMPT_COMMAND:" != *":$1:"* ]]; then
|
||||
PROMPT_COMMAND="${PROMPT_COMMAND:+"$PROMPT_COMMAND;"}$1"
|
||||
if [ -n "$1" ] && [[ ":${PROMPT_COMMAND}:" != *":$1:"* ]]; then
|
||||
PROMPT_COMMAND="${PROMPT_COMMAND:+"${PROMPT_COMMAND};"}$1"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
which virsh || return &> /dev/null
|
||||
|
||||
hypervisor_connect() {
|
||||
|
||||
if [ -e "${1}" ]; then echo "Usage : $0 hypervisor_name_or_ip"; return 1; fi
|
||||
@@ -190,7 +188,7 @@ vm_create_magick2() {
|
||||
template=${3}
|
||||
|
||||
# Define ressources based on template
|
||||
case $template in
|
||||
case ${template} in
|
||||
small)
|
||||
vcpus="1,maxvcpus=2"
|
||||
memory="1024,maxmemory=2048"
|
||||
@@ -264,7 +262,7 @@ _hypervisors() {
|
||||
if [ -e ~/.ssh/known_hosts ]; then
|
||||
known_hypervisors=$(cat ~/.ssh/known_hosts | cut -f 1 -d ' ' | sed -e 's/,.*//g' | grep -v "\[" | grep -i hypervisor | uniq)
|
||||
fi
|
||||
echo $configured_hypervisors $known_hypervisors
|
||||
echo "${configured_hypervisors}" "${known_hypervisors}"
|
||||
}
|
||||
|
||||
#complete -W "$(cat ~/.ssh/config | egrep -i "^\s*host\s+[a-zA-Z]" | sed -e "s/^host\s*//i" | grep -i hypervisor)" hypervisor_connect
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
#ANSI CODES
|
||||
#Code Effect
|
||||
#0 All attributes off
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
function ip_to_hex ()
|
||||
{
|
||||
if test -e "$1" ; then echo "Usage : $0 XXX.XXX.XXX.XXX" ; return ; fi
|
||||
|
||||
+5
-7
@@ -1,19 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
note() {
|
||||
# if file doesn't exist, create it
|
||||
if [[ ! -f $HOME/.notes ]]; then
|
||||
touch "$HOME"/.notes
|
||||
if [[ ! -f "${HOME}/.notes" ]]; then
|
||||
touch "${HOME}"/.notes
|
||||
fi
|
||||
|
||||
if [[ $# -eq 0 ]]; then
|
||||
# no arguments, print file
|
||||
cat "$HOME"/.notes
|
||||
cat "${HOME}"/.notes
|
||||
elif [[ "$1" == "-c" ]]; then
|
||||
# clear file
|
||||
echo "" >"$HOME"/.notes
|
||||
echo "" >"${HOME}"/.notes
|
||||
else
|
||||
# add all arguments to file
|
||||
echo "$@" >>"$HOME"/.notes
|
||||
echo "$@" >>"${HOME}"/.notes
|
||||
fi
|
||||
}
|
||||
|
||||
+13
-15
@@ -1,23 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
encpasswd() {
|
||||
local password_clear=$1
|
||||
local password_md5hash=$(openssl passwd -1 "$password_clear")
|
||||
local password_sha1=$(echo -n "$password_clear" | openssl dgst -sha1)
|
||||
echo "Password : $password_clear"
|
||||
echo "MD5HASH : $password_md5hash"
|
||||
echo "SHA1 : $password_sha1"
|
||||
local password_md5hash=$(openssl passwd -1 "${password_clear}")
|
||||
local password_sha1=$(echo -n "${password_clear}" | openssl dgst -sha1)
|
||||
echo "Password : ${password_clear}"
|
||||
echo "MD5HASH : ${password_md5hash}"
|
||||
echo "SHA1 : ${password_sha1}"
|
||||
}
|
||||
|
||||
genpasswd() {
|
||||
local l=$1
|
||||
[ "$l" == "" ] && l=12
|
||||
[ "${l}" == "" ] && l=12
|
||||
local password_clear=$(tr -dc A-Za-z0-9_ </dev/urandom | head -c "${l}" | xargs)
|
||||
local password_md5hash=$(openssl passwd -1 "$password_clear")
|
||||
local password_sha1=$(echo -n "$password_clear" | openssl dgst -sha1)
|
||||
local password_base64=$(echo -n "$password_clear" | base64)
|
||||
echo "Password : $password_clear"
|
||||
echo "Base64 : $password_base64"
|
||||
echo "MD5HASH : $password_md5hash"
|
||||
echo "SHA1 : $password_sha1"
|
||||
local password_md5hash=$(openssl passwd -1 "${password_clear}")
|
||||
local password_sha1=$(echo -n "${password_clear}" | openssl dgst -sha1)
|
||||
local password_base64=$(echo -n "${password_clear}" | base64)
|
||||
echo "Password : ${password_clear}"
|
||||
echo "Base64 : ${password_base64}"
|
||||
echo "MD5HASH : ${password_md5hash}"
|
||||
echo "SHA1 : ${password_sha1}"
|
||||
}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
function ssh_clean_known_hosts() {
|
||||
if [ -z "$1" ]; then
|
||||
echo "No arguments given. Cleaning ~/.ssh/known_hosts"
|
||||
|
||||
+1
-3
@@ -1,7 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
function term_change_title {
|
||||
case $TERM in
|
||||
case ${TERM} in
|
||||
# Change the window title of X terminals
|
||||
xterm* | rxvt* | urxvt* | Eterm)
|
||||
echo -ne "\033]0;${1}\007"
|
||||
|
||||
+8
-10
@@ -1,22 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
todo() {
|
||||
if [[ ! -f $HOME/.todo ]]; then
|
||||
touch $HOME/.todo
|
||||
if [[ ! -f "${HOME}/.todo" ]]; then
|
||||
touch "${HOME}/.todo"
|
||||
fi
|
||||
|
||||
if [[ $# -eq 0 ]]; then
|
||||
cat $HOME/.todo
|
||||
cat "${HOME}/.todo"
|
||||
elif [[ "$1" == "-l" ]]; then
|
||||
cat -n $HOME/.todo
|
||||
cat -n "${HOME}/.todo"
|
||||
elif [[ "$1" == "-c" ]]; then
|
||||
echo "" > $HOME/.todo
|
||||
echo "" > "${HOME}/.todo"
|
||||
elif [[ "$1" == "-r" ]]; then
|
||||
cat -n $HOME/.todo
|
||||
cat -n "${HOME}/.todo"
|
||||
echo -ne "----------------------------\nType a number to remove: "
|
||||
read NUMBER
|
||||
sed -ie ${NUMBER}d $HOME/.todo
|
||||
sed -ie "${NUMBER}d" "${HOME}/.todo"
|
||||
else
|
||||
echo "$@" >> $HOME/.todo
|
||||
echo "$@" >> "${HOME}/.todo"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
function urxvt_set_font
|
||||
{
|
||||
# set font
|
||||
|
||||
@@ -1,4 +1,2 @@
|
||||
#!/bin/bash
|
||||
|
||||
function prettyxml () { sed -e 's,>,>\n,g'; }
|
||||
|
||||
|
||||
+2
-7
@@ -1,10 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
# https://github.com/riywo/anyenv
|
||||
|
||||
# git clone https://github.com/riywo/anyenv $HOME/.anyenv
|
||||
# git clone https://github.com/riywo/anyenv ${HOME}/.anyenv
|
||||
|
||||
if [ -d "$HOME/.anyenv/bin" ]
|
||||
then
|
||||
export PATH="$HOME/.anyenv/bin:$PATH"
|
||||
fi
|
||||
_path_prepend "${HOME}/.anyenv/bin"
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Customize history format
|
||||
export HISTSIZE=5000
|
||||
export HISTFILESIZE=20000
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
if (command -v keychain &>/dev/null); then
|
||||
eval "$(keychain --inherit any --quiet --noask ~/.ssh/id_{rsa,ed25519})"
|
||||
fi
|
||||
|
||||
+1
-3
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
if (command -v krew &>/dev/null); then
|
||||
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
|
||||
_path_prepend "${KREW_ROOT:-${HOME}/.krew}/bin"
|
||||
fi
|
||||
|
||||
@@ -1,4 +1,2 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Define prefered LANG
|
||||
export LANG=fr_FR.UTF-8
|
||||
|
||||
@@ -1,4 +1,2 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Mail
|
||||
export MAILPATH=~/Mails/
|
||||
|
||||
+4
-6
@@ -1,8 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Customize PATH
|
||||
if [ -d $HOME/.bin ] ; then export PATH=$PATH:$HOME/.bin ; fi
|
||||
if [ -d $HOME/.local/bin ] ; then export PATH=$PATH:$HOME/.local/bin ; fi
|
||||
_path_append "${HOME}/.bin"
|
||||
_path_append "${HOME}/.local/bin"
|
||||
|
||||
if [ -d $HOME/bin ] ; then export PATH=$PATH:$HOME/bin ; fi
|
||||
if [ -d $HOME/scripts ] ; then export PATH=$PATH:$HOME/scripts ; fi
|
||||
_path_append "${HOME}/bin"
|
||||
_path_append "${HOME}/scripts"
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Proxy
|
||||
if [ -x /usr/bin/tsocks ]
|
||||
then
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Defined prefered applications
|
||||
|
||||
# EDITOR
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
#!/bin/bash
|
||||
|
||||
[[ ${BLE_VERSION-} ]] && ble-attach
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
# ble.sh () installed from nix
|
||||
if (command -v blesh-share &>/dev/null); then
|
||||
source "$(blesh-share)"/ble.sh --attach=none # does not work currently
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
if (command -v mise &>/dev/null); then
|
||||
|
||||
# activate mise-en-place (https://mise.jdx.dev/)
|
||||
|
||||
+2
-4
@@ -1,9 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# https://github.com/riywo/anyenv
|
||||
|
||||
# git clone https://github.com/riywo/anyenv $HOME/.anyenv
|
||||
# git clone https://github.com/riywo/anyenv ${HOME}/.anyenv
|
||||
|
||||
if (which anyenv &>/dev/null); then
|
||||
if (command -v anyenv &>/dev/null); then
|
||||
eval "$(anyenv init -)"
|
||||
fi
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -f ~/.asdf/asdf.sh ]; then
|
||||
|
||||
# activate asdf
|
||||
@@ -8,9 +6,7 @@ if [ -f ~/.asdf/asdf.sh ]; then
|
||||
# activate completion
|
||||
source ~/.asdf/completions/asdf.bash
|
||||
|
||||
fi
|
||||
|
||||
if [ -f "$HOME/.nix-profile/share/asdf-vm/asdf.sh" ]; then
|
||||
. "$HOME/.nix-profile/share/asdf-vm/asdf.sh"
|
||||
. "$HOME/.nix-profile/share/bash-completion/completions/asdf.bash"
|
||||
elif [ -f "${HOME}/.nix-profile/share/asdf-vm/asdf.sh" ]; then
|
||||
. "${HOME}/.nix-profile/share/asdf-vm/asdf.sh"
|
||||
. "${HOME}/.nix-profile/share/bash-completion/completions/asdf.bash"
|
||||
fi
|
||||
|
||||
+6
-8
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
if (command -v broot &>/dev/null); then
|
||||
# This script was automatically generated by the broot program
|
||||
# More information can be found in https://github.com/Canop/broot
|
||||
@@ -10,14 +8,14 @@ if (command -v broot &>/dev/null); then
|
||||
function br {
|
||||
local cmd cmd_file code
|
||||
cmd_file=$(mktemp)
|
||||
if broot --outcmd "$cmd_file" "$@"; then
|
||||
cmd=$(<"$cmd_file")
|
||||
rm -f "$cmd_file"
|
||||
eval "$cmd"
|
||||
if broot --outcmd "${cmd_file}" "$@"; then
|
||||
cmd=$(<"${cmd_file}")
|
||||
rm -f "${cmd_file}"
|
||||
eval "${cmd}"
|
||||
else
|
||||
code=$?
|
||||
rm -f "$cmd_file"
|
||||
return "$code"
|
||||
rm -f "${cmd_file}"
|
||||
return "${code}"
|
||||
fi
|
||||
}
|
||||
fi
|
||||
|
||||
+5
-7
@@ -1,7 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Use cgroups
|
||||
if [ "$PS1" ] ; then
|
||||
if [ "${PS1}" ] ; then
|
||||
|
||||
if [ -d /sys/fs/cgroup ] ; then
|
||||
cdir=/sys/fs/cgroup
|
||||
@@ -9,10 +7,10 @@ if [ "$PS1" ] ; then
|
||||
cdir=/dev/cgroup
|
||||
fi
|
||||
|
||||
if [ -d "$cdir/user" ]; then
|
||||
mkdir -p -m 0700 $cdir/user/$$ > /dev/null 2>&1
|
||||
/bin/echo $$ > $cdir/user/$$/tasks
|
||||
/bin/echo '1' > $cdir/user/$$/notify_on_release
|
||||
if [ -d "${cdir}/user" ]; then
|
||||
mkdir -p -m 0700 "${cdir}/user/$$" > /dev/null 2>&1
|
||||
/bin/echo $$ > "${cdir}/user/$$/tasks"
|
||||
/bin/echo '1' > "${cdir}/user/$$/notify_on_release"
|
||||
unset -v cdir
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Enable colors for ls, etc. Prefer ~/.dir_colors #64489
|
||||
if [[ -f ~/.dir_colors ]]; then
|
||||
eval `dircolors -b ~/.dir_colors`
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
if (asdf which direnv &>/dev/null); then
|
||||
# Hook direnv into your shell.
|
||||
eval "$(asdf exec direnv hook bash)"
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
if (command -v fzf &>/dev/null); then
|
||||
|
||||
# Shell integration
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
if (command -v git && command -v fzf) &>/dev/null; then
|
||||
function gsb { git checkout "$(git branch --all | fzf | tr -d '[:space:]')"; }
|
||||
fi
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
# Customize shell history search
|
||||
|
||||
# Indicate your preference order for history tools
|
||||
# The first one found available will be used
|
||||
MY_HISTORY_TOOLS="atuin mcfly"
|
||||
|
||||
for tool in ${MY_HISTORY_TOOLS}; do
|
||||
if (command -v "${tool}" &>/dev/null); then
|
||||
USE_HISTORY_TOOL="${tool}"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
case "${USE_HISTORY_TOOL}" in
|
||||
|
||||
# https://atuin.sh/
|
||||
"atuin")
|
||||
if (command -v atuin &>/dev/null); then
|
||||
eval "$(atuin init bash)"
|
||||
else
|
||||
echo "${USE_HISTORY_TOOL} command not found"
|
||||
fi
|
||||
;;
|
||||
|
||||
# https://github.com/cantino/mcfly
|
||||
"mcfly")
|
||||
if (command -v mcfly &>/dev/null); then
|
||||
export MCFLY_PROMPT="❯ "
|
||||
export MCFLY_INTERFACE_VIEW=BOTTOM
|
||||
export MCFLY_RESULTS=50
|
||||
export MCFLY_RESULTS_SORT=LAST_RUN
|
||||
# export MCFLY_KEY_SCHEME=vim
|
||||
export MCFLY_FUZZY=3
|
||||
eval "$(mcfly init bash)"
|
||||
else
|
||||
echo "${USE_HISTORY_TOOL} command not found"
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
# Default sane bash history behavior
|
||||
export HISTCONTROL=ignoreboth:erasedups
|
||||
export HISTSIZE=10000
|
||||
export HISTFILESIZE=20000
|
||||
shopt -s histappend
|
||||
;;
|
||||
|
||||
esac
|
||||
-11
@@ -1,11 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if (command -v mcfly &>/dev/null); then
|
||||
export MCFLY_PROMPT="❯ "
|
||||
export MCFLY_INTERFACE_VIEW=BOTTOM
|
||||
export MCFLY_RESULTS=50
|
||||
export MCFLY_RESULTS_SORT=LAST_RUN
|
||||
# export MCFLY_KEY_SCHEME=vim
|
||||
export MCFLY_FUZZY=3
|
||||
eval "$(mcfly init bash)"
|
||||
fi
|
||||
+9
-16
@@ -1,14 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Customize the prompt
|
||||
|
||||
# Indicate your preference order for prompt tools
|
||||
# The first one found available will be used
|
||||
MY_PROMPTS="starship powerline-go"
|
||||
MY_PROMPT_TOOLS="starship powerline-go"
|
||||
|
||||
for prompt in $MY_PROMPTS; do
|
||||
if (command -v "$prompt" &>/dev/null); then
|
||||
USE_PROMPT="$prompt"
|
||||
for prompt in ${MY_PROMPT_TOOLS}; do
|
||||
if (command -v "${prompt}" &>/dev/null); then
|
||||
USE_PROMPT="${prompt}"
|
||||
break
|
||||
fi
|
||||
done
|
||||
@@ -25,19 +23,12 @@ case "${USE_PROMPT}" in
|
||||
;;
|
||||
|
||||
# https://github.com/justjanne/powerline-go
|
||||
# -modules string
|
||||
# The list of modules to load, separated by ','
|
||||
# (valid choices: aws, cwd, docker, dotenv, duration, exit, git, gitlite, hg, host, jobs, kube, load, newline, nix-shell, node, perlbrew, perms, root, shell-var, ssh, svn, termtitle, terraform-workspace, time, user, venv, vgo)
|
||||
# (default "nix-shell,venv,user,host,ssh,cwd,perms,git,hg,jobs,exit,root,vgo")
|
||||
# -modules-right string
|
||||
# The list of modules to load anchored to the right, for shells that support it, separated by ','
|
||||
# (valid choices: aws, cwd, docker, dotenv, duration, exit, git, gitlite, hg, host, jobs, kube, load
|
||||
"powerline-go")
|
||||
if (command -v powerline-go &>/dev/null); then
|
||||
function _update_ps1() {
|
||||
PS1=$(powerline-go -jobs "$(jobs -p | wc -l)" -error $? -modules "ssh,host,wsl,user,cwd,direnv,venv,perms,git,jobs,exit,root" -modules-right "docker,docker-context,kube,terraform-workspace,termtitle" -newline)
|
||||
}
|
||||
if [ "$TERM" != "linux" ]; then _prompt_command_add "_update_ps1"; fi
|
||||
if [ "${TERM}" != "linux" ]; then _prompt_command_add "_update_ps1"; fi
|
||||
else
|
||||
echo "${USE_PROMPT} command not found"
|
||||
fi
|
||||
@@ -45,8 +36,7 @@ case "${USE_PROMPT}" in
|
||||
|
||||
*)
|
||||
# Default simple prompt
|
||||
│ PROMPT_DIRTRIM=3 # Limit the path to 3 levels
|
||||
if [ "$UID" -eq 0 ]; then
|
||||
if [ "${UID}" -eq 0 ]; then
|
||||
export PS1='\[\e[01;31m\]\u@\h\[\e[01;34m\] \w \$\[\e[0m\] '
|
||||
else
|
||||
export PS1='\[\e[01;32m\]\u@\h\[\e[01;34m\] \w \$\[\e[0m\] '
|
||||
@@ -55,6 +45,9 @@ case "${USE_PROMPT}" in
|
||||
|
||||
esac
|
||||
|
||||
# Limit the path to 3 levels
|
||||
PROMPT_DIRTRIM=3
|
||||
|
||||
# Add a smiley at end of prompt showing last command status code
|
||||
#smiley() {
|
||||
# ret_val=$?
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Load RVM into a shell session *as a function*
|
||||
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
|
||||
[[ -s "${HOME}/.rvm/scripts/rvm" ]] && source "${HOME}/.rvm/scripts/rvm"
|
||||
|
||||
# Source bash completion for RVM
|
||||
[[ -r "$HOME/.rvm/scripts/completion" ]] && source "$HOME/.rvm/scripts/completion"
|
||||
[[ -r "${HOME}/.rvm/scripts/completion" ]] && source "${HOME}/.rvm/scripts/completion"
|
||||
|
||||
# Add RVM to PATH for scripting
|
||||
[[ -r "$HOME/.rvm/bin" ]] && PATH=$PATH:$HOME/.rvm/bin
|
||||
[[ -r "${HOME}/.rvm/bin" ]] && _path_append "${HOME}/.rvm/bin"
|
||||
|
||||
+2
-4
@@ -1,9 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# GNU Screen stuff
|
||||
if ( which screen &> /dev/null )
|
||||
if ( command -v screen &> /dev/null )
|
||||
then
|
||||
if [[ $TERM != screen* ]]
|
||||
if [[ ${TERM} != screen* ]]
|
||||
then
|
||||
if [ "$(screen -ls | sed -ne 's/[[:space:]]//' -ne 's/(Attached)// p')" ]
|
||||
then
|
||||
|
||||
+6
-6
@@ -1,10 +1,10 @@
|
||||
# Auto startx depending on the VT
|
||||
|
||||
if [[ -z "$DISPLAY" && $(id -u) -ge 1000 ]] ; then
|
||||
if [[ -z "${DISPLAY}" && $(id -u) -ge 1000 ]] ; then
|
||||
|
||||
TTY=$(tty)
|
||||
if [ "$TTY" == "not a tty" ]; then return; fi
|
||||
if [ "${TTY/tty}" != "$TTY" -a $(basename ${TTY/tty}) -le 3 ]
|
||||
if [ "${TTY}" == "not a tty" ]; then return; fi
|
||||
if [ "${TTY/tty}" != "${TTY}" -a "$(basename "${TTY/tty}")" -le 3 ]
|
||||
then
|
||||
|
||||
case $(tty | cut -b9-) in
|
||||
@@ -13,14 +13,14 @@ if [[ -z "$DISPLAY" && $(id -u) -ge 1000 ]] ; then
|
||||
3) VT=vt3 ;;
|
||||
esac
|
||||
|
||||
if ( which ck-launch-session &> /dev/null )
|
||||
if ( command -v ck-launch-session &> /dev/null )
|
||||
then
|
||||
EXEC="exec ck-launch-session"
|
||||
fi
|
||||
|
||||
if ( which startx &> /dev/null )
|
||||
if ( command -v startx &> /dev/null )
|
||||
then
|
||||
$EXEC startx 1> ~/.log/xsession-errors 2>&1 -- $VT
|
||||
${EXEC} startx 1> ~/.log/xsession-errors 2>&1 -- "${VT}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
+5
-7
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Function to update terminal/tmux title
|
||||
_update_terminal_title() {
|
||||
local kubecontext dir gitrepo gitremote icon title
|
||||
@@ -8,14 +6,14 @@ _update_terminal_title() {
|
||||
if [ -n "${KUBECONFIG}" ]; then
|
||||
if command -v kubectl >/dev/null 2>&1; then
|
||||
kubecontext=$(kubectl config current-context 2>/dev/null)
|
||||
if [ -n "$kubecontext" ]; then
|
||||
if [ -n "${kubecontext}" ]; then
|
||||
title=" ${kubecontext}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# If no title is already set, check if we're in $HOME
|
||||
if [ -z "${title}" ] && [ "$PWD" = "$HOME" ]; then
|
||||
# If no title is already set, check if we're in ${HOME}
|
||||
if [ -z "${title}" ] && [ "${PWD}" = "${HOME}" ]; then
|
||||
title=" ~"
|
||||
fi
|
||||
|
||||
@@ -37,7 +35,7 @@ _update_terminal_title() {
|
||||
|
||||
# Set the title in tmux or terminal window
|
||||
if [ -n "${title}" ]; then
|
||||
if [ -n "$TMUX" ]; then
|
||||
if [ -n "${TMUX}" ]; then
|
||||
tmux rename-window "${title}"
|
||||
else
|
||||
printf '\033]0;%s\007' "${title}"
|
||||
@@ -46,4 +44,4 @@ _update_terminal_title() {
|
||||
}
|
||||
|
||||
# Add the function to the PROMPT_COMMAND variable to have regular updates
|
||||
if [ "$TERM" != "linux" ]; then _prompt_command_add "_update_terminal_title"; fi
|
||||
if [ "${TERM}" != "linux" ]; then _prompt_command_add "_update_terminal_title"; fi
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# GNU Screen stuff
|
||||
if (command -v tmux &>/dev/null); then
|
||||
if [ "$(pgrep -u "$UID" "tmux" | wc -l)" -gt 0 ]; then
|
||||
if [[ $TERM != screen* ]]; then
|
||||
if [ "$(pgrep -u "${UID}" "tmux" | wc -l)" -gt 0 ]; then
|
||||
if [[ ${TERM} != screen* ]]; then
|
||||
nb_sessions=$(tmux list-session | wc -l)
|
||||
nb_sessions_attached=$(tmux list-session | grep -c "attached")
|
||||
nb_sessions_detached=$(tmux list-session | grep -c -v "attached")
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -f ~/software/todo.txt-cli/todo.sh ]; then
|
||||
|
||||
export TODOTXT_DEFAULT_ACTION=ls
|
||||
|
||||
+3
-4
@@ -1,4 +1,3 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
#URXVT_FONT_NAME="DejaVu Sans Mono"
|
||||
#URXVT_FONT_SIZE=16
|
||||
@@ -7,16 +6,16 @@
|
||||
## Quick functions
|
||||
#
|
||||
#zp() {
|
||||
# URXVT_FONT_SIZE=$(echo "$URXVT_FONT_SIZE+$URXVT_FONT_INCREMENT" | bc )
|
||||
# URXVT_FONT_SIZE=$(echo "${URXVT_FONT_SIZE}+${URXVT_FONT_INCREMENT}" | bc )
|
||||
# urxvt_set_font "${URXVT_FONT_NAME}:size=${URXVT_FONT_SIZE}"
|
||||
#}
|
||||
#
|
||||
#zm() {
|
||||
# URXVT_FONT_SIZE=$(echo "$URXVT_FONT_SIZE-$URXVT_FONT_INCREMENT" | bc )
|
||||
# URXVT_FONT_SIZE=$(echo "${URXVT_FONT_SIZE}-${URXVT_FONT_INCREMENT}" | bc )
|
||||
# urxvt_set_font "${URXVT_FONT_NAME}:size=${URXVT_FONT_SIZE}"
|
||||
#}
|
||||
#
|
||||
#if [ -z "$SSH_CONNECTION" ]
|
||||
#if [ -z "${SSH_CONNECTION}" ]
|
||||
#then
|
||||
# urxvt_set_font "${URXVT_FONT_NAME}:size=${URXVT_FONT_SIZE}"
|
||||
#fi
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
# INFO:
|
||||
# vivid is a generator for the LS_COLORS environment variable that controls the colorized output of ls, tree, fd, bfs, dust and many other tools.
|
||||
# ➜ https://github.com/sharkdp/vivid
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
if (command -v zoxide &>/dev/null); then
|
||||
eval "$(zoxide init bash)"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user