From 508e374007914bdc7430de12d8f72234dfaba1e9 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Tue, 23 Mar 2021 12:09:57 +0100 Subject: [PATCH 01/17] Update wifi_rand_mac.conf --- root/etc/NetworkManager/conf.d/wifi_rand_mac.conf | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/root/etc/NetworkManager/conf.d/wifi_rand_mac.conf b/root/etc/NetworkManager/conf.d/wifi_rand_mac.conf index 5e0411c..503ff0e 100644 --- a/root/etc/NetworkManager/conf.d/wifi_rand_mac.conf +++ b/root/etc/NetworkManager/conf.d/wifi_rand_mac.conf @@ -1,10 +1,14 @@ -[device-mac-randomization] +device-mac-randomization] # "yes" is already the default for scanning wifi.scan-rand-mac-address=yes [connection-mac-randomization] # Randomize MAC for every ethernet connection -# WARNING: you might want to disable this for networks with mac whitelists ethernet.cloned-mac-address=random -# Generate a random MAC for each WiFi and associate the two permanently. -wifi.cloned-mac-address=stable +# Randomize MAC for every WiFi connection +wifi.cloned-mac-address=random + +# Opions: +# permanent: Use HardWare address +# stable: Randomize once and associate it permanently with that network +# random: Randomize MAC for every connection From 6629f2b727c01d514b390156ca66e744471377fb Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Tue, 23 Mar 2021 12:11:13 +0100 Subject: [PATCH 02/17] Update wifi_rand_mac.conf --- root/etc/NetworkManager/conf.d/wifi_rand_mac.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/root/etc/NetworkManager/conf.d/wifi_rand_mac.conf b/root/etc/NetworkManager/conf.d/wifi_rand_mac.conf index 503ff0e..eac8fdc 100644 --- a/root/etc/NetworkManager/conf.d/wifi_rand_mac.conf +++ b/root/etc/NetworkManager/conf.d/wifi_rand_mac.conf @@ -5,8 +5,8 @@ wifi.scan-rand-mac-address=yes [connection-mac-randomization] # Randomize MAC for every ethernet connection ethernet.cloned-mac-address=random -# Randomize MAC for every WiFi connection -wifi.cloned-mac-address=random +# Generate a random MAC for each WiFi and associate the two permanently. +wifi.cloned-mac-address=stable # Opions: # permanent: Use HardWare address From 6d6a0c619e845c47e6a0c92598c250b3baa9c73d Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Tue, 23 Mar 2021 12:19:17 +0100 Subject: [PATCH 03/17] Update wifi_rand_mac.conf --- root/etc/NetworkManager/conf.d/wifi_rand_mac.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/root/etc/NetworkManager/conf.d/wifi_rand_mac.conf b/root/etc/NetworkManager/conf.d/wifi_rand_mac.conf index eac8fdc..631bbc5 100644 --- a/root/etc/NetworkManager/conf.d/wifi_rand_mac.conf +++ b/root/etc/NetworkManager/conf.d/wifi_rand_mac.conf @@ -10,5 +10,7 @@ wifi.cloned-mac-address=stable # Opions: # permanent: Use HardWare address +# preserve: don’t change the MAC address of the device upon activation. # stable: Randomize once and associate it permanently with that network # random: Randomize MAC for every connection + From 638e99af141346ca901b2566bbd634b45bb538dd Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Tue, 23 Mar 2021 12:19:37 +0100 Subject: [PATCH 04/17] Update wifi_rand_mac.conf --- root/etc/NetworkManager/conf.d/wifi_rand_mac.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/root/etc/NetworkManager/conf.d/wifi_rand_mac.conf b/root/etc/NetworkManager/conf.d/wifi_rand_mac.conf index 631bbc5..6d9e90e 100644 --- a/root/etc/NetworkManager/conf.d/wifi_rand_mac.conf +++ b/root/etc/NetworkManager/conf.d/wifi_rand_mac.conf @@ -1,4 +1,4 @@ -device-mac-randomization] +[device-mac-randomization] # "yes" is already the default for scanning wifi.scan-rand-mac-address=yes From f4ba46f8d14cfb3568bc1b407290a0b86fbaf77f Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Tue, 23 Mar 2021 12:20:39 +0100 Subject: [PATCH 05/17] Update wifi_rand_mac.conf --- root/etc/NetworkManager/conf.d/wifi_rand_mac.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/root/etc/NetworkManager/conf.d/wifi_rand_mac.conf b/root/etc/NetworkManager/conf.d/wifi_rand_mac.conf index 6d9e90e..3cd94f8 100644 --- a/root/etc/NetworkManager/conf.d/wifi_rand_mac.conf +++ b/root/etc/NetworkManager/conf.d/wifi_rand_mac.conf @@ -10,7 +10,7 @@ wifi.cloned-mac-address=stable # Opions: # permanent: Use HardWare address -# preserve: don’t change the MAC address of the device upon activation. +# preserve: Don’t change the MAC address of the device upon activation # stable: Randomize once and associate it permanently with that network # random: Randomize MAC for every connection From 760acec4f088cb62465190161486e08160f3206b Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Tue, 23 Mar 2021 12:20:51 +0100 Subject: [PATCH 06/17] Update wifi_rand_mac.conf --- root/etc/NetworkManager/conf.d/wifi_rand_mac.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/root/etc/NetworkManager/conf.d/wifi_rand_mac.conf b/root/etc/NetworkManager/conf.d/wifi_rand_mac.conf index 3cd94f8..06f9e73 100644 --- a/root/etc/NetworkManager/conf.d/wifi_rand_mac.conf +++ b/root/etc/NetworkManager/conf.d/wifi_rand_mac.conf @@ -5,7 +5,7 @@ wifi.scan-rand-mac-address=yes [connection-mac-randomization] # Randomize MAC for every ethernet connection ethernet.cloned-mac-address=random -# Generate a random MAC for each WiFi and associate the two permanently. +# Generate a random MAC for each WiFi and associate the two permanently wifi.cloned-mac-address=stable # Opions: From 91106156213a58fdf8cb421ebf4564590f868430 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Tue, 23 Mar 2021 12:29:28 +0100 Subject: [PATCH 07/17] Update aliases --- home/.config/sh/aliases | 1 + 1 file changed, 1 insertion(+) diff --git a/home/.config/sh/aliases b/home/.config/sh/aliases index 2ab4ad3..e224c70 100755 --- a/home/.config/sh/aliases +++ b/home/.config/sh/aliases @@ -104,6 +104,7 @@ alias iptlistfw='iptables -L FORWARD -n -v --line-numbers' # FORWARD rules alias ip-show='curl https://ipinfo.io/ip' # Show public IP address alias ip-info='curl https://ipinfo.io/json' # Show public IP info (IP,region,country,timezone,...) alias ips="ifconfig -a | grep -oE \"inet6? (addr:)?s?\`reg_ip\`\" | awk '{ sub(/inet6? (addr:)? ?/, \"\"); print }'" +alias mac="ip link show | grep_mac" alias lan-device-scan='nmap -T5 -sP 192.168.0.0-255' alias lan-vuln-scan='nmap -sT -O --script vuln 192.168.0.0-255' alias ports='netstat -tulanp' From 9de00590d0a1f3aea0948f767556c0a786284c7f Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Tue, 23 Mar 2021 12:30:44 +0100 Subject: [PATCH 08/17] Update functions --- home/.config/sh/functions | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/home/.config/sh/functions b/home/.config/sh/functions index ccd6874..f29115c 100755 --- a/home/.config/sh/functions +++ b/home/.config/sh/functions @@ -34,6 +34,12 @@ function dir-size() { fi; } +function randmac() { + sudo ip link set dev $1 down + sudo macchanger -A $1 + sudo ip link set dev $1 up +} + # Go to the root of a git tree cdgit () { git rev-parse --is-inside-work-tree > /dev/null 2>&1 From 251b0e82d237c80898f9a16a1e430f2b6cf7f937 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Tue, 23 Mar 2021 20:17:43 +0000 Subject: [PATCH 09/17] Update .zshrc --- home/.zshrc | 89 +++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 72 insertions(+), 17 deletions(-) diff --git a/home/.zshrc b/home/.zshrc index c8bf12d..18576dd 100755 --- a/home/.zshrc +++ b/home/.zshrc @@ -1,3 +1,16 @@ +#!/usr/bin/zsh + +# ZSH Options +setopt auto_cd # cd by typing directory name if it's not a command +setopt auto_list # automatically list choices on ambiguous completion +setopt auto_menu # automatically use menu completion +setopt always_to_end # move cursor to end if word had one match +setopt interactivecomments # allow comments in interactive mode +setopt magicequalsubst # enable filename expansion for arguments of form `x=expression` +setopt notify # report the status of background jobs immediately +setopt numericglobsort # sort filenames numerically when it makes sense +#setopt correct_all # autocorrect commands + # ZSH files cleanup export ZSH_CACHE="$HOME/.cache/zsh" export ZSH_COMPDUMP="$ZSH_CACHE/zcompdump-$ZSH_VERSION" # for auto/tab completion @@ -9,6 +22,12 @@ export ZSH_COMPDUMP="$ZSH_CACHE/zcompdump-$ZSH_VERSION" # for auto/tab completio HISTFILE="$ZSH_CACHE/history" HISTSIZE=10000 SAVEHIST=10000 +setopt appendhistory # save history entries as soon as they are entered +setopt hist_ignore_space # ignore commands that start with space +setopt hist_verify # show commands with history expansion to user before running it +#setopt hist_ignore_dups # ignore duplicated commands history list +#setopt hist_expire_dups_first # delete duplicates first when HISTFILE size exceeds HISTFILE +#setopt share_history # share command history data between terminals # oh-my-zsh configuration (DISABLED by default, if you want oh-my-zsh, uncomment these) #export ZSH="/usr/share/oh-my-zsh" @@ -17,26 +36,17 @@ SAVEHIST=10000 #ENABLE_CORRECTION="false" #source $ZSH/oh-my-zsh.sh # Run oh-my-zsh -# Basic auto/tab complete +# Completion features (tab) autoload -Uz compinit zmodload -i zsh/complist compinit -d $ZSH_COMPDUMP comp_options+=(globdots) - -# ZSH Options -setopt appendhistory # save history entries as soon as they are entered -#setopt share_history # share history between different instances of the shell -setopt auto_cd # cd by typing directory name if it's not a command -setopt auto_list # automatically list choices on ambiguous completion -setopt auto_menu # automatically use menu completion -setopt always_to_end # move cursor to end if word had one match -#setopt correct_all # autocorrect commands - -zstyle ':completion:*' menu select # # select completions with arrow keys +zstyle ':completion:*' menu select # select completions with arrow keys zstyle ':completion:*' group-name '' # group results by category zstyle ':completion:::::' completer _expand _complete _ignored _approximate #enable approximate matches for completio -autoload -U colors && colors # enable color support +# Color support +#autoload -U colors && colors # Environmental variable exports, including XDG standard definitions [ -f ~/.config/sh/environ ] && source ~/.config/sh/environ @@ -49,8 +59,53 @@ autoload -U colors && colors # enable color support # Load prompt [ -f ~/.config/sh/theme ] && . ~/.config/sh/theme - # Load extensions (should be last) -source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh 2>/dev/null # Syntax highlighting -source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh 2>/dev/null # Auto suggestions -source /usr/share/autojump/autojump.zsh 2>/dev/null # Auto-Jump +. /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh 2>/dev/null # Syntax highlighting +. /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh 2>/dev/null # Auto suggestions +. /usr/share/autojump/autojump.zsh 2>/dev/null # Auto-Jump + +# Syntax highlighting features +if [ -f /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]; then + ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern) + ZSH_HIGHLIGHT_STYLES[default]=none + ZSH_HIGHLIGHT_STYLES[unknown-token]=fg=red,bold + ZSH_HIGHLIGHT_STYLES[reserved-word]=fg=cyan,bold + ZSH_HIGHLIGHT_STYLES[suffix-alias]=fg=green,underline + ZSH_HIGHLIGHT_STYLES[global-alias]=fg=magenta + ZSH_HIGHLIGHT_STYLES[precommand]=fg=green,underline + ZSH_HIGHLIGHT_STYLES[commandseparator]=fg=blue,bold + ZSH_HIGHLIGHT_STYLES[autodirectory]=fg=green,underline + ZSH_HIGHLIGHT_STYLES[path]=underline + ZSH_HIGHLIGHT_STYLES[path_pathseparator]= + ZSH_HIGHLIGHT_STYLES[path_prefix_pathseparator]= + ZSH_HIGHLIGHT_STYLES[globbing]=fg=blue,bold + ZSH_HIGHLIGHT_STYLES[history-expansion]=fg=blue,bold + ZSH_HIGHLIGHT_STYLES[command-substitution]=none + ZSH_HIGHLIGHT_STYLES[command-substitution-delimiter]=fg=magenta + ZSH_HIGHLIGHT_STYLES[process-substitution]=none + ZSH_HIGHLIGHT_STYLES[process-substitution-delimiter]=fg=magenta + ZSH_HIGHLIGHT_STYLES[single-hyphen-option]=fg=magenta + ZSH_HIGHLIGHT_STYLES[double-hyphen-option]=fg=magenta + ZSH_HIGHLIGHT_STYLES[back-quoted-argument]=none + ZSH_HIGHLIGHT_STYLES[back-quoted-argument-delimiter]=fg=blue,bold + ZSH_HIGHLIGHT_STYLES[single-quoted-argument]=fg=yellow + ZSH_HIGHLIGHT_STYLES[double-quoted-argument]=fg=yellow + ZSH_HIGHLIGHT_STYLES[dollar-quoted-argument]=fg=yellow + ZSH_HIGHLIGHT_STYLES[rc-quote]=fg=magenta + ZSH_HIGHLIGHT_STYLES[dollar-double-quoted-argument]=fg=magenta + ZSH_HIGHLIGHT_STYLES[back-double-quoted-argument]=fg=magenta + ZSH_HIGHLIGHT_STYLES[back-dollar-quoted-argument]=fg=magenta + ZSH_HIGHLIGHT_STYLES[assign]=none + ZSH_HIGHLIGHT_STYLES[redirection]=fg=blue,bold + ZSH_HIGHLIGHT_STYLES[comment]=fg=black,bold + ZSH_HIGHLIGHT_STYLES[named-fd]=none + ZSH_HIGHLIGHT_STYLES[numeric-fd]=none + ZSH_HIGHLIGHT_STYLES[arg0]=fg=green + ZSH_HIGHLIGHT_STYLES[bracket-error]=fg=red,bold + ZSH_HIGHLIGHT_STYLES[bracket-level-1]=fg=blue,bold + ZSH_HIGHLIGHT_STYLES[bracket-level-2]=fg=green,bold + ZSH_HIGHLIGHT_STYLES[bracket-level-3]=fg=magenta,bold + ZSH_HIGHLIGHT_STYLES[bracket-level-4]=fg=yellow,bold + ZSH_HIGHLIGHT_STYLES[bracket-level-5]=fg=cyan,bold + ZSH_HIGHLIGHT_STYLES[cursor-matchingbracket]=standout +fi From 51a193be9863da47c8b14c63149839b0e1dbc9f6 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Tue, 23 Mar 2021 20:18:34 +0000 Subject: [PATCH 10/17] Update theme --- home/.config/sh/theme | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/home/.config/sh/theme b/home/.config/sh/theme index 55584fb..f779bba 100755 --- a/home/.config/sh/theme +++ b/home/.config/sh/theme @@ -1,5 +1,8 @@ #!/usr/bin/env zsh +# hide EOL sign ('%') +export PROMPT_EOL_MARK="" + # Color definition GRAY="%F{237}" RED="%F{196}" @@ -18,7 +21,8 @@ git_prompt() { fi } -setopt PROMPT_SUBST + +setopt promptsubst # enable command substitution in prompt # Primary Prompt [ "$EUID" -eq 0 ] && PS1="$RED%n@%m$RESET" || PS1="$GRAY%n@%m$RESET" # user@machine From 70ee76a2bed591bd9d3371ceab2040a45aecd41b Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Tue, 23 Mar 2021 20:18:46 +0000 Subject: [PATCH 11/17] Update keybinds --- home/.config/sh/keybinds | 40 ++++++++++++++++------------------------ 1 file changed, 16 insertions(+), 24 deletions(-) diff --git a/home/.config/sh/keybinds b/home/.config/sh/keybinds index 2901118..8b6f811 100755 --- a/home/.config/sh/keybinds +++ b/home/.config/sh/keybinds @@ -14,13 +14,8 @@ if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )); then zle -N zle-line-finish fi -# Use vim keybindings -bindkey -v - -# [PageUp] - Up a line of history -[[ -n "${terminfo[kpp]}" ]] && bindkey "${terminfo[kpp]}" up-line-or-history -# [PageDown] - Down a line of history -[[ -n "${terminfo[knp]}" ]] && bindkey "${terminfo[knp]}" down-line-or-history +# Use emacs keybindings +bindkey -e # Start typing + [Up-Arrow] - fuzzy find history forward if [[ -n "${terminfo[kcuu1]}" ]]; then @@ -36,39 +31,36 @@ if [[ -n "${terminfo[kcud1]}" ]]; then fi # [Home] - Go to beginning of line -[[ -n "${terminfo[khome]}" ]] && bindkey "${terminfo[khome]}" beginning-of-line +bindkey "^[[H" beginning-of-line # [End] - Go to end of line -[[ -n "${terminfo[kend]}" ]] && bindkey "${terminfo[kend]}" end-of-line +bindkey "^[[F" end-of-line # [Shift-Tab] - move through the completion menu backwards [[ -n "${terminfo[kcbt]}" ]] && bindkey "${terminfo[kcbt]}" reverse-menu-complete # [Backspace] - delete backward bindkey '^?' backward-delete-char -# [Delete] - delete forward -if [[ -n "${terminfo[kdch1]}" ]]; then - bindkey "${terminfo[kdch1]}" delete-char -else - bindkey "^[[3~" delete-char - bindkey "^[3;5~" delete-char -fi +# [Ctrl-Supr] - delete forward +bindkey "^[[3~" delete-char +# [Ctrl-Delete] +bindkey "^[3;5~" kill-word # [Ctrl-Delete] - delete whole forward-word bindkey '^[[3;5~' kill-word - # [Ctrl-RightArrow] - move forward one word bindkey '^[[1;5C' forward-word # [Ctrl-LeftArrow] - move backward one word bindkey '^[[1;5D' backward-word -bindkey '^r' history-incremental-search-backward # [Ctrl-r] - Search backward incrementally for a specified string. The string may begin with ^ to anchor the search to the beginning of the line. -bindkey ' ' magic-space # [Space] - don't do history expansion - -# Edit the current command line in $EDITOR -autoload -U edit-command-line -zle -N edit-command-line -bindkey '\C-x\C-e' edit-command-line +# [Ctrl-r] - Search backward incrementally for a specified string. The string may begin with ^ to anchor the search to the beginning of the line. +bindkey '^r' history-incremental-search-backward +# [PageUp] - Up a line of history +[[ -n "${terminfo[kpp]}" ]] && bindkey "${terminfo[kpp]}" up-line-or-history +# [PageDown] - Down a line of history +[[ -n "${terminfo[knp]}" ]] && bindkey "${terminfo[knp]}" down-line-or-history +# [Space] - do history expansion on space +bindkey ' ' magic-space # [ctrl+space] Accept suggestion from zsh-autosuggestions plugin bindkey '^ ' autosuggest-accept From b5a14fcd27a17152f5073cf931c38d2f405b4edb Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Tue, 23 Mar 2021 20:19:01 +0000 Subject: [PATCH 12/17] Update aliases --- home/.config/sh/aliases | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/home/.config/sh/aliases b/home/.config/sh/aliases index e224c70..202b6d2 100755 --- a/home/.config/sh/aliases +++ b/home/.config/sh/aliases @@ -206,9 +206,23 @@ if [ -x /usr/bin/dircolors ]; then alias vdir='vdir --color=auto' alias grep='grep --color=auto' - alias cgrep='grep --color=always' + alias cgrep='grep --color=always' alias fgrep='fgrep --color=auto' alias egrep='egrep --color=auto' + + alias diff='diff --color=auto' + alias ip='ip --color=auto' + + export LESS_TERMCAP_mb=$'\E[1;31m' # begin blink + export LESS_TERMCAP_md=$'\E[1;36m' # begin bold + export LESS_TERMCAP_me=$'\E[0m' # reset bold/blink + export LESS_TERMCAP_so=$'\E[01;33m' # begin reverse video + export LESS_TERMCAP_se=$'\E[0m' # reset reverse video + export LESS_TERMCAP_us=$'\E[1;32m' # begin underline + export LESS_TERMCAP_ue=$'\E[0m' # reset underline + + # Take advantage of $LS_COLORS for completion as well + zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}" fi # Normalize `open` across Linux, macOS, and Windows. From 3ece65f573d30f267376037877a8ce8d11c21c9d Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Tue, 23 Mar 2021 20:29:37 +0000 Subject: [PATCH 13/17] Delete history --- home/.cache/history | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 home/.cache/history diff --git a/home/.cache/history b/home/.cache/history deleted file mode 100644 index e69de29..0000000 From 9024692f333a26f2cb82d564d6f2d00f907a822a Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Tue, 23 Mar 2021 20:29:52 +0000 Subject: [PATCH 14/17] Create history --- home/.cache/zsh/history | 1 + 1 file changed, 1 insertion(+) create mode 100644 home/.cache/zsh/history diff --git a/home/.cache/zsh/history b/home/.cache/zsh/history new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/home/.cache/zsh/history @@ -0,0 +1 @@ + From 2611bd3b4f54bd74f9cd991c5cf0c88469fd95fb Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Tue, 23 Mar 2021 20:57:53 +0000 Subject: [PATCH 15/17] Update keybinds --- home/.config/sh/keybinds | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/home/.config/sh/keybinds b/home/.config/sh/keybinds index 8b6f811..8b10f0a 100755 --- a/home/.config/sh/keybinds +++ b/home/.config/sh/keybinds @@ -31,22 +31,20 @@ if [[ -n "${terminfo[kcud1]}" ]]; then fi # [Home] - Go to beginning of line -bindkey "^[[H" beginning-of-line +[[ -n "${terminfo[khome]}" ]] && bindkey "${terminfo[khome]}" beginning-of-line || bindkey "^[[H" beginning-of-line # [End] - Go to end of line -bindkey "^[[F" end-of-line +[[ -n "${terminfo[kend]}" ]] && bindkey "${terminfo[kend]}" end-of-line || bindkey "^[[F" end-of-line # [Shift-Tab] - move through the completion menu backwards [[ -n "${terminfo[kcbt]}" ]] && bindkey "${terminfo[kcbt]}" reverse-menu-complete # [Backspace] - delete backward bindkey '^?' backward-delete-char -# [Ctrl-Supr] - delete forward -bindkey "^[[3~" delete-char -# [Ctrl-Delete] -bindkey "^[3;5~" kill-word - +# [Delete] - delete forward +[[ -n "${terminfo[kdch1]}" ]] && bindkey "${terminfo[kdch1]}" delete-char || bindkey "^[[3~" delete-char # [Ctrl-Delete] - delete whole forward-word bindkey '^[[3;5~' kill-word + # [Ctrl-RightArrow] - move forward one word bindkey '^[[1;5C' forward-word # [Ctrl-LeftArrow] - move backward one word From 5d25d5444f82f50acf283ede4ee9f4d5177c88d7 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Tue, 23 Mar 2021 21:20:23 +0000 Subject: [PATCH 16/17] Update vimrc --- home/.config/vim/vimrc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/home/.config/vim/vimrc b/home/.config/vim/vimrc index ad1446c..0103f61 100755 --- a/home/.config/vim/vimrc +++ b/home/.config/vim/vimrc @@ -48,12 +48,18 @@ set splitbelow splitright " Split in more natural way "set listchars=tab:\|\ " Set tab lines "set listchars=tab:\|\- " Set tab lines with - -" SET VIM Locations +" XDG Support +if empty($MYVIMRC) | let $MYVIMRC = expand(':p') | endif + +if empty($XDG_CACHE_HOME) | let $XDG_CACHE_HOME = $HOME."/.cache" | endif +if empty($XDG_CONFIG_HOME) | let $XDG_CONFIG_HOME = $HOME."/.config" | endif +if empty($XDG_DATA_HOME) | let $XDG_CONFIG_HOME = $HOME."/.local/share" | endif + set runtimepath^=$XDG_CONFIG_HOME/vim set runtimepath+=$XDG_DATA_HOME/vim set runtimepath+=$XDG_CONFIG_HOME/vim/after -set packpath^=$XDG_DATA_HOME/vim,$XDG_CONFGI_HOME/vim +set packpath^=$XDG_DATA_HOME/vim,$XDG_CONFIG_HOME/vim set packpath+=$XDG_CONFIG_HOME/vim/after,$XDG_DATA_HOME/vim/after let g:netrw_home = $XDG_DATA_HOME."/vim" @@ -104,7 +110,6 @@ Plugin 'Xuyuanp/nerdtree-git-plugin' " Shows git status in nerd-tree Plugin 'vim-syntastic/syntastic' " Syntax checking Plugin 'PotatoesMaster/i3-vim-syntax' " Add syntax for i3 config Plugin 'jmcantrell/vim-virtualenv' " Manage Virtual Enviroment -Plugin 'wakatime/vim-wakatime' " Install WakaTime (Shows coding time) " Vundle End call vundle#end() filetype plugin indent on From e9a67fe4b5232c2e234eb5ff88548e192443264f Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Tue, 23 Mar 2021 21:41:52 +0000 Subject: [PATCH 17/17] Update aliases --- home/.config/sh/aliases | 1 - 1 file changed, 1 deletion(-) diff --git a/home/.config/sh/aliases b/home/.config/sh/aliases index 202b6d2..6b0cf02 100755 --- a/home/.config/sh/aliases +++ b/home/.config/sh/aliases @@ -104,7 +104,6 @@ alias iptlistfw='iptables -L FORWARD -n -v --line-numbers' # FORWARD rules alias ip-show='curl https://ipinfo.io/ip' # Show public IP address alias ip-info='curl https://ipinfo.io/json' # Show public IP info (IP,region,country,timezone,...) alias ips="ifconfig -a | grep -oE \"inet6? (addr:)?s?\`reg_ip\`\" | awk '{ sub(/inet6? (addr:)? ?/, \"\"); print }'" -alias mac="ip link show | grep_mac" alias lan-device-scan='nmap -T5 -sP 192.168.0.0-255' alias lan-vuln-scan='nmap -sT -O --script vuln 192.168.0.0-255' alias ports='netstat -tulanp'