diff options
author | Benjamin Chausse <benjamin@chausse.xyz> | 2024-01-20 14:12:01 -0500 |
---|---|---|
committer | Benjamin Chausse <benjamin@chausse.xyz> | 2024-01-20 14:12:01 -0500 |
commit | 61e7324e6692b155b6dd1d450ff431582c1fc57b (patch) | |
tree | 9074dd62a0470df97968bad984599bf5854e77c1 | |
parent | 52d1cae0fb84a9a8d3f6f1c779570110c7251a6e (diff) |
Aliasrc has similar format to shortcutrc
-rw-r--r-- | .config/aliasrc | 39 | ||||
-rwxr-xr-x | .config/lf/lfrc | 3 | ||||
-rw-r--r-- | .config/shortcutrc | 1 | ||||
-rwxr-xr-x | .local/bin/aliasgen | 10 |
4 files changed, 21 insertions, 32 deletions
diff --git a/.config/aliasrc b/.config/aliasrc index 2f68613..4462404 100644 --- a/.config/aliasrc +++ b/.config/aliasrc @@ -6,30 +6,23 @@ # \__,_|_|_|\__,_|___/_| \___| # # - - - # #---Universal Shell Alias Configuration File---# # # First column contains the alias # Second column contains the command to execute +# Aliases and/or commands cannot contain commas -|---------+-----------------------------------------------------------------| -| :e | $EDITOR | -| :q | exit | -| adog | git log --all --decorate --oneline --graph | -| cdd | cd .. | -| e | $EDITOR | -| ew | nvim ./main.rnw | -| g | git | -| goobook | goobook -c $HOME/.config/goobook/config | -| gor | go run *.go | -| info | info --vi-keys | -| mmi | make && sudo make install && [ -f config.def.h ] && rm config.h | -| R | R -q | -| tmcd | tmux attach-session -t | -| tmdd | tmux kill-session -t | -| tmls | tmux list-sessions | -| xx | chmod +x | -| yadog | yadm log --all --decorate --oneline --graph | -|---------+-----------------------------------------------------------------| - +:e, $EDITOR +:q, exit +cdd, cd .. +e, $EDITOR +w, $BROWSER +g, git +gor, go run *.go +mmi, make && sudo make install && [ -f config.def.h ] && rm config.h +R, R -q +tmcd, tmux attach-session -t +tmdd, tmux kill-session -t +tmls, tmux list-sessions +xx, chmod +x +adog, git log --all --decorate --oneline --graph +yadog, yadm log --all --decorate --oneline --graph diff --git a/.config/lf/lfrc b/.config/lf/lfrc index 93c9029..c1353e0 100755 --- a/.config/lf/lfrc +++ b/.config/lf/lfrc @@ -142,7 +142,8 @@ map V push :!nvim<space> map W $setsid -f $TERMINAL >/dev/null 2>&1 map Y $printf "%s" "$fx" | xclip -selection clipboard -map E $dropbox-cli exclude add "%s" | notify-send "Dropbox" "Excluded %s from syncing." +map E $dropbox-cli exclude add "$f" && notify-send -a " Dropbox" "Excluded $f from computer" +map S $dropbox-cli sharelink "$f" | xsel -b && notify-send -a " Dropbox" "Link copied to clipboard." # Source Bookmarks source "~/.config/lf/shortcuts" diff --git a/.config/shortcutrc b/.config/shortcutrc index 4dec5e6..c85f550 100644 --- a/.config/shortcutrc +++ b/.config/shortcutrc @@ -31,6 +31,7 @@ School, sf, ~/Dropbox/A/scholar/sherbrooke/24-01 Images, img, ~/Dropbox/A/Personnal/Photos/unsorted Scripts, sc, ~/.local/bin Hotkeys, sx, ~/.config/sxhkd +OrgMode, om, ~/Dropbox/org Dropbox, bx, ~/Dropbox Downloads, dl, ~/Downloads Wallpapers, wp, ~/Pictures/wallpapers diff --git a/.local/bin/aliasgen b/.local/bin/aliasgen index 6d9e8cdc..00fbc68 100755 --- a/.local/bin/aliasgen +++ b/.local/bin/aliasgen @@ -1,13 +1,7 @@ #!/bin/sh # Removing unecessary comments and documentation -raw=$(cat $HOME/.config/aliasrc | tail -n +17 "$HOME/.config/aliasrc" | sed "s/^|\s*//g; - s/\(.*\)|\(.*\)|\(.*\)|/\1|\2|\3/g; - s/\s*$//g; - /^$/d") +raw="$(sed 's/^\s*//;s/#.*$//;s/,\s*/,/g;/^$/d' <"$XDG_CONFIG_HOME/aliasrc")" # #---zsh---# # -echo "$raw" | sed "s/^/alias\ /; - s/\s*|\s*/=\"/; - s/^.*-*+-*=\"$//; - s/\s*|$/\"/" > $HOME/.cache/zsh-aliases +echo "$raw" | sed 's/\(.*\),\(.*\)/alias \1="\2"/' >$HOME/.cache/zsh-aliases |