From 3f157aa097a1c2a32ce9e94e4aca790032e8c223 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sat, 15 Jul 2023 23:17:24 +0200 Subject: cleanup on config --- config/common/tmux/tmux.conf | 106 ++----------------------------------------- 1 file changed, 5 insertions(+), 101 deletions(-) diff --git a/config/common/tmux/tmux.conf b/config/common/tmux/tmux.conf index 7508667..409ad66 100755 --- a/config/common/tmux/tmux.conf +++ b/config/common/tmux/tmux.conf @@ -1,98 +1,47 @@ -# # By Nicholas Marriott. Public domain. # but -now- me. -# - -########################################################################### -################# MISC. ################################################### -########################################################################### -########################################################################### # Some tweaks to the status line set -g status-right "%H:%M" set -g window-status-current-style "underscore" - -# If running inside (nested) tmux ($TMUX is set), then change the status line to red -%if #{TMUX} -set -g status-bg red -%endif - # Enable RGB color if running in xterm set-option -sa terminal-overrides ",xterm*:Tc" - # Change the default $TERM to xterm-256color # Necessary because vim ctrl arrows must be defined through TERM set -g default-terminal "xterm-256color" set-window-option -g xterm-keys on - # No bells at all set -g bell-action none - # Keep windows around after they exit set -g remain-on-exit off - # More history lines set -g history-limit 16384 - # Base window is Numero Uno set -g base-index 1 set-window-option -g pane-base-index 1 - # Set vi mode when copying set-window-option -g mode-keys vi # compatibility with vim for focus based events set -g focus-events on -########################################################################### -################# KEYBINDINGS ############################################# -########################################################################### -########################################################################### - - +# KEYBINDINGS # Reload config file -unbind r bind r source-file ~/.tmux.conf \; display "Reloaded ~/.tmux.conf" - -########## CLIPBOARD ########## -unbind -T copy-mode-vi Space; #Default for begin-selection -unbind -T copy-mode-vi Enter; #Default for copy-selection +# Clipboard bind -T copy-mode-vi v send-keys -X begin-selection bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -r -selection clipboard" bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -r -selection clipboard" - # Unbind ESC set -sg escape-time 0 - # Toggle status bar -unbind t bind t set-option status - # Toggle monitoring window activity bind m set monitor-activity\; display 'monitor-activity #{?monitor-activity,on,off}' - bind M run-shell "tmux set monitor-silence #{?monitor-silence,0,10}"\; display "monitor-silence #{?monitor-silence,on,off}" - - - - -# if-shell "true" { -# if-shell "#{?monitor-silence,true,false}" { -# set monitor-silence 0 -# } -# if-shell "#{?monitor-silence,false,true}" { -# set monitor-silence 10 -# } -# display "monitor-silence #{?monitor-silence,on,off} #{monitor-silence}" -# } - # Toggle synchronized panes (sending keys to every pane) -unbind y bind y set synchronize-panes\; display 'synchronize-panes #{?synchronize-panes,on,off}' - # Paste from tmux buffer -unbind p bind p paste-buffer - # Kill all windows bind x confirm -p "Kill Pane?" kill-pane bind X confirm -p "Kill Window?" kill-window @@ -100,16 +49,10 @@ bind M-x confirm -p "Kill Session?" kill-session bind M-X confirm -p "Kill Server?" kill-server # Restart pane bind k run -C "respawn-pane -k; send-keys !! 'C-j'" - -########## SPLIT AND SWAP ########### # Splitting -unbind v bind v split-window -h -c "#{pane_current_path}" -unbind h bind h split-window -v -c "#{pane_current_path}" # Swapping left and right a la vim -unbind -n M-H -unbind -n M-L bind -n M-H swap-pane -U bind -n M-L swap-pane -D ## Resizing panes @@ -117,70 +60,31 @@ bind -r C-H resize-pane -L 5 bind -r C-J resize-pane -D 5 bind -r C-K resize-pane -U 5 bind -r C-L resize-pane -R 5 - -## Default keybindings for resizing -unbind C-Up -unbind C-Left -unbind C-Down -unbind C-Right -unbind M-Up -unbind M-Left -unbind M-Down -unbind M-Right - # Join and break windows -unbind j bind j command-prompt -1p "Take window:" "join-pane -s %%" -unbind J bind J command-prompt -1p "Send to window:" "join-pane -t \:%% ; select-window -l" # Break pane without losing focus -unbind b bind b break-pane -t : # Reset length and shit -unbind z bind z select-layout main-vertical - -########## NAVIGATION ########## # Pane navigating with h|j|k|l a la vim -unbind -n M-h -unbind -n M-j -unbind -n M-k -unbind -n M-l bind -n -N "select leftwards pane" M-h select-pane -L bind -n -N "select downwards pane" M-j select-pane -D bind -n -N "select upwards pane" M-k select-pane -U bind -n -N "select rightwards pane" M-l select-pane -R # Window navigating with M-u|i -unbind -n M-u -unbind -n M-i bind -n M-u previous-window bind -n M-i next-window # Session navigeting with S-M-u|i -unbind -n M-y -unbind -n M-o bind -n M-U switch-client -p bind -n M-I switch-client -n - -########## Windows ########## -# Rename window and open new window -unbind n # DEFAULT KEY: move to next window -unbind N -unbind w # DEFAULT KEY: change current window interactively aka choose-tree -zW +# Renaming bind n command-prompt "rename-window '%%'" bind N command-prompt "rename-session '%%'" -# Start new window where tmux started, will be home because of xmonad -bind w new-window -c "#{pane_current_path}" #-c "#{pane_current_path}" +# Starting new windows +bind w new-window -c "#{pane_current_path}" bind W new-session -c "$HOME" - # Show tree -unbind S bind S choose-tree -Z - -# Turn the mouse on, but without copy mode dragging -# set -g mouse on -# unbind -n MouseDrag1Pane -# unbind -T copy-mode MouseDrag1Pane - # Menu for mounting and ejecting devices. -unbind E bind E display-menu -T "#[align=centre]#I:#W" -x W -y W '' Mount 0 "display-popup -E 'amount'" -- cgit v1.2.3 From cb955e6fc78f855cb230af4bb6bb8cbc0718509e Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sat, 15 Jul 2023 23:17:52 +0200 Subject: added more aliases --- config/essentials/zsh/aliases.zsh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/config/essentials/zsh/aliases.zsh b/config/essentials/zsh/aliases.zsh index 84373a2..99372d6 100644 --- a/config/essentials/zsh/aliases.zsh +++ b/config/essentials/zsh/aliases.zsh @@ -72,6 +72,8 @@ alias dopacs='dopac -S' alias dopacc='dopac -Sc' alias doprm='dopac -Rns' +alias mpkg='makepkg -si' + which pikaur > /dev/null 2>&1 && alias yay='pikaur' alias yup='yay -Syu' @@ -84,6 +86,11 @@ alias yrm='yay -Rns' alias pkb='pkgfile -b' +# transmission +alias tr='transmission-remote debuc.com' +alias trls='transmission-remote debuc.com -t all -l' +alias tradd='transmission-remote debuc.com -a' + alias grub-update='doas grub-mkconfig -o /boot/grub/grub.cfg' # vim @@ -153,7 +160,7 @@ alias kll='killall' alias pi='ping archlinux.org -c4' alias sba='source env/bin/activate || source bin/activate' alias smc='systemctl' -alias ssc='doas smc' +alias ssc='doas systemctl' alias smcu='smc --user' alias zsr='source ${ZDOTDIR:-$HOME}/.zshrc && rehash' alias rh='rehash' @@ -162,6 +169,7 @@ alias dmci="doas make clean install" alias rmd='rm -f *.{orig,rej}' alias cdzot='mkdir -p /tmp/zottesite && cd /tmp/zottesite' alias gdate="date +%y%m%d_%H%M%S" +alias tpid='tail -f /dev/null --pid' alias vbm='vboxmanage' alias vbls='vbm list vms' @@ -216,10 +224,13 @@ alias go/s='go /srv' alias ogo/='ogo /' alias ogo/s='ogo /srv' +# fzf aliases alias fzps='ps aux | tail +2 | fzf | tee /dev/stderr | awk '\''{print $2}'\'' | clipp' alias asf='alias | fzf' alias fzh="tac $HISTFILE | fzf | tee /dev/stderr | clipp" +alias ffwin='hyprctl clients -j | jq '\''.[].pid'\'' | fzf --preview "hyprctl clients -j | jq '\''.[] | select(.pid == {}) | {class, title, workspace, xwayland}'\''"' alias pff='find ${PASSWORD_STORE_DIR:=$HOME/src/password-store/} -name "*.gpg" | sed -e "s@$PASSWORD_STORE_DIR/@@" -e '\''s/\.gpg$//'\'' | fzf | xargs pass show -c' +alias fzps='fzf --print0 | xargs -0I{}' alias -s zip='unzip -l' alias -s tar='tar tf' -- cgit v1.2.3 From cf28db3c5d23eccf7fc4b5d05d10ece19be819a3 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sat, 15 Jul 2023 23:18:01 +0200 Subject: added trcp function --- config/essentials/zsh/functions.zsh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config/essentials/zsh/functions.zsh b/config/essentials/zsh/functions.zsh index 5c4d609..188b405 100644 --- a/config/essentials/zsh/functions.zsh +++ b/config/essentials/zsh/functions.zsh @@ -260,3 +260,8 @@ sms () { ssh phone sendmsg "$1" "'$2'" } + +trcp () +{ + scp "$1" db:/media/basilisk/downloads/transmission/torrents/ +} -- cgit v1.2.3 From 0bdd5288aed359f0ed1f4401c08afc1f7868b997 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sat, 15 Jul 2023 23:18:36 +0200 Subject: added sshdb terminal bind --- config/hyprland/hypr/binds.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/hyprland/hypr/binds.conf b/config/hyprland/hypr/binds.conf index 5c2dd99..eb3d4a2 100644 --- a/config/hyprland/hypr/binds.conf +++ b/config/hyprland/hypr/binds.conf @@ -123,3 +123,5 @@ bind = $mainMod ALT, S, exec, $HOME/.config/hypr/screenshot.sh -m bind = $mainMod SHIFT, S, exec, $HOME/.config/hypr/screenshot.sh -sc bind = $mainMod ALT SHIFT, S, exec, $HOME/.config/hypr/screenshot.sh -s bind = $mainMod CTRL, S, exec, $HOME/.config/hypr/screenshot.sh -f + +bind = $mainMod, D, exec, foot -e ssh -t db tmux a -- cgit v1.2.3 From d1e66a980851aed154926852333d683dc5554bc9 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 16 Jul 2023 02:50:45 +0200 Subject: reduced font size --- config/hyprland/foot/foot.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/hyprland/foot/foot.ini b/config/hyprland/foot/foot.ini index 8caee75..032c558 100644 --- a/config/hyprland/foot/foot.ini +++ b/config/hyprland/foot/foot.ini @@ -9,7 +9,7 @@ term=xterm-256color title="" # locked-title=no -font=monospace:size=11 +font=monospace:size=10.5 # font-bold= # font-italic= # font-bold-italic= @@ -121,7 +121,7 @@ search-start=Control+Shift+r # minimize=none # maximize=none # fullscreen=none -# pipe-visible=[sh -c "xurls | fuzzel | xargs -r firefox"] none +pipe-visible=[sh -c "cat > /tmp/footvisible"] Mod1+Shift+p # pipe-scrollback=[sh -c "xurls | fuzzel | xargs -r firefox"] none # pipe-selected=[xargs -r firefox] none # show-urls-launch=Control+Shift+u -- cgit v1.2.3 From 899c6a9227cea23cc226148bc0b6afaa2780d81d Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 18 Jul 2023 17:54:33 +0200 Subject: remove temp file --- bin/common/wt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/bin/common/wt b/bin/common/wt index 0568b99..d19539b 100755 --- a/bin/common/wt +++ b/bin/common/wt @@ -1,10 +1,7 @@ #!/bin/sh - -echo "$@" > /tmp/truewhile.tmp while true do - sh /tmp/truewhile.tmp - sleep 1 clear + $@ + sleep 1 done -rm /tmp/truewhile.tmp -- cgit v1.2.3 From d5158bec4773adc8b08b85fd9dfbc517ab2450c9 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 18 Jul 2023 17:54:49 +0200 Subject: added amount --- bin/common/amount | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 bin/common/amount diff --git a/bin/common/amount b/bin/common/amount new file mode 100755 index 0000000..8d235e4 --- /dev/null +++ b/bin/common/amount @@ -0,0 +1,36 @@ +#!/bin/sh + +tmp="$(mktemp)" + +die () +{ + echo "$1" >&2 +} + +clear +lsblk -o name,size,type,mountpoints +die "───────────────────────────────────" +lsblk --ascii -o name,mountpoint | + grep '^.-' | + while read line +do + words="$(printf "$line" | wc -w)" + test $words -gt 1 && continue + i=$((${i:-0}+1)) + printf "%s. %s\n" "$i" "$(printf "$line" | cut -f 2- -d '-')" +done | tee "$tmp" + +read -p '>' choice + +dev="$(grep "^$choice\." "$tmp" | cut -f 2- -d ' ')" +if test -n "$dev" +then + die "mounting /dev/$dev on /media/$dev" + sudo mount --mkdir /dev/$dev /media/$dev > /dev/null 2>&1 && + die 'Mounted succesfully.' || + die 'Failed to mount.' + die 'Press [Enter] to continue.' + head -n 1 > /dev/null +fi + +rm -f "$tmp" -- cgit v1.2.3 From c4bc0df99da917564bb6e402ee643f19a497bfdc Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 18 Jul 2023 17:55:00 +0200 Subject: simplified y2feed --- bin/common/y2feed | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/bin/common/y2feed b/bin/common/y2feed index 196ecb7..e30bccf 100755 --- a/bin/common/y2feed +++ b/bin/common/y2feed @@ -1,12 +1,5 @@ #!/bin/sh -ua="$(yt-dlp --dump-user-agent)" - -test -z "${url:=$1}" && - url="$(cat /dev/stdin)" - -url="http://youtube.com/$(echo "$url" | - awk -F '/' '{print $NF}')" -echo "url: $url" >&2 - -curl -L -s -H "$ua" "$url" | - pup 'link[title=RSS] attr{href}' +echo "url: $1" >&2 +curl -L -s "$1" | + pup 'link[title=RSS] attr{href}' | + tee /dev/stderr -- cgit v1.2.3 From 8bc5185b5601ab11c714dc725a1328f8ccdd3948 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 18 Jul 2023 17:55:32 +0200 Subject: added transmission aliases --- config/essentials/zsh/aliases.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/essentials/zsh/aliases.zsh b/config/essentials/zsh/aliases.zsh index 99372d6..94d27e7 100644 --- a/config/essentials/zsh/aliases.zsh +++ b/config/essentials/zsh/aliases.zsh @@ -87,9 +87,10 @@ alias yrm='yay -Rns' alias pkb='pkgfile -b' # transmission -alias tr='transmission-remote debuc.com' +alias trr='transmission-remote debuc.com' alias trls='transmission-remote debuc.com -t all -l' alias tradd='transmission-remote debuc.com -a' +alias trclipo='transmission-remote debuc.com -a "$(clipo)"' alias grub-update='doas grub-mkconfig -o /boot/grub/grub.cfg' -- cgit v1.2.3 From ac818112951a7554150a09cb988c81b89c9e7494 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 18 Jul 2023 17:56:14 +0200 Subject: use mktemp for unique --- config/essentials/zsh/functions.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/essentials/zsh/functions.zsh b/config/essentials/zsh/functions.zsh index 5c4d609..2f86b5d 100644 --- a/config/essentials/zsh/functions.zsh +++ b/config/essentials/zsh/functions.zsh @@ -72,7 +72,8 @@ ipc () calc () { echo "$@" | bc -l } unique () { - f="/tmp/$(uuidgen)" + local f + f="$(mktemp)" awk '!x[$0]++' "$1" > "$f" mv "$f" "$1" } -- cgit v1.2.3 From ee1edc2a6a1cd2ae102c2a7210277d969df944f9 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 18 Jul 2023 17:56:44 +0200 Subject: added dlcons! --- bin/serverscripts/dlcons | 2 ++ 1 file changed, 2 insertions(+) create mode 100755 bin/serverscripts/dlcons diff --git a/bin/serverscripts/dlcons b/bin/serverscripts/dlcons new file mode 100755 index 0000000..69d9484 --- /dev/null +++ b/bin/serverscripts/dlcons @@ -0,0 +1,2 @@ +#!/bin/sh +docker exec -it deluge deluge-console -c /config -- cgit v1.2.3 From 1bd730718e5e7420c446904433d20df6aabb7658 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 18 Jul 2023 17:55:43 +0200 Subject: added debuc binds --- config/essentials/nvim/after/plugin/luasnip.lua | 11 +++++++++++ config/extra/tridactyl/tridactylrc | 9 +++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/config/essentials/nvim/after/plugin/luasnip.lua b/config/essentials/nvim/after/plugin/luasnip.lua index d1da9b3..d29b484 100644 --- a/config/essentials/nvim/after/plugin/luasnip.lua +++ b/config/essentials/nvim/after/plugin/luasnip.lua @@ -144,6 +144,17 @@ ls.add_snippets("java", { ls.add_snippets("sh", { s("TD", t "THISDIR=$(dirname $(readlink -f \"$0\"))"), parse("fn", "$1 ()\n{\n\t$2\n}$0", {}), + -- Functions + parse("rchar", + [[ + read_char () + { + old_stty_cfg=$(stty -g) + stty raw -echo + dd ibs=1 count=1 2> /dev/null + stty \$old_stty_cfg + } + ]], {}), parse("fdie", [[ die () diff --git a/config/extra/tridactyl/tridactylrc b/config/extra/tridactyl/tridactylrc index fa6ed1d..2b98c9d 100644 --- a/config/extra/tridactyl/tridactylrc +++ b/config/extra/tridactyl/tridactylrc @@ -52,10 +52,11 @@ bind gwc winopen https://chat.openai.com/chat bind gnp tabopen https://github.com/Siilwyn/awesome-pixel-art#tutorials bind gop open https://github.com/Siilwyn/awesome-pixel-art#tutorials bind gwp winopen https://github.com/Siilwyn/awesome-pixel-art#tutorials -" deluge -bind gnd tabopen http://192.168.178.52:8112/ -bind god open http://192.168.178.52:8112/ -bind gwd winopen http://192.168.178.52:8112/ +" transmission +bind godb open http://debuc.com/ +bind godt open http://debuc.com:9091 +bind gods open http://debuc.com:5030 +bind godj open http://debuc.com:8096 " For syntax highlighting see https://github.com/tridactyl/vim-tridactyl " vim: set filetype=tridactyl -- cgit v1.2.3 From 625f6ed369042b5a2364e17fe1465c92447772e8 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 18 Jul 2023 18:13:03 +0200 Subject: updated die command --- config/essentials/nvim/after/plugin/luasnip.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/essentials/nvim/after/plugin/luasnip.lua b/config/essentials/nvim/after/plugin/luasnip.lua index d29b484..43d985a 100644 --- a/config/essentials/nvim/after/plugin/luasnip.lua +++ b/config/essentials/nvim/after/plugin/luasnip.lua @@ -159,7 +159,7 @@ ls.add_snippets("sh", { [[ die () { - echo "\$1" >&2 + echo "\$@" >&2 } ]], {}), s("die", fmt( -- cgit v1.2.3 From ac369f0c9d0e4362dc229eccbc2d4692538f5553 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 18 Jul 2023 18:21:29 +0200 Subject: minor fixes --- bin/common/amount | 2 +- stowdots | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/common/amount b/bin/common/amount index 8d235e4..71fc6ae 100755 --- a/bin/common/amount +++ b/bin/common/amount @@ -8,7 +8,7 @@ die () } clear -lsblk -o name,size,type,mountpoints +lsblk -o name,size,type,mountpoint die "───────────────────────────────────" lsblk --ascii -o name,mountpoint | grep '^.-' | diff --git a/stowdots b/stowdots index 1c72f80..dc056f4 100755 --- a/stowdots +++ b/stowdots @@ -1,6 +1,6 @@ #!/bin/sh -trap "echo -e '\nbye'; exit 1" EXIT +trap "exit 1" EXIT INT die () { echo "$@" 1>&2 @@ -22,7 +22,7 @@ else die "E: MACH not set" >&2 die "Enter valid value for 'MACH'" die "d(esktop) | s(erver) | l(aptop)" - echo -n ">" >&2 + die -n ">" read MACH fi -- cgit v1.2.3 From ca93eb95d535e30207aba84982475fbd9749d933 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 18 Jul 2023 18:32:54 +0200 Subject: don't use sudo if root --- bin/common/amount | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/common/amount b/bin/common/amount index 71fc6ae..9053b62 100755 --- a/bin/common/amount +++ b/bin/common/amount @@ -26,7 +26,9 @@ dev="$(grep "^$choice\." "$tmp" | cut -f 2- -d ' ')" if test -n "$dev" then die "mounting /dev/$dev on /media/$dev" - sudo mount --mkdir /dev/$dev /media/$dev > /dev/null 2>&1 && + test "$(id -u)" != "0" && sudo="sudo" + mkdir -p /media/$dev + $sudo mount /dev/$dev /media/$dev > /dev/null 2>&1 && die 'Mounted succesfully.' || die 'Failed to mount.' die 'Press [Enter] to continue.' -- cgit v1.2.3 From a4011543565cb769d82b5ef3ac9bda7a5298f14c Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Wed, 19 Jul 2023 11:35:58 +0200 Subject: replaced amount with aumount --- bin/common/amount | 38 ----------------------- bin/common/aumount | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+), 38 deletions(-) delete mode 100755 bin/common/amount create mode 100755 bin/common/aumount diff --git a/bin/common/amount b/bin/common/amount deleted file mode 100755 index 9053b62..0000000 --- a/bin/common/amount +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh - -tmp="$(mktemp)" - -die () -{ - echo "$1" >&2 -} - -clear -lsblk -o name,size,type,mountpoint -die "───────────────────────────────────" -lsblk --ascii -o name,mountpoint | - grep '^.-' | - while read line -do - words="$(printf "$line" | wc -w)" - test $words -gt 1 && continue - i=$((${i:-0}+1)) - printf "%s. %s\n" "$i" "$(printf "$line" | cut -f 2- -d '-')" -done | tee "$tmp" - -read -p '>' choice - -dev="$(grep "^$choice\." "$tmp" | cut -f 2- -d ' ')" -if test -n "$dev" -then - die "mounting /dev/$dev on /media/$dev" - test "$(id -u)" != "0" && sudo="sudo" - mkdir -p /media/$dev - $sudo mount /dev/$dev /media/$dev > /dev/null 2>&1 && - die 'Mounted succesfully.' || - die 'Failed to mount.' - die 'Press [Enter] to continue.' - head -n 1 > /dev/null -fi - -rm -f "$tmp" diff --git a/bin/common/aumount b/bin/common/aumount new file mode 100755 index 0000000..790106d --- /dev/null +++ b/bin/common/aumount @@ -0,0 +1,90 @@ +#!/bin/sh + +tmp="$(mktemp)" +test "$(id -u)" != "0" && sudo="sudo" + +die () +{ + echo "$@" >&2 +} + +# Read one character +read_char () +{ + die -n ">" + old_stty_cfg=$(stty -g) + stty raw + dd ibs=1 count=${1:-1} 2> /dev/null + stty $old_stty_cfg + die "" +} + +# mount the device with $1 as the choice +mount () +{ + dev="$(grep "^$1\." "$tmp" | cut -f 2- -d ' ')" + test -z "$dev" && exit + + die "mounting /dev/$dev on /media/$dev" + mkdir -p /media/$dev + $sudo mount /dev/$dev /media/$dev > /dev/null 2>&1 || + return 1 +} + +# eject the device with $1 as the choice +eject () +{ + printf "$1" | grep -q "[0-9]" || exit 1 + mountpoint="$(sed -n "${1}p" "$tmp" | + awk '{print $3}')" + test -z "$mountpoint" && exit 1 + + # Get device for mountpoint with df + dev="$(df -P "$mountpoint" | + tail -n +2 | head -n 1 | # skip headers + awk '{print $1}')" + + die "ejecting $dev" + $sudo eject "$dev" && + die "Succesfully ejected." || + die "Failed to eject." +} + +# print lsblk, use $1 to print only devices with mountpoints or without +pr_lsblk () +{ + clear + lsblk -o name,size,type,mountpoint + die "───────────────────────────────────" + lsblk --ascii -o name,mountpoint | + grep '^.-' | + while read line + do + words="$(printf "$line" | wc -w)" + test $words -eq ${1:-1} && continue + printf "%s\n" "$line" + done | + cut -f 2- -d "-" | + awk '{print NR ". " $0}' | + tee "$tmp" >&2 +} + +cleanup () +{ + rm -f "$tmp" +} + +trap cleanup EXIT INT + +die "m(ount) e(ject) ?" +choice="$(read_char)" + +case $choice in + "m") i=2; cmd=mount ;; + "e") i=1; cmd=eject ;; + *) exit 1 ;; +esac + +pr_lsblk $i +choice="$(read_char)" +$cmd $choice -- cgit v1.2.3 From 4b20907a634a47e578d97df24cd7b632c1c06786 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Wed, 19 Jul 2023 11:41:43 +0200 Subject: umount instead of eject --- bin/common/aumount | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/bin/common/aumount b/bin/common/aumount index 790106d..f7f1ecb 100755 --- a/bin/common/aumount +++ b/bin/common/aumount @@ -25,29 +25,23 @@ mount () dev="$(grep "^$1\." "$tmp" | cut -f 2- -d ' ')" test -z "$dev" && exit - die "mounting /dev/$dev on /media/$dev" + die "Mounting /dev/$dev on /media/$dev" mkdir -p /media/$dev $sudo mount /dev/$dev /media/$dev > /dev/null 2>&1 || return 1 } -# eject the device with $1 as the choice -eject () +# umount the device with $1 as the choice +umount () { printf "$1" | grep -q "[0-9]" || exit 1 mountpoint="$(sed -n "${1}p" "$tmp" | awk '{print $3}')" test -z "$mountpoint" && exit 1 - # Get device for mountpoint with df - dev="$(df -P "$mountpoint" | - tail -n +2 | head -n 1 | # skip headers - awk '{print $1}')" - - die "ejecting $dev" - $sudo eject "$dev" && - die "Succesfully ejected." || - die "Failed to eject." + die "Unmounting $mountpoint" + $sudo umount "$mountpoint" || + return 1 } # print lsblk, use $1 to print only devices with mountpoints or without @@ -76,15 +70,17 @@ cleanup () trap cleanup EXIT INT -die "m(ount) e(ject) ?" +die "m(ount) u(mount) ?" choice="$(read_char)" case $choice in "m") i=2; cmd=mount ;; - "e") i=1; cmd=eject ;; + "u") i=1; cmd=umount ;; *) exit 1 ;; esac pr_lsblk $i choice="$(read_char)" -$cmd $choice +$cmd $choice && + die "Successful." || + die "Failed." -- cgit v1.2.3 From 7533d26a043df25183a78eba5cce5ca5c3d0cbe6 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Wed, 19 Jul 2023 14:46:46 +0200 Subject: added eject option to aumount --- bin/common/aumount | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/bin/common/aumount b/bin/common/aumount index f7f1ecb..19b33e0 100755 --- a/bin/common/aumount +++ b/bin/common/aumount @@ -19,11 +19,16 @@ read_char () die "" } +get_dev () +{ + grep "^$1\." "$tmp" | cut -f 2- -d ' ' +} + # mount the device with $1 as the choice mount () { - dev="$(grep "^$1\." "$tmp" | cut -f 2- -d ' ')" - test -z "$dev" && exit + dev="$(get_dev "$1")" + test -z "$dev" && exit 1 die "Mounting /dev/$dev on /media/$dev" mkdir -p /media/$dev @@ -34,7 +39,6 @@ mount () # umount the device with $1 as the choice umount () { - printf "$1" | grep -q "[0-9]" || exit 1 mountpoint="$(sed -n "${1}p" "$tmp" | awk '{print $3}')" test -z "$mountpoint" && exit 1 @@ -44,6 +48,16 @@ umount () return 1 } +ejekt () +{ + dev="$(get_dev "$1" | sed 's/.$//')" + test -z "$dev" && exit 1 + + die "Ejecting /dev/$dev" + $sudo eject /dev/$dev > /dev/null 2>&1 || + return 1 +} + # print lsblk, use $1 to print only devices with mountpoints or without pr_lsblk () { @@ -70,17 +84,19 @@ cleanup () trap cleanup EXIT INT -die "m(ount) u(mount) ?" +die "m(ount) u(mount) (e)ject ?" choice="$(read_char)" case $choice in "m") i=2; cmd=mount ;; "u") i=1; cmd=umount ;; + "e") i=2; cmd=ejekt ;; *) exit 1 ;; esac pr_lsblk $i choice="$(read_char)" +printf "$choice" | grep -q "[0-9]" || exit 1 $cmd $choice && die "Successful." || die "Failed." -- cgit v1.2.3 From 4f2846ea552c8c71c8ebbc4394f625499e823122 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Thu, 20 Jul 2023 13:20:12 +0200 Subject: made aliases.zsh more shell gnostic --- config/essentials/zsh/.zshrc | 2 +- config/essentials/zsh/aliases.sh | 434 +++++++++++++++++++++++++++++++++++++ config/essentials/zsh/aliases.zsh | 435 -------------------------------------- 3 files changed, 435 insertions(+), 436 deletions(-) create mode 100644 config/essentials/zsh/aliases.sh delete mode 100644 config/essentials/zsh/aliases.zsh diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc index 83da0f6..2619fed 100644 --- a/config/essentials/zsh/.zshrc +++ b/config/essentials/zsh/.zshrc @@ -41,7 +41,7 @@ else fi sfiles+=( ~/.config/zsh/functions.zsh - ~/.config/zsh/aliases.zsh + ~/.config/zsh/aliases.sh ) for f in "${sfiles[@]}"; do test -f "$f" && source "$f" diff --git a/config/essentials/zsh/aliases.sh b/config/essentials/zsh/aliases.sh new file mode 100644 index 0000000..3bfd298 --- /dev/null +++ b/config/essentials/zsh/aliases.sh @@ -0,0 +1,434 @@ +#!/bin/zsh +# s/alias \([^-]\)/alias -g \1 + +# Zsh specific aliases +if [ $SHELL = "/bin/zsh" ] +then + # googoo aliases + alias o.='o .' + alias go.='go .' + alias ogo.='ogo .' + alias o/='o /' + alias o/s='o /srv' + alias go/='go /' + alias go/s='go /srv' + alias ogo/='ogo /' + alias ogo/s='ogo /srv' + + if [ "$WAYLAND_DISPLAY" ] + then + alias -g clipp='wl-copy -n' + alias -g clipo='wl-paste -n' + else + if which devour > /dev/null 2>&1 + then + alias mpv='devour mpv' + alias zathura='devour zathura' + fi + alias -g clipp='xclip -selection clipboard -r' + alias -g clipo='xclip -o -selection clipboard -r' + fi + alias clipic='clipo > /tmp/pic.png' + + alias -g '...'='../..' + alias -g '....'='../../..' + alias -g bg='&; disown' + alias -g hl='--help |& less -r' +fi + + +if grep -qi "debian\|ubuntu" /etc/os-release 2> /dev/null +then + alias aptup='apt update && apt upgrade -y' +fi + +# Programs +alias vi='nvim' +alias nb='newsboat' +alias sr='surfraw' +alias ccu='calcurse' +alias pf='profanity' + +alias arduino-cli='arduino-cli --config-file $XDG_CONFIG_HOME/arduino15/arduino-cli.yaml' + +if [ -x /usr/bin/dircolors ]; then + test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" + # alias ls='ls -h --color --group-directories-first' + #alias dir='dir --color=auto' + #alias vdir='vdir --color=auto' + + alias grep='grep --color=auto' + alias fgrep='fgrep --color=auto' + alias egrep='egrep --color=auto' + alias ip='ip -color=auto' + alias ipa='ip -br a' +fi + +alias l='ls -l' +alias l1='ls -1' +alias ll='ls -la' +alias la='ls -aF' +alias lst='ls --tree' +alias lst1='ls --tree -L1' +alias lst2='ls --tree -L2' +alias lst3='ls --tree -L3' +alias ls.='ls -dl .*' +which exa >/dev/null 2>&1 && + alias ls='exa --sort extension --group-directories-first' || + alias ls='ls --color --group-directories-first --sort=extension' + +# pacman aliases +alias pac='pacman' +alias pacsi='pac -Si' +alias pacs='pac -Ss' +alias pacq='pac -Q' +alias pacql='pac -Ql' +alias pacqs='pac -Qs' +alias paci='pac -Qi' + +alias pacup='dopac -Syu' +alias dopac='doas pacman' +alias orpac='pacman -Qtdq | dopac -Rns - 2> /dev/null || echo "No orphans."' +alias dopacs='dopac -S' +alias dopacc='dopac -Sc' +alias doprm='dopac -Rns' + +alias mpkg='makepkg -si' + +which pikaur > /dev/null 2>&1 && + alias yay='pikaur' +alias yup='yay -Syu' +alias ysi='yay -Si' +alias yss='yay -Ss' +alias yqs='yay -Qs' +alias yql='yay -Ql' +alias yays='yay -S' +alias yrm='yay -Rns' + +alias pkb='pkgfile -b' + +# transmission +alias trr='transmission-remote debuc.com' +alias trls='transmission-remote debuc.com -t all -l' +alias tradd='transmission-remote debuc.com -a' +alias trclipo='transmission-remote debuc.com -a "$(clipo)"' + +alias grub-update='doas grub-mkconfig -o /boot/grub/grub.cfg' + +# vim +alias scr='nvim +"setlocal buftype=nofile bufhidden=hide noswapfile filetype=txt" scratch' +alias vimp="vim '+PlugInstall'" +alias nvimp="nvim '+PackerSync'" +alias nvg='git status > /dev/null 2>&1 && nvim "+Git"' +alias nvn='nvim "+Telekasten panel"' + +alias xrandr-rpgmaker='xrandr --auto --output VGA-1 --mode 1024x768 --left-of HDMI-1 && ~/.fehbg' +alias xrandr-default='xrandr --auto --output VGA-1 --mode 1920x1080 --left-of HDMI-1 --output HDMI-1 --mode 1920x1080 && ~/.fehbg' + +alias d='du -d 0 -h' +alias dud='du .* * -d 0 -h 2>/dev/null | sort -h' +alias df='df -h' +alias shred='shred -uz' +alias lsblk='lsblk -o name,type,fsused,fsavail,size,fstype,label,mountpoint' +alias floc='doas find / -type "f" 2> /dev/null | grep' +alias dloc='doas find / -type "d" 2> /dev/null | grep' +alias fif='find . -type "f" | grep' +alias fid='find . -type "d" | grep' +alias sxt='sxiv -t' +alias wgsh='wget --quiet --show-progress' +alias ss4='ss -tln4p | cut -f1 -d,' +alias mdbw='mariadb -h 0.0.0.0 -u padmin -pbulbizarre padmindb' +alias mdbwa='mariadb -h 10.3.50.5 -u padmin -pbulbizarre padmindb' + +# ssh +alias sha='ssh-add' +alias ssh-start='eval "$(ssh-agent)" && ssh-add' + +alias vidlen='ffprobe -show_entries format=duration -v quiet -of csv="p=0" -i' +alias whatsmyip='curl -s "ifconfig.co"' +alias icognito='unset HISTFILE' +alias webcam='v4l2-ctl --set-fmt-video=width=1280,height=720; mpv --demuxer-lavf-format=video4linux2 --demuxer-lavf-o-set=input_format=mjpeg av://v4l2:/dev/video0 --profile=low-latency --untimed --no-resume-playback' +alias capture='echo "Y" | wf-recorder -o "$(hyprctl -j monitors | jq -r '\''.[].name'\'' | fzf)" --codec=vp8_vaapi --device=/dev/dri/renderD128 -f output.webm -D' +alias qrclipo='qrencode -s 16 "$(clipo)" -o - | imv -w "imv - $(clipo)" -' +alias airpods='bluetoothctl connect 60:93:16:24:00:10' +alias hotpsot='nmcli dev wifi hotspot ifname wlan0 ssid wiefie password "peepeepoopoo"' +alias wtip='wt ip -c -brief addr' +alias fusephone='sshfs myphone: /media/phone' +alias ttyper='ttyper -l english1000 -w 100' + +alias wgup='doas wg-quick up wg0' +alias wgdown='doas wg-quick down wg0' + +# NPM +alias npi="npm init --yes" + +# Python +alias penv='python3 -m venv env' +alias phttp='python3 -m http.server' +alias pipreq='pip install -r requirements.txt' + +alias cx='chmod +x' +alias ch='chown ${USER}:${USER} -R' +alias kll='killall' +alias pi='ping archlinux.org -c4' +alias sba='source env/bin/activate || source bin/activate' +alias smc='systemctl' +alias ssc='doas systemctl' +alias smcu='smc --user' +alias zsr='source ${ZDOTDIR:-$HOME}/.zshrc && rehash' +alias rh='rehash' +alias wf='doas wipefs -a' +alias dmci="doas make clean install" +alias rmd='rm -f *.{orig,rej}' +alias cdzot='mkdir -p /tmp/zottesite && cd /tmp/zottesite' +alias gdate="date +%y%m%d_%H%M%S" +alias tpid='tail -f /dev/null --pid' + +alias vbm='vboxmanage' +alias vbls='vbm list vms' +alias vblsr='vbm list runningvms' +alias vb='vbm startvm' + +# quick config +alias ez='$EDITOR ${ZDOTDIR:-$HOME}/.zshrc' +alias eza='$EDITOR ${ZDOTDIR}/aliases.zsh' +alias ezf='$EDITOR ${ZDOTDIR}/functions.zsh' +alias eto='$EDITOR ~/sync/TODO' +alias edw='$EDITOR ~/src/dwm/config.def.h' +alias edm='$EDITOR ~/src/dmenu/config.def.h' +alias ehst='$EDITOR $ZDOTDIR/histfile' +alias ezh=' $EDITOR $HISTFILE' +alias est='$EDITOR ~/src/st/config.def.h' +alias esl='$EDITOR ~/src/slock/config.def.h' +alias esls='$EDITOR ~/src/slstatus/config.def.h' +alias ehy='$EDITOR ~/.config/hypr/hyprland.conf' +alias cfd='$EDITOR config.def.h' +# quick cd +alias cda='cd $HOME/docs/android/projects' +alias cds='cd $HOME/src/' +alias cdpw='cd ${PASSWORD_STORE_DIR:-$HOME/.password-store}' +alias cdsw='cd $HOME/src/WheelAdvisor' +alias cdw='cd $HOME/src/dwm' +alias cddm='cd $HOME/src/dmenu' +alias cdslo='cd $HOME/src/slock' +alias cdsl='cd $HOME/src/slstatus' +alias cdst='cd $HOME/src/st' +alias cdsta='cd $HOME/src/stable-diffusion-webui' +alias cdl='cd $HOME/dl' +alias cdo='cd $HOME/src/dotfiles' +alias cdoc='cd $HOME/docs' +alias cdi='cd $HOME/src/installdrier' +alias cdia='cd $HOME/src/installdrier/arch' +alias cdib='cd $HOME/src/installdrier/deb' +alias cdm='cd $HOME/music' +alias cdd='cd $HOME/dl' +alias cdp='cd $HOME/pics' +alias cdrs='cd /srv/' +alias cdng='cd /etc/nginx' +alias czo='cd $HOME/zot/' + +# fzf aliases +alias fzps='ps aux | tail +2 | fzf | tee /dev/stderr | awk '\''{print $2}'\'' | clipp' +alias asf='alias | fzf' +alias fzh="tac $HISTFILE | fzf | tee /dev/stderr | clipp" +alias ffwin='hyprctl clients -j | jq '\''.[].pid'\'' | fzf --preview "hyprctl clients -j | jq '\''.[] | select(.pid == {}) | {class, title, workspace, xwayland}'\''"' +alias pff='find ${PASSWORD_STORE_DIR:=$HOME/src/password-store/} -name "*.gpg" | sed -e "s@$PASSWORD_STORE_DIR/@@" -e '\''s/\.gpg$//'\'' | fzf | xargs pass show -c' +alias fzps='fzf --print0 | xargs -0I{}' + +alias dcb='docker build' +alias dcbt='docker build -t' +alias dce='docker exec' +alias dcet='docker exec -it' +alias dcmp='docker compose up -d' + +# debuc aliases +alias dbadd='ssh db dladd "'\''$(clipo)'\''"' +alias dbcons='ssh -t db dlcons' +alias dbinf='ssh db dlinfo' +alias sshdb='ssh -t db tmux a' +alias dbsmu='rsync -aPz db:/media/basilisk/music/ /media/kilimanjaro/music' + +alias cfg='git --git-dir=$HOME/src/dotfiles/.git --work-tree=$HOME/src/dotfiles' +# oh-my-zsh git aliases +alias g='git' +alias ga='git add' +alias gaa='git add --all' +alias gapa='git add --patch' +alias gau='git add --update' +alias gav='git add --verbose' +alias gap='git apply' +alias gapt='git apply --3way' +alias gb='git branch' +alias gba='git branch --all' +alias gbd='git branch --delete' +alias gbda='git branch --no-color --merged | command grep -vE "^([+*]|\s*($(git_main_branch)|$(git_develop_branch))\s*$)" | command xargs git branch --delete 2>/dev/null' +alias gbD='git branch --delete --force' +alias gbg='git branch -vv | grep ": gone\]"' +alias gbgd='local res=$(gbg | awk '"'"'{print $1}'"'"') && [[ $res ]] && echo $res | xargs git branch -d' +alias gbgD='local res=$(gbg | awk '"'"'{print $1}'"'"') && [[ $res ]] && echo $res | xargs git branch -D' +alias gbl='git blame -b -w' +alias gbnm='git branch --no-merged' +alias gbr='git branch --remote' +alias gbs='git bisect' +alias gbsb='git bisect bad' +alias gbsg='git bisect good' +alias gbsr='git bisect reset' +alias gbss='git bisect start' +alias gc='git commit --verbose' +alias gc!='git commit --verbose --amend' +alias gcn!='git commit --verbose --no-edit --amend' +alias gca='git commit --verbose --all' +alias gca!='git commit --verbose --all --amend' +alias gcan!='git commit --verbose --all --no-edit --amend' +alias gcans!='git commit --verbose --all --signoff --no-edit --amend' +alias gcam='git commit --all --message' +alias gcsm='git commit --signoff --message' +alias gcas='git commit --all --signoff' +alias gcasm='git commit --all --signoff --message' +alias gcb='git checkout -b' +alias gcf='git config --list' +alias gcl='git clone' +alias gclr='git clone --recurse-submodules' +alias gc1='git clone --depth 1' +alias gclean='git clean --interactive -d' +alias gpristine='git reset --hard && git clean --force -dfx' +alias grsf='git reset --soft HEAD~' +alias gcm='git checkout $(git_main_branch)' +alias gcd='git checkout $(git_develop_branch)' +alias gcmsg='git commit --message' +alias gco='git checkout' +alias gcor='git checkout --recurse-submodules' +alias gcount='git shortlog --summary --numbered' +alias gcp='git cherry-pick' +alias gcpa='git cherry-pick --abort' +alias gcpc='git cherry-pick --continue' +alias gcs='git commit --gpg-sign' +alias gcss='git commit --gpg-sign --signoff' +alias gcssm='git commit --gpg-sign --signoff --message' +alias gd='git diff' +alias gdca='git diff --cached' +alias gdcw='git diff --cached --word-diff' +alias gdct='git describe --tags $(git rev-list --tags --max-count=1)' +alias gds='git diff --staged' +alias gdt='git diff-tree --no-commit-id --name-only -r' +alias gdup='git diff @{upstream}' +alias gdw='git diff --word-diff' +alias gdl='git diff HEAD^ HEAD' +alias gf='git fetch' +alias gfo='git fetch origin' +alias gfg='git ls-files | grep' +alias gg='git gui citool' +alias gga='git gui citool --amend' +alias ggpur='ggu' +alias ggpull='git pull origin "$(git_current_branch)"' +alias ggpush='git push origin "$(git_current_branch)"' +alias ggsup='git branch --set-upstream-to=origin/$(git_current_branch)' +alias gpsup='git push --set-upstream origin $(git_current_branch)' +alias ghh='git help' +alias gignore='git update-index --assume-unchanged' +alias gignored='git ls-files -v | grep "^[[:lower:]]"' +alias git-svn-dcommit-push='git svn dcommit && git push github $(git_main_branch):svntrunk' +alias gk='\gitk --all --branches &!' +alias gke='\gitk --all $(git log --walk-reflogs --pretty=%h) &!' +alias gl='git pull' +alias glg='git log --stat' +alias glgp='git log --stat --patch' +alias glgg='git log --graph' +alias glgga='git log --graph --decorate --all' +alias glgm='git log --graph --max-count=10' +alias glo='git log --oneline --decorate' +alias glol="git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset'" +alias glols="git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset' --stat" +alias glod="git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset'" +alias glods="git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset' --date=short" +alias glola="git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset' --all" +alias glog='git log --oneline --decorate --graph' +alias gloga='git log --oneline --decorate --graph --all' +alias glp="_git_log_prettily" +alias gm='git merge' +alias gmom='git merge origin/$(git_main_branch)' +alias gmtl='git mergetool --no-prompt' +alias gmtlvim='git mergetool --no-prompt --tool=vimdiff' +alias gmum='git merge upstream/$(git_main_branch)' +alias gma='git merge --abort' +alias gp='git push' +alias gpd='git push --dry-run' +alias gpf!='git push --force' +alias gpoat='git push origin --all && git push origin --tags' +alias gpod='git push origin --delete' +alias gpr='git pull --rebase' +alias gpu='git push upstream' +alias gpv='git push --verbose' +alias gr='git remote' +alias gra='git remote add' +alias grb='git rebase' +alias grba='git rebase --abort' +alias grbc='git rebase --continue' +alias grbd='git rebase $(git_develop_branch)' +alias grbi='git rebase --interactive' +alias grbm='git rebase $(git_main_branch)' +alias grbom='git rebase origin/$(git_main_branch)' +alias grbo='git rebase --onto' +alias grbs='git rebase --skip' +alias grev='git revert' +alias grh='git reset' +alias grhh='git reset --hard' +alias groh='git reset origin/$(git_current_branch) --hard' +alias grm='git rm' +alias grmc='git rm --cached' +alias grmv='git remote rename' +alias grrm='git remote remove' +alias grs='git restore' +alias grset='git remote set-url' +alias grss='git restore --source' +alias grst='git restore --staged' +alias grt='cd "$(git rev-parse --show-toplevel || echo .)"' +alias gru='git reset --' +alias grup='git remote update' +alias grv='git remote --verbose' +alias gsb='git status --short --branch' +alias gsd='git svn dcommit' +alias gsh='git show' +alias gsi='git submodule init' +alias gsps='git show --pretty=short --show-signature' +alias gsr='git svn rebase' +alias gss='git status --short' +alias gst='git status' +alias gstaa='git stash apply' +alias gstc='git stash clear' +alias gstd='git stash drop' +alias gstl='git stash list' +alias gstp='git stash pop' +alias gsts='git stash show --text' +alias gstu='gsta --include-untracked' +alias gstall='git stash --all' +alias gsu='git submodule update' +alias gsw='git switch' +alias gswc='git switch --create' +alias gswm='git switch $(git_main_branch)' +alias gswd='git switch $(git_develop_branch)' +alias gts='git tag --sign' +alias gtv='git tag | sort -V' +alias gtl='gtl(){ git tag --sort=-v:refname -n --list "${1}*" }; noglob gtl' +alias gunignore='git update-index --no-assume-unchanged' +alias gunwip='git log --max-count=1 | grep -q -c "\--wip--" && git reset HEAD~1' +alias gup='git pull --rebase' +alias gupv='git pull --rebase --verbose' +alias gupa='git pull --rebase --autostash' +alias gupav='git pull --rebase --autostash --verbose' +alias gupom='git pull --rebase origin $(git_main_branch)' +alias gupomi='git pull --rebase=interactive origin $(git_main_branch)' +alias glum='git pull upstream $(git_main_branch)' +alias gluc='git pull upstream $(git_current_branch)' +alias gwch='git whatchanged -p --abbrev-commit --pretty=medium' +alias gwip='git add -A; git rm $(git ls-files --deleted) 2> /dev/null; git commit --no-verify --no-gpg-sign --message "--wip-- [skip ci]"' +alias gwt='git worktree' +alias gwta='git worktree add' +alias gwtls='git worktree list' +alias gwtmv='git worktree move' +alias gwtrm='git worktree remove' +alias gam='git am' +alias gamc='git am --continue' +alias gams='git am --skip' +alias gama='git am --abort' +alias gamscp='git am --show-current-patch' diff --git a/config/essentials/zsh/aliases.zsh b/config/essentials/zsh/aliases.zsh deleted file mode 100644 index 94d27e7..0000000 --- a/config/essentials/zsh/aliases.zsh +++ /dev/null @@ -1,435 +0,0 @@ -#!/bin/zsh -# s/alias \([^-]\)/alias -g \1 - -if grep -qi "debian\|ubuntu" /etc/os-release 2> /dev/null -then - alias aptup='apt update && apt upgrade -y' -fi - -if [ "$WAYLAND_DISPLAY" ] -then - alias -g clipp='wl-copy -n' - alias -g clipo='wl-paste -n' -else - if which devour > /dev/null 2>&1 - then - alias mpv='devour mpv' - alias zathura='devour zathura' - fi - alias -g clipp='xclip -selection clipboard -r' - alias -g clipo='xclip -o -selection clipboard -r' -fi -alias clipic='clipo > /tmp/pic.png' - -# Programs -alias vi='nvim' -alias nb='newsboat' -alias sr='surfraw' -alias ccu='calcurse' -alias pf='profanity' - -alias arduino-cli='arduino-cli --config-file $XDG_CONFIG_HOME/arduino15/arduino-cli.yaml' - -if [ -x /usr/bin/dircolors ]; then - test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" - # alias ls='ls -h --color --group-directories-first' - #alias dir='dir --color=auto' - #alias vdir='vdir --color=auto' - - alias grep='grep --color=auto' - alias fgrep='fgrep --color=auto' - alias egrep='egrep --color=auto' - alias ip='ip -color=auto' - alias ipa='ip -br a' -fi - -alias l='ls -l' -alias l1='ls -1' -alias ll='ls -la' -alias la='ls -aF' -alias lst='ls --tree' -alias lst1='ls --tree -L1' -alias lst2='ls --tree -L2' -alias lst3='ls --tree -L3' -alias ls.='ls -dl .*' -which exa >/dev/null 2>&1 && - alias ls='exa --sort extension --group-directories-first' || - alias ls='ls --color --group-directories-first --sort=extension' - -# pacman aliases -alias pac='pacman' -alias pacsi='pac -Si' -alias pacs='pac -Ss' -alias pacq='pac -Q' -alias pacql='pac -Ql' -alias pacqs='pac -Qs' -alias paci='pac -Qi' - -alias pacup='dopac -Syu' -alias dopac='doas pacman' -alias orpac='pacman -Qtdq | dopac -Rns - 2> /dev/null || echo "No orphans."' -alias dopacs='dopac -S' -alias dopacc='dopac -Sc' -alias doprm='dopac -Rns' - -alias mpkg='makepkg -si' - -which pikaur > /dev/null 2>&1 && - alias yay='pikaur' -alias yup='yay -Syu' -alias ysi='yay -Si' -alias yss='yay -Ss' -alias yqs='yay -Qs' -alias yql='yay -Ql' -alias yays='yay -S' -alias yrm='yay -Rns' - -alias pkb='pkgfile -b' - -# transmission -alias trr='transmission-remote debuc.com' -alias trls='transmission-remote debuc.com -t all -l' -alias tradd='transmission-remote debuc.com -a' -alias trclipo='transmission-remote debuc.com -a "$(clipo)"' - -alias grub-update='doas grub-mkconfig -o /boot/grub/grub.cfg' - -# vim -alias scr='nvim +"setlocal buftype=nofile bufhidden=hide noswapfile filetype=txt" scratch' -alias vimp="vim '+PlugInstall'" -alias nvimp="nvim '+PackerSync'" -alias nvg='git status > /dev/null 2>&1 && nvim "+Git"' -alias nvn='nvim "+Telekasten panel"' - -alias xrandr-rpgmaker='xrandr --auto --output VGA-1 --mode 1024x768 --left-of HDMI-1 && ~/.fehbg' -alias xrandr-default='xrandr --auto --output VGA-1 --mode 1920x1080 --left-of HDMI-1 --output HDMI-1 --mode 1920x1080 && ~/.fehbg' - -alias d='du -d 0 -h' -alias dud='du .* * -d 0 -h 2>/dev/null | sort -h' -alias df='df -h' -alias shred='shred -uz' -alias lsblk='lsblk -o name,type,fsused,fsavail,size,fstype,label,mountpoint' -alias floc='doas find / -type "f" 2> /dev/null | grep' -alias dloc='doas find / -type "d" 2> /dev/null | grep' -alias fif='find . -type "f" | grep' -alias fid='find . -type "d" | grep' -alias sxt='sxiv -t' -alias wgsh='wget --quiet --show-progress' -alias ss4='ss -tln4p | cut -f1 -d,' -alias mdbw='mariadb -h 0.0.0.0 -u padmin -pbulbizarre padmindb' -alias mdbwa='mariadb -h 10.3.50.5 -u padmin -pbulbizarre padmindb' - -# ssh -alias sha='ssh-add' -alias ssh-start='eval "$(ssh-agent)" && ssh-add' - -alias vidlen='ffprobe -show_entries format=duration -v quiet -of csv="p=0" -i' -alias whatsmyip='curl -s "ifconfig.co"' -alias icognito='unset HISTFILE' -alias webcam='v4l2-ctl --set-fmt-video=width=1280,height=720; mpv --demuxer-lavf-format=video4linux2 --demuxer-lavf-o-set=input_format=mjpeg av://v4l2:/dev/video0 --profile=low-latency --untimed --no-resume-playback' -alias capture='echo "Y" | wf-recorder -o "$(hyprctl -j monitors | jq -r '\''.[].name'\'' | fzf)" --codec=vp8_vaapi --device=/dev/dri/renderD128 -f output.webm -D' -alias qrclipo='qrencode -s 16 "$(clipo)" -o - | imv -w "imv - $(clipo)" -' -alias airpods='bluetoothctl connect 60:93:16:24:00:10' -alias hotpsot='nmcli dev wifi hotspot ifname wlan0 ssid wiefie password "peepeepoopoo"' -alias wtip='wt ip -c -brief addr' -alias muttmail='echo -n "email set: " >&2 -ls $HOME/.config/mutt/configs | -fzf | -tee /dev/stderr | -xargs -I {} ln -sf "$HOME/.config/mutt/configs/{}" $HOME/.config/mutt/muttrc' -alias fusephone='sshfs myphone: /media/phone' -alias ttyper='ttyper -l english1000 -w 100' - -alias wgup='doas wg-quick up wg0' -alias wgdown='doas wg-quick down wg0' - -# NPM -alias npi="npm init --yes" - -# Python -alias penv='python3 -m venv env' -alias phttp='python3 -m http.server' -alias pipreq='pip install -r requirements.txt' - -alias -g '...'='../..' -alias -g '....'='../../..' -alias -g bg='&; disown' -alias cx='chmod +x' -alias ch='chown ${USER}:${USER} -R' -alias -g hl='--help |& less -r' -alias kll='killall' -alias pi='ping archlinux.org -c4' -alias sba='source env/bin/activate || source bin/activate' -alias smc='systemctl' -alias ssc='doas systemctl' -alias smcu='smc --user' -alias zsr='source ${ZDOTDIR:-$HOME}/.zshrc && rehash' -alias rh='rehash' -alias wf='doas wipefs -a' -alias dmci="doas make clean install" -alias rmd='rm -f *.{orig,rej}' -alias cdzot='mkdir -p /tmp/zottesite && cd /tmp/zottesite' -alias gdate="date +%y%m%d_%H%M%S" -alias tpid='tail -f /dev/null --pid' - -alias vbm='vboxmanage' -alias vbls='vbm list vms' -alias vblsr='vbm list runningvms' -alias vb='vbm startvm' - -# quick config -alias ez='$EDITOR ${ZDOTDIR:-$HOME}/.zshrc' -alias eza='$EDITOR ${ZDOTDIR}/aliases.zsh' -alias ezf='$EDITOR ${ZDOTDIR}/functions.zsh' -alias eto='$EDITOR ~/sync/TODO' -alias edw='$EDITOR ~/src/dwm/config.def.h' -alias edm='$EDITOR ~/src/dmenu/config.def.h' -alias ehst='$EDITOR $ZDOTDIR/histfile' -alias ezh=' $EDITOR $HISTFILE' -alias est='$EDITOR ~/src/st/config.def.h' -alias esl='$EDITOR ~/src/slock/config.def.h' -alias esls='$EDITOR ~/src/slstatus/config.def.h' -alias ehy='$EDITOR ~/.config/hypr/hyprland.conf' -alias cfd='$EDITOR config.def.h' -# quick cd -alias cda='cd $HOME/docs/android/projects' -alias cds='cd $HOME/src/' -alias cdsw='cd $HOME/src/WheelAdvisor' -alias cdw='cd $HOME/src/dwm' -alias cddm='cd $HOME/src/dmenu' -alias cdslo='cd $HOME/src/slock' -alias cdsl='cd $HOME/src/slstatus' -alias cdst='cd $HOME/src/st' -alias cdsta='cd $HOME/src/stable-diffusion-webui' -alias cdl='cd $HOME/dl' -alias cdo='cd $HOME/src/dotfiles' -alias cdoc='cd $HOME/docs' -alias cdi='cd $HOME/src/installdrier' -alias cdia='cd $HOME/src/installdrier/arch' -alias cdib='cd $HOME/src/installdrier/deb' -alias cdm='cd $HOME/music' -alias cdd='cd $HOME/dl' -alias cdp='cd $HOME/pics' -alias cdrs='cd /srv/' -alias cdng='cd /etc/nginx' -alias czo='cd $HOME/zot/' - -# googoo aliases -alias o.='o .' -alias go.='go .' -alias ogo.='ogo .' -alias o/='o /' -alias o/s='o /srv' -alias go/='go /' -alias go/s='go /srv' -alias ogo/='ogo /' -alias ogo/s='ogo /srv' - -# fzf aliases -alias fzps='ps aux | tail +2 | fzf | tee /dev/stderr | awk '\''{print $2}'\'' | clipp' -alias asf='alias | fzf' -alias fzh="tac $HISTFILE | fzf | tee /dev/stderr | clipp" -alias ffwin='hyprctl clients -j | jq '\''.[].pid'\'' | fzf --preview "hyprctl clients -j | jq '\''.[] | select(.pid == {}) | {class, title, workspace, xwayland}'\''"' -alias pff='find ${PASSWORD_STORE_DIR:=$HOME/src/password-store/} -name "*.gpg" | sed -e "s@$PASSWORD_STORE_DIR/@@" -e '\''s/\.gpg$//'\'' | fzf | xargs pass show -c' -alias fzps='fzf --print0 | xargs -0I{}' - -alias -s zip='unzip -l' -alias -s tar='tar tf' - -alias dcb='docker build' -alias dcbt='docker build -t' -alias dce='docker exec' -alias dcet='docker exec -it' -alias dcmp='docker compose up -d' - -# debuc aliases -alias dbadd='ssh db dladd "'\''$(clipo)'\''"' -alias dbcons='ssh -t db dlcons' -alias dbinf='ssh db dlinfo' -alias sshdb='ssh -t db tmux a' -alias dbsmu='rsync -aPz db:/media/basilisk/music/ /media/kilimanjaro/music' - -alias cfg='git --git-dir=$HOME/src/dotfiles/.git --work-tree=$HOME/src/dotfiles' -# oh-my-zsh git aliases -alias g='git' -alias ga='git add' -alias gaa='git add --all' -alias gapa='git add --patch' -alias gau='git add --update' -alias gav='git add --verbose' -alias gap='git apply' -alias gapt='git apply --3way' -alias gb='git branch' -alias gba='git branch --all' -alias gbd='git branch --delete' -alias gbda='git branch --no-color --merged | command grep -vE "^([+*]|\s*($(git_main_branch)|$(git_develop_branch))\s*$)" | command xargs git branch --delete 2>/dev/null' -alias gbD='git branch --delete --force' -alias gbg='git branch -vv | grep ": gone\]"' -alias gbgd='local res=$(gbg | awk '"'"'{print $1}'"'"') && [[ $res ]] && echo $res | xargs git branch -d' -alias gbgD='local res=$(gbg | awk '"'"'{print $1}'"'"') && [[ $res ]] && echo $res | xargs git branch -D' -alias gbl='git blame -b -w' -alias gbnm='git branch --no-merged' -alias gbr='git branch --remote' -alias gbs='git bisect' -alias gbsb='git bisect bad' -alias gbsg='git bisect good' -alias gbsr='git bisect reset' -alias gbss='git bisect start' -alias gc='git commit --verbose' -alias gc!='git commit --verbose --amend' -alias gcn!='git commit --verbose --no-edit --amend' -alias gca='git commit --verbose --all' -alias gca!='git commit --verbose --all --amend' -alias gcan!='git commit --verbose --all --no-edit --amend' -alias gcans!='git commit --verbose --all --signoff --no-edit --amend' -alias gcam='git commit --all --message' -alias gcsm='git commit --signoff --message' -alias gcas='git commit --all --signoff' -alias gcasm='git commit --all --signoff --message' -alias gcb='git checkout -b' -alias gcf='git config --list' -alias gcl='git clone' -alias gclr='git clone --recurse-submodules' -alias gc1='git clone --depth 1' -alias gclean='git clean --interactive -d' -alias gpristine='git reset --hard && git clean --force -dfx' -alias grsf='git reset --soft HEAD~' -alias gcm='git checkout $(git_main_branch)' -alias gcd='git checkout $(git_develop_branch)' -alias gcmsg='git commit --message' -alias gco='git checkout' -alias gcor='git checkout --recurse-submodules' -alias gcount='git shortlog --summary --numbered' -alias gcp='git cherry-pick' -alias gcpa='git cherry-pick --abort' -alias gcpc='git cherry-pick --continue' -alias gcs='git commit --gpg-sign' -alias gcss='git commit --gpg-sign --signoff' -alias gcssm='git commit --gpg-sign --signoff --message' -alias gd='git diff' -alias gdca='git diff --cached' -alias gdcw='git diff --cached --word-diff' -alias gdct='git describe --tags $(git rev-list --tags --max-count=1)' -alias gds='git diff --staged' -alias gdt='git diff-tree --no-commit-id --name-only -r' -alias gdup='git diff @{upstream}' -alias gdw='git diff --word-diff' -alias gdl='git diff HEAD^ HEAD' -alias gf='git fetch' -alias gfo='git fetch origin' -alias gfg='git ls-files | grep' -alias gg='git gui citool' -alias gga='git gui citool --amend' -alias ggpur='ggu' -alias ggpull='git pull origin "$(git_current_branch)"' -alias ggpush='git push origin "$(git_current_branch)"' -alias ggsup='git branch --set-upstream-to=origin/$(git_current_branch)' -alias gpsup='git push --set-upstream origin $(git_current_branch)' -alias ghh='git help' -alias gignore='git update-index --assume-unchanged' -alias gignored='git ls-files -v | grep "^[[:lower:]]"' -alias git-svn-dcommit-push='git svn dcommit && git push github $(git_main_branch):svntrunk' -alias gk='\gitk --all --branches &!' -alias gke='\gitk --all $(git log --walk-reflogs --pretty=%h) &!' -alias gl='git pull' -alias glg='git log --stat' -alias glgp='git log --stat --patch' -alias glgg='git log --graph' -alias glgga='git log --graph --decorate --all' -alias glgm='git log --graph --max-count=10' -alias glo='git log --oneline --decorate' -alias glol="git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset'" -alias glols="git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset' --stat" -alias glod="git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset'" -alias glods="git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset' --date=short" -alias glola="git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset' --all" -alias glog='git log --oneline --decorate --graph' -alias gloga='git log --oneline --decorate --graph --all' -alias glp="_git_log_prettily" -alias gm='git merge' -alias gmom='git merge origin/$(git_main_branch)' -alias gmtl='git mergetool --no-prompt' -alias gmtlvim='git mergetool --no-prompt --tool=vimdiff' -alias gmum='git merge upstream/$(git_main_branch)' -alias gma='git merge --abort' -alias gp='git push' -alias gpd='git push --dry-run' -alias gpf!='git push --force' -alias gpoat='git push origin --all && git push origin --tags' -alias gpod='git push origin --delete' -alias gpr='git pull --rebase' -alias gpu='git push upstream' -alias gpv='git push --verbose' -alias gr='git remote' -alias gra='git remote add' -alias grb='git rebase' -alias grba='git rebase --abort' -alias grbc='git rebase --continue' -alias grbd='git rebase $(git_develop_branch)' -alias grbi='git rebase --interactive' -alias grbm='git rebase $(git_main_branch)' -alias grbom='git rebase origin/$(git_main_branch)' -alias grbo='git rebase --onto' -alias grbs='git rebase --skip' -alias grev='git revert' -alias grh='git reset' -alias grhh='git reset --hard' -alias groh='git reset origin/$(git_current_branch) --hard' -alias grm='git rm' -alias grmc='git rm --cached' -alias grmv='git remote rename' -alias grrm='git remote remove' -alias grs='git restore' -alias grset='git remote set-url' -alias grss='git restore --source' -alias grst='git restore --staged' -alias grt='cd "$(git rev-parse --show-toplevel || echo .)"' -alias gru='git reset --' -alias grup='git remote update' -alias grv='git remote --verbose' -alias gsb='git status --short --branch' -alias gsd='git svn dcommit' -alias gsh='git show' -alias gsi='git submodule init' -alias gsps='git show --pretty=short --show-signature' -alias gsr='git svn rebase' -alias gss='git status --short' -alias gst='git status' -alias gstaa='git stash apply' -alias gstc='git stash clear' -alias gstd='git stash drop' -alias gstl='git stash list' -alias gstp='git stash pop' -alias gsts='git stash show --text' -alias gstu='gsta --include-untracked' -alias gstall='git stash --all' -alias gsu='git submodule update' -alias gsw='git switch' -alias gswc='git switch --create' -alias gswm='git switch $(git_main_branch)' -alias gswd='git switch $(git_develop_branch)' -alias gts='git tag --sign' -alias gtv='git tag | sort -V' -alias gtl='gtl(){ git tag --sort=-v:refname -n --list "${1}*" }; noglob gtl' -alias gunignore='git update-index --no-assume-unchanged' -alias gunwip='git log --max-count=1 | grep -q -c "\--wip--" && git reset HEAD~1' -alias gup='git pull --rebase' -alias gupv='git pull --rebase --verbose' -alias gupa='git pull --rebase --autostash' -alias gupav='git pull --rebase --autostash --verbose' -alias gupom='git pull --rebase origin $(git_main_branch)' -alias gupomi='git pull --rebase=interactive origin $(git_main_branch)' -alias glum='git pull upstream $(git_main_branch)' -alias gluc='git pull upstream $(git_current_branch)' -alias gwch='git whatchanged -p --abbrev-commit --pretty=medium' -alias gwip='git add -A; git rm $(git ls-files --deleted) 2> /dev/null; git commit --no-verify --no-gpg-sign --message "--wip-- [skip ci]"' -alias gwt='git worktree' -alias gwta='git worktree add' -alias gwtls='git worktree list' -alias gwtmv='git worktree move' -alias gwtrm='git worktree remove' -alias gam='git am' -alias gamc='git am --continue' -alias gams='git am --skip' -alias gama='git am --abort' -alias gamscp='git am --show-current-patch' -- cgit v1.2.3 From 9049a073ee9a9644e27f4dbb52a4f591794258d7 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Fri, 21 Jul 2023 12:46:40 +0200 Subject: updated aliases --- config/essentials/zsh/aliases.sh | 31 ++++++++++++++++--------------- config/essentials/zsh/functions.zsh | 13 ++++++++++++- 2 files changed, 28 insertions(+), 16 deletions(-) diff --git a/config/essentials/zsh/aliases.sh b/config/essentials/zsh/aliases.sh index 3bfd298..a71ece1 100644 --- a/config/essentials/zsh/aliases.sh +++ b/config/essentials/zsh/aliases.sh @@ -43,7 +43,6 @@ then fi # Programs -alias vi='nvim' alias nb='newsboat' alias sr='surfraw' alias ccu='calcurse' @@ -191,7 +190,7 @@ alias vb='vbm startvm' # quick config alias ez='$EDITOR ${ZDOTDIR:-$HOME}/.zshrc' -alias eza='$EDITOR ${ZDOTDIR}/aliases.zsh' +alias eza='$EDITOR ${ZDOTDIR}/aliases.sh' alias ezf='$EDITOR ${ZDOTDIR}/functions.zsh' alias eto='$EDITOR ~/sync/TODO' alias edw='$EDITOR ~/src/dwm/config.def.h' @@ -205,26 +204,28 @@ alias ehy='$EDITOR ~/.config/hypr/hyprland.conf' alias cfd='$EDITOR config.def.h' # quick cd alias cda='cd $HOME/docs/android/projects' -alias cds='cd $HOME/src/' -alias cdpw='cd ${PASSWORD_STORE_DIR:-$HOME/.password-store}' -alias cdsw='cd $HOME/src/WheelAdvisor' -alias cdw='cd $HOME/src/dwm' +alias cdd='cd $HOME/dl' alias cddm='cd $HOME/src/dmenu' -alias cdslo='cd $HOME/src/slock' -alias cdsl='cd $HOME/src/slstatus' -alias cdst='cd $HOME/src/st' -alias cdsta='cd $HOME/src/stable-diffusion-webui' -alias cdl='cd $HOME/dl' -alias cdo='cd $HOME/src/dotfiles' -alias cdoc='cd $HOME/docs' alias cdi='cd $HOME/src/installdrier' alias cdia='cd $HOME/src/installdrier/arch' alias cdib='cd $HOME/src/installdrier/deb' +alias cdl='cd $HOME/dl' alias cdm='cd $HOME/music' -alias cdd='cd $HOME/dl' +alias cdng='cd /etc/nginx' +alias cdo='cd $HOME/src/dotfiles' +alias cdoc='cd $HOME/docs' alias cdp='cd $HOME/pics' +alias cdpa='cd $HOME/pics/ai-outputs/' +alias cdpw='cd ${PASSWORD_STORE_DIR:-$HOME/.password-store}' alias cdrs='cd /srv/' -alias cdng='cd /etc/nginx' +alias cds='cd $HOME/src/' +alias cdsc='cd $HOME/src/comfyui/' +alias cdsl='cd $HOME/src/slstatus' +alias cdslo='cd $HOME/src/slock' +alias cdst='cd $HOME/src/st' +alias cdsta='cd $HOME/src/stable-diffusion-webui' +alias cdsw='cd $HOME/src/WheelAdvisor' +alias cdw='cd $HOME/src/dwm' alias czo='cd $HOME/zot/' # fzf aliases diff --git a/config/essentials/zsh/functions.zsh b/config/essentials/zsh/functions.zsh index bfaea9d..ada523d 100644 --- a/config/essentials/zsh/functions.zsh +++ b/config/essentials/zsh/functions.zsh @@ -2,7 +2,7 @@ die () { - echo "$1" >&2 + echo "$@" >&2 } awnk() { @@ -267,3 +267,14 @@ trcp () { scp "$1" db:/media/basilisk/downloads/transmission/torrents/ } + +muttmail () +{ + die -n "email set: " + ls $HOME/.config/mutt/configs | + fzf | + tee /dev/stderr | + xargs -I {} ln -sf "$HOME/.config/mutt/configs/{}" $HOME/.config/mutt/muttrc + die -n 'Press [Enter to login]' + read && mutt +} -- cgit v1.2.3 From c6a02c4aea87ba8a981fe6c448e1508c8cf7f1ff Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Mon, 24 Jul 2023 13:10:33 +0200 Subject: added suspend --- bin/menuscripts/mpower | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/menuscripts/mpower b/bin/menuscripts/mpower index f03fd8e..443ed54 100755 --- a/bin/menuscripts/mpower +++ b/bin/menuscripts/mpower @@ -1,13 +1,14 @@ #!/bin/sh if [ "$MENUCMD" = "tofi" ] then - menucmd="tofi --width 10% --height 10% --padding-left 2%" + menucmd="tofi --width 10% --height 13% --padding-left 2%" elif [ "$MENUCMD" = "dmenu" ] then - menucmd="dmenu -g 2 -l 1" + menucmd="dmenu -g 2 -l 2" else menucmd="fzf" fi -choice="$(echo "poweroff\nreboot\nhibernate" | $menucmd)" -test -z "$choice" || doas "$choice" +choices="poweroff\nreboot\nhibernate\nsuspend" +choice="$(printf "$choices" | $menucmd)" +test -z "$choice" || systemctl "$choice" -- cgit v1.2.3 From bfde7ebf65e761a6df9a8bfb43ea5d40b44472c0 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Mon, 24 Jul 2023 13:10:47 +0200 Subject: eased the use --- bin/menuscripts/mpass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/menuscripts/mpass b/bin/menuscripts/mpass index 87559e9..a50f0fb 100755 --- a/bin/menuscripts/mpass +++ b/bin/menuscripts/mpass @@ -6,7 +6,7 @@ then menucmd="tofi --prompt pass:" elif [ "$MENUCMD" = "dmenu" ] then - menucmd="dmenu -l 4 -g 2 -x -i -p pass:" + menucmd="dmenu -l 4 -g 2 -i -p pass:" else menucmd="fzf --prompt pass:" fi @@ -17,6 +17,7 @@ do file="$file/$choice" done +test -z "$file" && exit 1 pass show -c "$file" && if [ -n "$WAYLAND_DISPLAY" ] && cliphist list >/dev/null then -- cgit v1.2.3 From 0cbd27042a2ab45f3691bb86e0c5b030768a4619 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Mon, 24 Jul 2023 13:10:59 +0200 Subject: don't use tee if root --- bin/common/drop_cache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/common/drop_cache b/bin/common/drop_cache index 4833597..e4fc039 100755 --- a/bin/common/drop_cache +++ b/bin/common/drop_cache @@ -4,5 +4,5 @@ then echo "Please run as root." exit 1 fi -echo 3 | tee /proc/sys/vm/drop_caches >/dev/null +echo 3 > /proc/sys/vm/drop_caches echo "cache cleared." -- cgit v1.2.3 From 0514717c6b1aa8bb018860fea0556d0549235df7 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Mon, 24 Jul 2023 13:11:11 +0200 Subject: fix bug on double keybinds --- config/hyprland/foot/foot.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/hyprland/foot/foot.ini b/config/hyprland/foot/foot.ini index 032c558..a1fc1e8 100644 --- a/config/hyprland/foot/foot.ini +++ b/config/hyprland/foot/foot.ini @@ -124,12 +124,12 @@ search-start=Control+Shift+r pipe-visible=[sh -c "cat > /tmp/footvisible"] Mod1+Shift+p # pipe-scrollback=[sh -c "xurls | fuzzel | xargs -r firefox"] none # pipe-selected=[xargs -r firefox] none -# show-urls-launch=Control+Shift+u +show-urls-launch=Control+Shift+u show-urls-copy=Mod1+Shift+l # show-urls-persistent=none # prompt-prev=Control+Shift+z # prompt-next=Control+Shift+x -# unicode-input=none +unicode-input=none # noop=none [search-bindings] -- cgit v1.2.3 From bb36f0b5a4894018c6808e45243939e333fd4a30 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Mon, 24 Jul 2023 13:11:22 +0200 Subject: added swayidle --- config/hyprland/hypr/startup.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/config/hyprland/hypr/startup.sh b/config/hyprland/hypr/startup.sh index bd7b858..83fefe4 100755 --- a/config/hyprland/hypr/startup.sh +++ b/config/hyprland/hypr/startup.sh @@ -4,3 +4,4 @@ waybar & gammastep & wl-paste --watch cliphist store & keyadd id_rsa & +swayidle 300 locker & -- cgit v1.2.3 From b09e5343bd87f067ffcac123c3a4f4a32f78c6f8 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Mon, 24 Jul 2023 13:12:17 +0200 Subject: fixed install stow on arch --- stowdots | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/stowdots b/stowdots index dc056f4..45a3ce5 100755 --- a/stowdots +++ b/stowdots @@ -1,6 +1,7 @@ #!/bin/sh trap "exit 1" EXIT INT +test "$(id -u)" != 0 && sudo=sudo die () { echo "$@" 1>&2 @@ -9,17 +10,17 @@ die () { if ! stow --version > /dev/null 2>&1 then die "stow not installed or not found." - die "install stow?" + die "install stow? (arch)" die -n ">" test "y" = "$(head -n 1)" && - doas pacman -Sy stow || + $sudo pacman -Sy stow || exit 1 fi if [ -n "${MACH:=$1}" ] then die "I: stowing for $MACH" else - die "E: MACH not set" >&2 + die "E: MACH not set" die "Enter valid value for 'MACH'" die "d(esktop) | s(erver) | l(aptop)" die -n ">" -- cgit v1.2.3 From 7c6fc5731dd8e1980806d8c06b2e070c1874c6a7 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Mon, 24 Jul 2023 13:16:59 +0200 Subject: fixed user-dirs and mimeapps --- config/theme/mimeapps.list | 162 +++++++++++++++++++++++++++++++++++++++++++++ config/xdg/user-dirs.dirs | 8 --- stowdots | 2 +- 3 files changed, 163 insertions(+), 9 deletions(-) delete mode 100644 config/xdg/user-dirs.dirs diff --git a/config/theme/mimeapps.list b/config/theme/mimeapps.list index 141c91f..20fdce3 100644 --- a/config/theme/mimeapps.list +++ b/config/theme/mimeapps.list @@ -1,2 +1,164 @@ [Default Applications] inode/directory=kitty-open.desktop +text/html=firefox.desktop +text/xml=firefox.desktop +application/xhtml+xml=firefox.desktop +application/vnd.mozilla.xul+xml=firefox.desktop +text/mml=firefox.desktop +x-scheme-handler/http=firefox.desktop +x-scheme-handler/https=firefox.desktop +application/x-xpinstall=firefox.desktop +application/pdf=org.pwmt.zathura-pdf-poppler.desktop +application/json=firefox.desktop +application/ogg=mpv.desktop +application/x-ogg=mpv.desktop +application/mxf=mpv.desktop +application/sdp=mpv.desktop +application/smil=mpv.desktop +application/x-smil=mpv.desktop +application/streamingmedia=mpv.desktop +application/x-streamingmedia=mpv.desktop +application/vnd.rn-realmedia=mpv.desktop +application/vnd.rn-realmedia-vbr=mpv.desktop +audio/aac=mpv.desktop +audio/x-aac=mpv.desktop +audio/vnd.dolby.heaac.1=mpv.desktop +audio/vnd.dolby.heaac.2=mpv.desktop +audio/aiff=mpv.desktop +audio/x-aiff=mpv.desktop +audio/m4a=mpv.desktop +audio/x-m4a=mpv.desktop +application/x-extension-m4a=mpv.desktop +audio/mp1=mpv.desktop +audio/x-mp1=mpv.desktop +audio/mp2=mpv.desktop +audio/x-mp2=mpv.desktop +audio/mp3=mpv.desktop +audio/x-mp3=mpv.desktop +audio/mpeg=mpv.desktop +audio/mpeg2=mpv.desktop +audio/mpeg3=mpv.desktop +audio/mpegurl=mpv.desktop +audio/x-mpegurl=mpv.desktop +audio/mpg=mpv.desktop +audio/x-mpg=mpv.desktop +audio/rn-mpeg=mpv.desktop +audio/musepack=mpv.desktop +audio/x-musepack=mpv.desktop +audio/ogg=mpv.desktop +audio/scpls=mpv.desktop +audio/x-scpls=mpv.desktop +audio/vnd.rn-realaudio=mpv.desktop +audio/wav=mpv.desktop +audio/x-pn-wav=mpv.desktop +audio/x-pn-windows-pcm=mpv.desktop +audio/x-realaudio=mpv.desktop +audio/x-pn-realaudio=mpv.desktop +audio/x-ms-wma=mpv.desktop +audio/x-pls=mpv.desktop +audio/x-wav=mpv.desktop +video/mpeg=mpv.desktop +video/x-mpeg2=mpv.desktop +video/x-mpeg3=mpv.desktop +video/mp4v-es=mpv.desktop +video/x-m4v=mpv.desktop +video/mp4=mpv.desktop +application/x-extension-mp4=mpv.desktop +video/divx=mpv.desktop +video/vnd.divx=mpv.desktop +video/msvideo=mpv.desktop +video/x-msvideo=mpv.desktop +video/ogg=mpv.desktop +video/quicktime=mpv.desktop +video/vnd.rn-realvideo=mpv.desktop +video/x-ms-afs=mpv.desktop +video/x-ms-asf=mpv.desktop +audio/x-ms-asf=mpv.desktop +application/vnd.ms-asf=mpv.desktop +video/x-ms-wmv=mpv.desktop +video/x-ms-wmx=mpv.desktop +video/x-ms-wvxvideo=mpv.desktop +video/x-avi=mpv.desktop +video/avi=mpv.desktop +video/x-flic=mpv.desktop +video/fli=mpv.desktop +video/x-flc=mpv.desktop +video/flv=mpv.desktop +video/x-flv=mpv.desktop +video/x-theora=mpv.desktop +video/x-theora+ogg=mpv.desktop +video/x-matroska=mpv.desktop +video/mkv=mpv.desktop +audio/x-matroska=mpv.desktop +application/x-matroska=mpv.desktop +video/webm=mpv.desktop +audio/webm=mpv.desktop +audio/vorbis=mpv.desktop +audio/x-vorbis=mpv.desktop +audio/x-vorbis+ogg=mpv.desktop +video/x-ogm=mpv.desktop +video/x-ogm+ogg=mpv.desktop +application/x-ogm=mpv.desktop +application/x-ogm-audio=mpv.desktop +application/x-ogm-video=mpv.desktop +application/x-shorten=mpv.desktop +audio/x-shorten=mpv.desktop +audio/x-ape=mpv.desktop +audio/x-wavpack=mpv.desktop +audio/x-tta=mpv.desktop +audio/AMR=mpv.desktop +audio/ac3=mpv.desktop +audio/eac3=mpv.desktop +audio/amr-wb=mpv.desktop +video/mp2t=mpv.desktop +audio/flac=mpv.desktop +audio/mp4=mpv.desktop +application/x-mpegurl=mpv.desktop +video/vnd.mpegurl=mpv.desktop +application/vnd.apple.mpegurl=mpv.desktop +audio/x-pn-au=mpv.desktop +video/3gp=mpv.desktop +video/3gpp=mpv.desktop +video/3gpp2=mpv.desktop +audio/3gpp=mpv.desktop +audio/3gpp2=mpv.desktop +video/dv=mpv.desktop +audio/dv=mpv.desktop +audio/opus=mpv.desktop +audio/vnd.dts=mpv.desktop +audio/vnd.dts.hd=mpv.desktop +audio/x-adpcm=mpv.desktop +application/x-cue=mpv.desktop +audio/m3u=mpv.desktop +text/english=nvim.desktop +text/plain=nvim.desktop +text/x-makefile=nvim.desktop +text/x-c++hdr=nvim.desktop +text/x-c++src=nvim.desktop +text/x-chdr=nvim.desktop +text/x-csrc=nvim.desktop +text/x-java=nvim.desktop +text/x-moc=nvim.desktop +text/x-pascal=nvim.desktop +text/x-tcl=nvim.desktop +text/x-tex=nvim.desktop +application/x-shellscript=nvim.desktop +text/x-c=nvim.desktop +text/x-c++=nvim.desktop +image/bmp=imv.desktop +image/gif=imv.desktop +image/jpeg=imv.desktop +image/jpg=imv.desktop +image/pjpeg=imv.desktop +image/png=imv.desktop +image/tiff=imv.desktop +image/x-bmp=imv.desktop +image/x-pcx=imv.desktop +image/x-png=imv.desktop +image/x-portable-anymap=imv.desktop +image/x-portable-bitmap=imv.desktop +image/x-portable-graymap=imv.desktop +image/x-portable-pixmap=imv.desktop +image/x-tga=imv.desktop +image/x-xbitmap=imv.desktop +image/heif=imv.desktop diff --git a/config/xdg/user-dirs.dirs b/config/xdg/user-dirs.dirs deleted file mode 100644 index d5389fd..0000000 --- a/config/xdg/user-dirs.dirs +++ /dev/null @@ -1,8 +0,0 @@ -XDG_DOCUMENTS_DIR="$HOME/docs" -XDG_DOWNLOAD_DIR="$HOME/dl" -XDG_MUSIC_DIR="$HOME/music" -XDG_PICTURES_DIR="$HOME/pics" -XDG_PUBLICSHARE_DIR="$HOME/" -XDG_VIDEOS_DIR="$HOME/vids" -XDG_DESKTOP_DIR="$HOME/" -XDG_TEMPLATES_DIR="$HOME/" diff --git a/stowdots b/stowdots index 45a3ce5..b16c572 100755 --- a/stowdots +++ b/stowdots @@ -34,7 +34,7 @@ cd "$(dirname "$(realpath "$0")")" || exit 1 case "$MACH" in "desktop" | "d" | "laptop" | "l") stow -d bin/ -t "$HOME/bin" -R common guiscripts menuscripts extra - stow -d config/ -t "$HOME/.config" -R essentials common extra X theme xdg hyprland + stow -d config/ -t "$HOME/.config" -R essentials common extra X theme hyprland stow -d config/ -t "$HOME/" -R home ;; "server" | "s") -- cgit v1.2.3 From 1f2b3a3a3d348dc887b3239683ff45637f119c6c Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Mon, 24 Jul 2023 13:17:07 +0200 Subject: added aivpn --- bin/extra/aivpn | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100755 bin/extra/aivpn diff --git a/bin/extra/aivpn b/bin/extra/aivpn new file mode 100755 index 0000000..c67aa2c --- /dev/null +++ b/bin/extra/aivpn @@ -0,0 +1,39 @@ +#!/bin/sh + +die () +{ + echo "$@" >&2 +} + +if [ "$1" = "-k" ] +then + pgrep -f -- "ssh.*-L.*mc-wd" | + xargs kill + exit +fi + +# For when script calls itself +if [ -n "$PASSWORD" ] +then + pass show "$PASSWORD" && + exit + exit 1 +fi + +keyadd ehb/ai + +export SSH_ASKPASS="$0" +export SSH_ASKPASS_REQUIRE="prefer" +export PASSWORD=aluc + +die "I: Activating vpn" +ssh mc-wd rasdial "vpn.student.ehb.be" +ssh -f -N \ + -L 2222:10.2.160.41:22 \ + mc-wd + +ssh -t \ + -L 8188:localhost:8188 \ + mc-wd \ + ssh -N -L 8188:localhost:8188 luca@10.2.160.41 +die "[8188], [2222]" -- cgit v1.2.3 From fd7e4846d8233aaa992bfab90b7a45b67df59831 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Wed, 26 Jul 2023 22:50:43 +0200 Subject: edited alias --- config/essentials/zsh/aliases.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/essentials/zsh/aliases.sh b/config/essentials/zsh/aliases.sh index a71ece1..a81f3b1 100644 --- a/config/essentials/zsh/aliases.sh +++ b/config/essentials/zsh/aliases.sh @@ -135,7 +135,7 @@ alias fif='find . -type "f" | grep' alias fid='find . -type "d" | grep' alias sxt='sxiv -t' alias wgsh='wget --quiet --show-progress' -alias ss4='ss -tln4p | cut -f1 -d,' +alias ss4='ss -tln4p' alias mdbw='mariadb -h 0.0.0.0 -u padmin -pbulbizarre padmindb' alias mdbwa='mariadb -h 10.3.50.5 -u padmin -pbulbizarre padmindb' -- cgit v1.2.3 From 6c4352a8d67412df5efbdae54155c7d13f78a15d Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Wed, 26 Jul 2023 22:50:57 +0200 Subject: added variable keybind for shell --- config/essentials/nvim/ftplugin/sh.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/config/essentials/nvim/ftplugin/sh.lua b/config/essentials/nvim/ftplugin/sh.lua index 9290c29..0da4c23 100644 --- a/config/essentials/nvim/ftplugin/sh.lua +++ b/config/essentials/nvim/ftplugin/sh.lua @@ -2,4 +2,5 @@ vim.keymap.set("n", "t", "s/\\(\\s*\\)\\(.*\\)/\\1echo \"\\2\" vim.keymap.set("n", "i", "s/\\(\\s*\\)\\(.*\\)/\\1echo \"\\2: $\\2\"") vim.keymap.set("i", "t", "s/\\(\\s*\\)\\(.*\\)/\\1echo \"\\2\"A") vim.keymap.set("i", "i", "s/\\(\\s*\\)\\(.*\\)/\\1echo \"\\2: $\\2\"A") +vim.keymap.set({"i", "n"}, "v", "A)\"I\"$(0") vim.opt.formatoptions = "cqrnj" -- cgit v1.2.3 From af9a83c5eecc7b5965bfbcaf718eb11fd2018c98 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Wed, 26 Jul 2023 22:51:12 +0200 Subject: added C vault --- config/essentials/nvim/lua/user/zk.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config/essentials/nvim/lua/user/zk.lua b/config/essentials/nvim/lua/user/zk.lua index a5e06d8..613c8e5 100644 --- a/config/essentials/nvim/lua/user/zk.lua +++ b/config/essentials/nvim/lua/user/zk.lua @@ -50,6 +50,11 @@ require('telekasten').setup({ template_new_note = home .. "/" .. "templates/new_note.md", new_note_filename = "title", }, + C = { + home = home .. "/" .. "C", + template_new_note = home .. "/" .. "templates/new_note.md", + new_note_filename = "title", + }, businessIT = { home = home .. "/" .. "businessIT", template_new_note = home .. "/" .. "templates/new_note.md", -- cgit v1.2.3 From daffc673ca054abd9f2f927c651d782499cf185e Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Wed, 26 Jul 2023 22:52:22 +0200 Subject: use startw script for hyprland --- bin/guiscripts/startw | 5 +++++ config/essentials/zsh/.zshrc | 5 +---- 2 files changed, 6 insertions(+), 4 deletions(-) create mode 100755 bin/guiscripts/startw diff --git a/bin/guiscripts/startw b/bin/guiscripts/startw new file mode 100755 index 0000000..768f401 --- /dev/null +++ b/bin/guiscripts/startw @@ -0,0 +1,5 @@ +#!/bin/sh + +eval "$(keychain --dir "$XDG_CONFIG_HOME/keychain" --eval --quiet --agents gpg,ssh)" + +Hyprland diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc index 2619fed..195b64c 100644 --- a/config/essentials/zsh/.zshrc +++ b/config/essentials/zsh/.zshrc @@ -2,13 +2,10 @@ if [[ "/dev/tty1" = "$TTY" || "/dev/tty2" = "$TTY" ]] && [[ "$(id -u)" -ne 0 ]] then - clear - eval "$(keychain --dir "$XDG_CONFIG_HOME/keychain" --eval --quiet --agents gpg 3A626DD20A32EB2E5DD9CE71CFD9ABC97158CD5D 2> /dev/null)" - eval "$(keychain --dir "$XDG_CONFIG_HOME/keychain" --noask --eval --quiet --agents ssh 2> /dev/null)" clear if [ "/dev/tty1" = "$TTY" ] then - Hyprland > /dev/null 2>&1 + startw > /dev/null 2>&1 else startx > /dev/null 2>&1 fi -- cgit v1.2.3 From d92788670e49842e322518930ddb60794b01ec60 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Fri, 28 Jul 2023 14:39:04 +0200 Subject: sorted cd aliases --- config/essentials/zsh/aliases.sh | 48 ++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/config/essentials/zsh/aliases.sh b/config/essentials/zsh/aliases.sh index a81f3b1..07a17e2 100644 --- a/config/essentials/zsh/aliases.sh +++ b/config/essentials/zsh/aliases.sh @@ -193,40 +193,44 @@ alias ez='$EDITOR ${ZDOTDIR:-$HOME}/.zshrc' alias eza='$EDITOR ${ZDOTDIR}/aliases.sh' alias ezf='$EDITOR ${ZDOTDIR}/functions.zsh' alias eto='$EDITOR ~/sync/TODO' -alias edw='$EDITOR ~/src/dwm/config.def.h' -alias edm='$EDITOR ~/src/dmenu/config.def.h' +alias edw='$EDITOR ~/proj/suckless/dwm/config.def.h' +alias edm='$EDITOR ~/proj/suckless/dmenu/config.def.h' alias ehst='$EDITOR $ZDOTDIR/histfile' alias ezh=' $EDITOR $HISTFILE' -alias est='$EDITOR ~/src/st/config.def.h' -alias esl='$EDITOR ~/src/slock/config.def.h' -alias esls='$EDITOR ~/src/slstatus/config.def.h' +alias est='$EDITOR ~/proj/suckless/st/config.def.h' +alias esl='$EDITOR ~/proj/suckless/slock/config.def.h' +alias esls='$EDITOR ~/proj/suckless/slstatus/config.def.h' alias ehy='$EDITOR ~/.config/hypr/hyprland.conf' alias cfd='$EDITOR config.def.h' # quick cd -alias cda='cd $HOME/docs/android/projects' -alias cdd='cd $HOME/dl' -alias cddm='cd $HOME/src/dmenu' -alias cdi='cd $HOME/src/installdrier' -alias cdia='cd $HOME/src/installdrier/arch' -alias cdib='cd $HOME/src/installdrier/deb' +# !sort -t "'" -k 2 alias cdl='cd $HOME/dl' -alias cdm='cd $HOME/music' -alias cdng='cd /etc/nginx' -alias cdo='cd $HOME/src/dotfiles' alias cdoc='cd $HOME/docs' +alias cda='cd $HOME/docs/android/projects' +alias cdm='cd $HOME/music' alias cdp='cd $HOME/pics' alias cdpa='cd $HOME/pics/ai-outputs/' -alias cdpw='cd ${PASSWORD_STORE_DIR:-$HOME/.password-store}' -alias cdrs='cd /srv/' +alias cdpp='cd $HOME/proj/personal/' +alias chom='cd $HOME/proj/personal/homepage' +alias cdsw='cd $HOME/proj/personal/WheelAdvisor' +alias cddm='cd $HOME/proj/suckless/dmenu' +alias cdw='cd $HOME/proj/suckless/dwm' +alias cdslo='cd $HOME/proj/suckless/slock' +alias cdsl='cd $HOME/proj/suckless/slstatus' +alias cdst='cd $HOME/proj/suckless/st' +alias cdsta='cd $HOME/proj/suckless/stable-diffusion-webui' +alias cdsu='cd $HOME/proj/suckless/surf' alias cds='cd $HOME/src/' +alias cdsb='cd $HOME/src/build' alias cdsc='cd $HOME/src/comfyui/' -alias cdsl='cd $HOME/src/slstatus' -alias cdslo='cd $HOME/src/slock' -alias cdst='cd $HOME/src/st' -alias cdsta='cd $HOME/src/stable-diffusion-webui' -alias cdsw='cd $HOME/src/WheelAdvisor' -alias cdw='cd $HOME/src/dwm' +alias cdo='cd $HOME/src/dotfiles' +alias cdi='cd $HOME/src/installdrier' +alias cdia='cd $HOME/src/installdrier/arch' +alias cdib='cd $HOME/src/installdrier/deb' alias czo='cd $HOME/zot/' +alias cdpw='cd ${PASSWORD_STORE_DIR:-$HOME/.password-store}' +alias cdng='cd /etc/nginx' +alias cdrs='cd /srv/' # fzf aliases alias fzps='ps aux | tail +2 | fzf | tee /dev/stderr | awk '\''{print $2}'\'' | clipp' -- cgit v1.2.3 From 6a0f7b5bca424d0c3a93239e2aacb130ddad27fc Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sat, 29 Jul 2023 01:30:05 +0200 Subject: cleaned up is a file command --- config/essentials/zsh/.zshrc | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc index 195b64c..58974ba 100644 --- a/config/essentials/zsh/.zshrc +++ b/config/essentials/zsh/.zshrc @@ -64,17 +64,14 @@ bindkey "^['" quote-line isTextFile() { - if [ ! -f "$1" ] - then + [ -f "$1" ] && + # will execute the file, I'd rather not have an error message + [ ${1::2} != "./" ] && + [ ${1::1} != "/" ] && + ! type "$1" > /dev/null && + # is text file? + file -b --mime-type "$1" | grep -q "^text/" || return 1 - fi - - file_type=$(file -b --mime-type "$1") - if [[ "$file_type" == text/* ]] - then - return - fi - return 1 } # rehash hook @@ -110,17 +107,13 @@ function osc7 { } add-zsh-hook -Uz chpwd osc7 command_not_found_handler () { - isTextFile "$1" || - echo "zsh: command not found: $1" >&2 -} -# open file with file name -open_file() { - if [ ${1:0:2} != "./" ] && isTextFile "$1" + if [[ -o interactive ]] && isTextFile "$1" then "$EDITOR" "$1" + else + echo "zsh: command not found: $1" >&2 fi } -add-zsh-hook -Uz preexec open_file # prompt PS1=' %B%(#.%F{1}.%F{13})[%n%b%f@%B%F{6}%m]%b%f %3~ ' -- cgit v1.2.3 From b05e5cd55220cb2f47161c529715ec5e67be9490 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sat, 29 Jul 2023 11:44:58 +0200 Subject: quote TD alias --- config/essentials/nvim/after/plugin/luasnip.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/essentials/nvim/after/plugin/luasnip.lua b/config/essentials/nvim/after/plugin/luasnip.lua index 43d985a..7ee274f 100644 --- a/config/essentials/nvim/after/plugin/luasnip.lua +++ b/config/essentials/nvim/after/plugin/luasnip.lua @@ -142,7 +142,7 @@ ls.add_snippets("java", { }) ls.add_snippets("sh", { - s("TD", t "THISDIR=$(dirname $(readlink -f \"$0\"))"), + s("TD", t "THISDIR=\"$(dirname \"$(readlink -f \"$0\")\")\""), parse("fn", "$1 ()\n{\n\t$2\n}$0", {}), -- Functions parse("rchar", -- cgit v1.2.3 From 4d4769747c968da74f57ed5105cea59903669aee Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sat, 29 Jul 2023 11:45:19 +0200 Subject: add keychain to xinitrc --- config/X/x11/xinitrc | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/config/X/x11/xinitrc b/config/X/x11/xinitrc index d261b3f..5f595b1 100755 --- a/config/X/x11/xinitrc +++ b/config/X/x11/xinitrc @@ -6,21 +6,10 @@ sysmodmap=/etc/X11/xinit/.Xmodmap # merge in defaults and keymaps -if [ -f $sysresources ]; then - xrdb -merge $sysresources -fi - -if [ -f $sysmodmap ]; then - xmodmap $sysmodmap -fi - -if [ -f "$userresources" ]; then - xrdb -merge "$userresources" -fi - -if [ -f "$usermodmap" ]; then - xmodmap "$usermodmap" -fi +[ -f $sysresources ] && xrdb -merge $sysresources +[ -f $sysmodmap ] && xmodmap $sysmodmap +[ -f "$userresources" ] && xrdb -merge "$userresources" +[ -f "$usermodmap" ] && xmodmap "$usermodmap" if [ -d /etc/X11/xinit/xinitrc.d ] ; then for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do @@ -37,5 +26,6 @@ xmodmap -e "keycode 135 = Super_L" xautolock -time 5 -locker slock & gammastep -m randr & slstatus & +eval "$(keychain --dir "$XDG_CONFIG_HOME/keychain" --eval --quiet --agents gpg,ssh)" unclutter --timeout 3 --jitter 50 -b exec startdwm -- cgit v1.2.3 From 1cfaa516353629a48029576a98bf221d4826ad9e Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sat, 29 Jul 2023 11:45:32 +0200 Subject: changed port of httpd stream --- config/common/mpd/mpd.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/common/mpd/mpd.conf b/config/common/mpd/mpd.conf index 7ea7137..dda6f45 100644 --- a/config/common/mpd/mpd.conf +++ b/config/common/mpd/mpd.conf @@ -14,7 +14,7 @@ audio_output { audio_output { type "httpd" name "My HTTP Stream" - port "8000" + port "7721" always_on "yes" # prevent MPD from disconnecting all listeners when playback is stopped. tags "yes" # httpd supports sending tags to listening streams. } -- cgit v1.2.3 From ff7417c9ce835265b889319a8e75ee2ae38eab1d Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sat, 29 Jul 2023 11:46:03 +0200 Subject: added alias --- config/essentials/zsh/aliases.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/config/essentials/zsh/aliases.sh b/config/essentials/zsh/aliases.sh index 07a17e2..1d742a9 100644 --- a/config/essentials/zsh/aliases.sh +++ b/config/essentials/zsh/aliases.sh @@ -135,6 +135,7 @@ alias fif='find . -type "f" | grep' alias fid='find . -type "d" | grep' alias sxt='sxiv -t' alias wgsh='wget --quiet --show-progress' +alias wgc='wgsh "$(clipo)"' alias ss4='ss -tln4p' alias mdbw='mariadb -h 0.0.0.0 -u padmin -pbulbizarre padmindb' alias mdbwa='mariadb -h 10.3.50.5 -u padmin -pbulbizarre padmindb' -- cgit v1.2.3 From 1460eae0d754818dffdaadb744571cbfce1a8378 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sat, 29 Jul 2023 11:46:22 +0200 Subject: use script instead of alias --- bin/common/cx | 2 ++ config/essentials/zsh/aliases.sh | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100755 bin/common/cx diff --git a/bin/common/cx b/bin/common/cx new file mode 100755 index 0000000..88fb817 --- /dev/null +++ b/bin/common/cx @@ -0,0 +1,2 @@ +#!/bin/sh +[ -x "$1" ] && chmod -x "$1" || chmod +x "$1" diff --git a/config/essentials/zsh/aliases.sh b/config/essentials/zsh/aliases.sh index 1d742a9..53c8da0 100644 --- a/config/essentials/zsh/aliases.sh +++ b/config/essentials/zsh/aliases.sh @@ -167,7 +167,6 @@ alias penv='python3 -m venv env' alias phttp='python3 -m http.server' alias pipreq='pip install -r requirements.txt' -alias cx='chmod +x' alias ch='chown ${USER}:${USER} -R' alias kll='killall' alias pi='ping archlinux.org -c4' -- cgit v1.2.3 From 55378ac493716f15fd68d73fb77fcade4a667d99 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sat, 29 Jul 2023 11:48:39 +0200 Subject: added saf --- bin/common/saf | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 bin/common/saf diff --git a/bin/common/saf b/bin/common/saf new file mode 100755 index 0000000..0c6fbc4 --- /dev/null +++ b/bin/common/saf @@ -0,0 +1,24 @@ +#!/bin/sh + +# Simple Ass Fetch by futxlii + +red="$(printf '\033[31m')" +green="$(printf '\033[32m')" +blue="$(printf '\033[34m')" +reset="$(printf '\033[0m')" + +for file in /etc/os-release /usr/lib/os-release +do + [ -f "$file" ] && . "$file" && break +done + +KERNEL="$(uname -r)" +UPTIME="$(uptime -p)"; UPTIME="${UPTIME##up }" +SHELL="$(basename "$SHELL")" + +cat < Date: Sat, 29 Jul 2023 11:48:57 +0200 Subject: added toush --- bin/common/toush | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 bin/common/toush diff --git a/bin/common/toush b/bin/common/toush new file mode 100755 index 0000000..dd675b9 --- /dev/null +++ b/bin/common/toush @@ -0,0 +1,14 @@ +#!/bin/sh +# fork of +# https://codeberg.org/futxlii/bin/toush :) + +shebang='#!/bin/sh' + +usage() { >&2 printf 'Usage: %s' "${0##*/}"; exit 1 ;} + +[ "$1" ] || usage +while [ "$1" ]; do + [ -f "$1" ] && usage + printf '%s\n\n' "$shebang" > "$1" && chmod +x "$1" + shift +done -- cgit v1.2.3 From eeb2fac3028837fae0db3d816acf6d8bd0050120 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sat, 29 Jul 2023 11:49:08 +0200 Subject: added sync-install.sh --- bin/common/sync-install.sh | 58 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100755 bin/common/sync-install.sh diff --git a/bin/common/sync-install.sh b/bin/common/sync-install.sh new file mode 100755 index 0000000..e26c74d --- /dev/null +++ b/bin/common/sync-install.sh @@ -0,0 +1,58 @@ +#!/bin/sh + +die () +{ + echo "$@" >&2 +} + +read_char () +{ + old_stty_cfg=$(stty -g) + stty raw -echo + dd ibs=1 count=1 2> /dev/null + stty $old_stty_cfg +} + +confirm () +{ + printf "$1 " + read_char | grep "[yY]" +} + +usage() +{ + >&2 printf 'Usage: %s \n' "${0##*/}" +} + +[ $# -lt 2 ] && usage && exit 1 +REMOTE="$1" +DEST="$2" +SCRIPT="${3:-sync.sh}" + +if ! ssh $REMOTE test -w $DEST 2> /dev/null +then + die "Not a valid remote or destination." + exit 1 +fi + +die "─────────────────────────────────────────────────────────────" +cat <&2 +#!/bin/sh + +THISDIR="\$(dirname "\$(readlink -f "\$0")")" +inotifywait -m -e create,modify,delete --format "%f" "\$THISDIR" | +while read FILE +do + rsync -aP "\$THISDIR/" "$REMOTE:$DEST" + sleep 1m +done +EOF +die "─────────────────────────────────────────────────────────────" +die "located at $(readlink -f "$SCRIPT")" + +if confirm "good?" +then + chmod +x "$SCRIPT" +else + rm -f "$SCRIPT" +fi -- cgit v1.2.3 From bc78ab4052dea77dba0884ec3ed52b35e7046b66 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sat, 29 Jul 2023 11:49:30 +0200 Subject: added alias and changed sort macro --- config/essentials/zsh/aliases.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/essentials/zsh/aliases.sh b/config/essentials/zsh/aliases.sh index 53c8da0..7926c17 100644 --- a/config/essentials/zsh/aliases.sh +++ b/config/essentials/zsh/aliases.sh @@ -202,8 +202,7 @@ alias esl='$EDITOR ~/proj/suckless/slock/config.def.h' alias esls='$EDITOR ~/proj/suckless/slstatus/config.def.h' alias ehy='$EDITOR ~/.config/hypr/hyprland.conf' alias cfd='$EDITOR config.def.h' -# quick cd -# !sort -t "'" -k 2 +# /# quick cd jV}k:!sort -t "'" -k 2 alias cdl='cd $HOME/dl' alias cdoc='cd $HOME/docs' alias cda='cd $HOME/docs/android/projects' @@ -212,6 +211,7 @@ alias cdp='cd $HOME/pics' alias cdpa='cd $HOME/pics/ai-outputs/' alias cdpp='cd $HOME/proj/personal/' alias chom='cd $HOME/proj/personal/homepage' +alias lov='cd $HOME/proj/personal/lola' alias cdsw='cd $HOME/proj/personal/WheelAdvisor' alias cddm='cd $HOME/proj/suckless/dmenu' alias cdw='cd $HOME/proj/suckless/dwm' -- cgit v1.2.3 From 95c594f28214aed154d94d4b7fdcea0f89772882 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sat, 29 Jul 2023 11:50:33 +0200 Subject: changed newtab and searchengines --- config/extra/tridactyl/tridactylrc | 52 ++++++++++++++------------------------ 1 file changed, 19 insertions(+), 33 deletions(-) diff --git a/config/extra/tridactyl/tridactylrc b/config/extra/tridactyl/tridactylrc index 2b98c9d..8433ee5 100644 --- a/config/extra/tridactyl/tridactylrc +++ b/config/extra/tridactyl/tridactylrc @@ -1,44 +1,30 @@ -" General Settings -set newtab https://www.duckduckgo.com -set searchengine duckduckgo -set searchurls.wi https://www.wikipedia.org/w/index.php?title=Special:Search&search=%s +set newtab http://localhost:28669 +set searchengine qwant + +" Searchurls +set searchurls.1x https://www.1377x.to/search/%s/1 +set searchurls.am https://www.amazon.com.be/s?k=%s +set searchurls.aur https://aur.archlinux.org/packages?O=0&K=%s +set searchurls.aw https://wiki.archlinux.org/title/%s +set searchurls.cnrtl http://www.cnrtl.fr/lexicographie/ +set searchurls.dhu https://hub.docker.com/search?q=%s set searchurls.g https://www.google.com/search?q=%s -set searchurls.y https://www.youtube.com/results?search_query=%s set searchurls.gm https://www.google.com/maps?q=%s -set searchurls.aw https://wiki.archlinux.org/title/%s -set searchurls.aur https://aur.archlinux.org/packages?O=0&K=%s -set searchurls.tw https://tweakers.net/zoeken/?keyword=%s +set searchurls.gwi https://wiki.gentoo.org/index.php?title=Special%3ASearch&profile=default&fulltext=Search&search= set searchurls.im https://www.imdb.com/find?q=%s -set searchurls.1x https://www.1377x.to/search/%s/1 -set searchurls.am https://www.amazon.com.be/s?k=%s -set searchurls.pyp https://pypi.org/search/?q=%s +set searchurls.lg https://libgen.gs/index.php?req=%s set searchurls.mc https://minecraft.fandom.com/wiki/%s set searchurls.mcf https://www.curseforge.com/minecraft/mc-mods/search?search=%s set searchurls.mcm https://modrinth.com/mods?q=%s -set searchurls.dhu https://hub.docker.com/search?q=%s -set searchurls.plu https://app.pluralsight.com/search/?q=%s -set searchurls.ru https://rutracker.org/forum/tracker.php?nm=%s -set searchurls.google https://www.google.com/search?q= -set searchurls.googlelucky https://www.google.com/search?btnI=I'm+Feeling+Lucky&q= -set searchurls.scholar https://scholar.google.com/scholar?q= -set searchurls.googleuk https://www.google.co.uk/search?q= -set searchurls.bing https://www.bing.com/search?q= -set searchurls.duckduckgo https://duckduckgo.com/?q= -set searchurls.yahoo https://search.yahoo.com/search?p= -set searchurls.twitter https://twitter.com/search?q= -set searchurls.wikipedia https://en.wikipedia.org/wiki/Special:Search/ -set searchurls.youtube https://www.youtube.com/results?search_query= -set searchurls.amazon https://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords= -set searchurls.amazonuk https://www.amazon.co.uk/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords= -set searchurls.startpage https://startpage.com/do/search?language=english&cat=web&query= -set searchurls.github https://github.com/search?utf8=✓&q= -set searchurls.searx https://searx.me/?category_general=on&q= -set searchurls.cnrtl http://www.cnrtl.fr/lexicographie/ -set searchurls.osm https://www.openstreetmap.org/search?query= set searchurls.mdn https://developer.mozilla.org/en-US/search?q= -set searchurls.gentoo_wiki https://wiki.gentoo.org/index.php?title=Special%3ASearch&profile=default&fulltext=Search&search= +set searchurls.osm https://www.openstreetmap.org/search?query= +set searchurls.plu https://app.pluralsight.com/search/?q=%s +set searchurls.pyp https://pypi.org/search/?q=%s set searchurls.qwant https://www.qwant.com/?q= - +set searchurls.ru https://rutracker.org/forum/tracker.php?nm=%s +set searchurls.tw https://tweakers.net/zoeken/?keyword=%s +set searchurls.wi https://www.wikipedia.org/w/index.php?title=Special:Search&search=%s +set searchurls.y https://www.youtube.com/results?search_query=%s " Binds " vim macro: " Ibind gnp tabopen yy2pwwdtojRwinbblrwkro -- cgit v1.2.3 From d063a1ac14b89f4412ed9df9f67b8ed5fd0d834a Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sat, 29 Jul 2023 11:50:50 +0200 Subject: added binds for window and tab opens, edited vim macro --- config/extra/tridactyl/tridactylrc | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/config/extra/tridactyl/tridactylrc b/config/extra/tridactyl/tridactylrc index 8433ee5..c48ffe1 100644 --- a/config/extra/tridactyl/tridactylrc +++ b/config/extra/tridactyl/tridactylrc @@ -26,23 +26,36 @@ set searchurls.tw https://tweakers.net/zoeken/?keyword=%s set searchurls.wi https://www.wikipedia.org/w/index.php?title=Special:Search&search=%s set searchurls.y https://www.youtube.com/results?search_query=%s " Binds + " vim macro: -" Ibind gnp tabopen yy2pwwdtojRwinbblrwkro +" yy2pwlrnjrpwitabbkiwin2j0 bind J tabnext bind K tabprev -" chat gpt -bind gnc tabopen https://chat.openai.com/chat + bind goc open https://chat.openai.com/chat -bind gwc winopen https://chat.openai.com/chat -" awesome pixel tutorials -bind gnp tabopen https://github.com/Siilwyn/awesome-pixel-art#tutorials +bind gnc winopen https://chat.openai.com/chat +bind gpc tabopen https://chat.openai.com/chat bind gop open https://github.com/Siilwyn/awesome-pixel-art#tutorials -bind gwp winopen https://github.com/Siilwyn/awesome-pixel-art#tutorials -" transmission -bind godb open http://debuc.com/ -bind godt open http://debuc.com:9091 -bind gods open http://debuc.com:5030 +bind gnp winopen https://github.com/Siilwyn/awesome-pixel-art#tutorials +bind gpp tabopen https://github.com/Siilwyn/awesome-pixel-art#tutorials +bind godb open http://debuc.com:32095 +bind gndb winopen http://debuc.com:32095 +bind gpdb tabopen http://debuc.com:32095 +bind godc open http://debuc.com:8384 +bind gndc winopen http://debuc.com:8384 +bind gpdc tabopen http://debuc.com:8384 bind godj open http://debuc.com:8096 +bind gndj winopen http://debuc.com:8096 +bind gpdj tabopen http://debuc.com:8096 +bind gods open http://debuc.com:5030 +bind gnds winopen http://debuc.com:5030 +bind gpds tabopen http://debuc.com:5030 +bind godt open http://debuc.com:9091 +bind gndt winopen http://debuc.com:9091 +bind gpdt tabopen http://debuc.com:9091 +bind gody open http://debuc.com:9010 +bind gndy winopen http://debuc.com:9010 +bind gpdy tabopen http://debuc.com:9010 " For syntax highlighting see https://github.com/tridactyl/vim-tridactyl " vim: set filetype=tridactyl -- cgit v1.2.3 From f5b7a1a7cd4052b37dfd576d5ca5864a2b969e09 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sat, 29 Jul 2023 11:51:18 +0200 Subject: added /usr/lib/os-release --- config/essentials/zsh/.zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc index 58974ba..d8675d4 100644 --- a/config/essentials/zsh/.zshrc +++ b/config/essentials/zsh/.zshrc @@ -25,7 +25,7 @@ zle -N add-surround surround zle -N change-surround surround compinit -if grep -qi "debian\|ubuntu" /etc/os-release 2>/dev/null +if grep -qi "debian\|ubuntu" /usr/lib/os-release /etc/os-release 2>/dev/null then sfiles=( /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh -- cgit v1.2.3 From 03d5f1e7cb38859477089b88737a40950ea28843 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Wed, 2 Aug 2023 10:42:52 +0200 Subject: added wireguard module to waybar --- config/hyprland/waybar/config.jsonc | 7 ++++++- config/hyprland/waybar/schemes/base16.css | 10 ++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/config/hyprland/waybar/config.jsonc b/config/hyprland/waybar/config.jsonc index 816a851..aadc6d3 100644 --- a/config/hyprland/waybar/config.jsonc +++ b/config/hyprland/waybar/config.jsonc @@ -2,7 +2,7 @@ "layer": "top", "modules-left": ["battery", "clock", "wlr/workspaces", "mpd"], "modules-center": ["hyprland/window"], - "modules-right": ["network", "pulseaudio", "temperature", "cpu", "custom/memory", "tray"], + "modules-right": ["custom/wireguard", "network", "pulseaudio", "temperature", "cpu", "custom/memory", "tray"], "wlr/workspaces": { "on-click": "activate", }, @@ -44,6 +44,11 @@ "default":["", "", "", "", ""] }, }, + "custom/wireguard": { + "exec": "ip addr show dev wg0", + "format": "wg0", + "restart-interval": 3, + }, "network": { "format-wifi": " ", "tooltip-format-wifi": "{ifname} {essid}", diff --git a/config/hyprland/waybar/schemes/base16.css b/config/hyprland/waybar/schemes/base16.css index eced638..19bb703 100644 --- a/config/hyprland/waybar/schemes/base16.css +++ b/config/hyprland/waybar/schemes/base16.css @@ -39,7 +39,7 @@ window#waybar.PCSX2 #window { #mpd, #battery, #window, -#network, #pulseaudio, #temperature, #cpu, #custom-memory { +#custom-wireguard, #network, #pulseaudio, #temperature, #cpu, #custom-memory { margin-left: 8px; padding-left: 16px; padding-right: 16px; @@ -48,7 +48,7 @@ window#waybar.PCSX2 #window { #workspaces, #mpd, #battery, #clock, #window, -#network, #pulseaudio, #temperature, #cpu, #custom-memory, #tray { +#custom-wireguard, #network, #pulseaudio, #temperature, #cpu, #custom-memory, #tray { border: solid @background 2px; margin-top: 4px; margin-bottom: 2px; @@ -112,6 +112,12 @@ window#waybar.PCSX2 #window { background: @color4; } +#custom-wireguard { + color: @color5; + border-color: @color8; + background: @background; +} + #network { color: @background; background: @color5; -- cgit v1.2.3 From 49edb6606fd74d771b5df5cf28d049dfceec29de Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Wed, 2 Aug 2023 10:43:26 +0200 Subject: cleanup on locker script --- bin/guiscripts/locker | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/bin/guiscripts/locker b/bin/guiscripts/locker index c35f6d4..b680484 100755 --- a/bin/guiscripts/locker +++ b/bin/guiscripts/locker @@ -3,10 +3,7 @@ which swaylock grim pixelate > /dev/null || exit 1 umask 077 -monitors="$(hyprctl monitors -j | - jq -r '.[].name' | - tr '\n' ' ' | - sed 's,.$,,')" +monitors="$(hyprctl monitors -j | jq -r '.[].name' | xargs)" for monitor in $monitors do @@ -14,9 +11,9 @@ do grim -l 0 -o "$monitor" "$file" pixelate "$file" "$file" # Create image command for swaylock - icmd="$icmd --image $monitor:$file" + img_opt="--image $monitor:$file $img_opt" files="$files $file" done -swaylock -f -u $icmd +swaylock -f -u $img_opt shred -uz -- $files -- cgit v1.2.3 From 29fb5f0b50e0339255e29dec00a6761f10f9c32b Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Wed, 2 Aug 2023 10:43:39 +0200 Subject: added variable keymap to sh --- config/essentials/nvim/ftplugin/sh.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/essentials/nvim/ftplugin/sh.lua b/config/essentials/nvim/ftplugin/sh.lua index 0da4c23..01b20d6 100644 --- a/config/essentials/nvim/ftplugin/sh.lua +++ b/config/essentials/nvim/ftplugin/sh.lua @@ -2,5 +2,5 @@ vim.keymap.set("n", "t", "s/\\(\\s*\\)\\(.*\\)/\\1echo \"\\2\" vim.keymap.set("n", "i", "s/\\(\\s*\\)\\(.*\\)/\\1echo \"\\2: $\\2\"") vim.keymap.set("i", "t", "s/\\(\\s*\\)\\(.*\\)/\\1echo \"\\2\"A") vim.keymap.set("i", "i", "s/\\(\\s*\\)\\(.*\\)/\\1echo \"\\2: $\\2\"A") -vim.keymap.set({"i", "n"}, "v", "A)\"I\"$(0") +vim.keymap.set({"i", "n"}, "v", "A)\"I\"$(I") vim.opt.formatoptions = "cqrnj" -- cgit v1.2.3 From ad799ff689fd57f0ab09ed2287241ba7607b0d00 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Wed, 2 Aug 2023 10:43:54 +0200 Subject: fixed missing dependency check --- config/essentials/nvim/lua/user/live-server.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/essentials/nvim/lua/user/live-server.lua b/config/essentials/nvim/lua/user/live-server.lua index dac3c19..197809d 100644 --- a/config/essentials/nvim/lua/user/live-server.lua +++ b/config/essentials/nvim/lua/user/live-server.lua @@ -5,7 +5,7 @@ local live_servers = {} function M.start_live_server() if vim.fn.executable('lsof') == 0 then print("Error: 'lsof' command not found") - elseif vim.fn.executable('lsof') == 0 then + elseif vim.fn.executable('live-server') == 0 then print("Error: 'live-server' command not found") return end -- cgit v1.2.3 From e7cc98818fd10d4acb230df7a9f7a0c6afb74247 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Wed, 2 Aug 2023 10:44:32 +0200 Subject: added resize function --- config/essentials/zsh/functions.zsh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config/essentials/zsh/functions.zsh b/config/essentials/zsh/functions.zsh index ada523d..671e6fb 100644 --- a/config/essentials/zsh/functions.zsh +++ b/config/essentials/zsh/functions.zsh @@ -278,3 +278,11 @@ muttmail () die -n 'Press [Enter to login]' read && mutt } + +resize () +{ + test $# -lt 2 && + printf "usage: %s [out]\n" "$0" >&2 && + return 1 + convert -resize $1^ -gravity center -crop $1+0+0 -- "$2" "${3:-$1}" +} -- cgit v1.2.3 From 6f87b71ad343d16a9fb68f672aa4d1904da4c29b Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Wed, 2 Aug 2023 10:44:52 +0200 Subject: added float rule for pinentry --- config/hyprland/hypr/hyprland.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/config/hyprland/hypr/hyprland.conf b/config/hyprland/hypr/hyprland.conf index 8aa437e..a8a99c2 100644 --- a/config/hyprland/hypr/hyprland.conf +++ b/config/hyprland/hypr/hyprland.conf @@ -82,6 +82,7 @@ gestures { } windowrulev2 = noanim, class:^(.*[Pp]inentry.*)$ +windowrulev2 = float, class:^(.*[Pp]inentry.*)$ windowrulev2 = noanim, class:dmenu layerrule = noanim, launcher -- cgit v1.2.3 From dbffb8df71390547166bd9901fa45a0e5c9139c1 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Wed, 2 Aug 2023 10:45:15 +0200 Subject: use bordered windows for suggestions --- config/essentials/nvim/lua/user/cmp/setup.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/essentials/nvim/lua/user/cmp/setup.lua b/config/essentials/nvim/lua/user/cmp/setup.lua index 99f984d..8f8291e 100644 --- a/config/essentials/nvim/lua/user/cmp/setup.lua +++ b/config/essentials/nvim/lua/user/cmp/setup.lua @@ -6,8 +6,8 @@ cmp.setup({ end, }, window = { - -- completion = cmp.config.window.bordered(), - -- documentation = cmp.config.window.bordered(), + completion = cmp.config.window.bordered(), + documentation = cmp.config.window.bordered(), }, mapping = cmp.mapping.preset.insert({ [''] = cmp.mapping.scroll_docs(-4), -- cgit v1.2.3 From 63c64f071ecd45cf66ab49d199a634cd8db27056 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Wed, 2 Aug 2023 10:48:25 +0200 Subject: added .bashrc --- config/home/.bashrc | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 config/home/.bashrc diff --git a/config/home/.bashrc b/config/home/.bashrc new file mode 100644 index 0000000..33dbba4 --- /dev/null +++ b/config/home/.bashrc @@ -0,0 +1,9 @@ +SHELL=/bin/bash +PATH=$HOME/bin:$PATH +color1="\[\033[35m\]" +color2="\[\033[36m\]" +bold="\[\033[1m\]" +reset="\[\033[0m\]" +PS1="${color1}${bold} [\\u${reset}@${color2}${bold}\\h]${reset} \\w " +HISTFILE= +. $HOME/.config/zsh/aliases.sh -- cgit v1.2.3