add shortcuts and aliasses
This commit is contained in:
parent
ccea9fb1b0
commit
2c20c72b1a
7 changed files with 61 additions and 30 deletions
|
@ -8,6 +8,8 @@ set period 1
|
||||||
set hiddenfiles ".*:*.aux:*.log:*.bbl:*.bcf:*.blg:*.run.xml"
|
set hiddenfiles ".*:*.aux:*.log:*.bbl:*.bcf:*.blg:*.run.xml"
|
||||||
set previewer ~/.config/lf/preview
|
set previewer ~/.config/lf/preview
|
||||||
set cleaner ~/.config/lf/clean
|
set cleaner ~/.config/lf/clean
|
||||||
|
# source directory shortcuts
|
||||||
|
source "~/.config/lf/shortcutrc"
|
||||||
|
|
||||||
cmd open ${{
|
cmd open ${{
|
||||||
case $(file --mime-type "$(readlink -f $f)" -b) in
|
case $(file --mime-type "$(readlink -f $f)" -b) in
|
||||||
|
|
29
.config/lf/shortcutrc
Normal file
29
.config/lf/shortcutrc
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
map Ccac cd "/home/luca/.cache"
|
||||||
|
map Ccf cd "/home/luca/.config"
|
||||||
|
map CD cd "/home/luca/Downloads"
|
||||||
|
map Cd cd "/home/luca/Documents"
|
||||||
|
map Cdt cd "/home/luca/.local/share"
|
||||||
|
map Crr cd "/home/luca/.local/src"
|
||||||
|
map Ch cd "/home/luca"
|
||||||
|
map Cm cd "/home/luca/Music"
|
||||||
|
map Cmn cd "/mnt"
|
||||||
|
map Cpp cd "/home/luca/Pictures"
|
||||||
|
map Csc cd "/home/luca/.local/bin"
|
||||||
|
map Csrc cd "/home/luca/.local/src"
|
||||||
|
map Cvv cd "/home/luca/Videos"
|
||||||
|
map Ebf $$EDITOR "/home/luca/.config/shell/bm-files"
|
||||||
|
map Ebd $$EDITOR "/home/luca/.config/shell/bm-dirs"
|
||||||
|
map Ecfx $$EDITOR "/home/luca/.config/x11/xresources"
|
||||||
|
map Ecfb $$EDITOR "~/.local/src/dwmblocks/config.h"
|
||||||
|
map Ecfv $$EDITOR "/home/luca/.config/nvim/init.vim"
|
||||||
|
map Ecfz $$EDITOR "/.zshrc"
|
||||||
|
map Ecfa $$EDITOR "/home/luca/.config/shell/aliasrc"
|
||||||
|
map Ecfp $$EDITOR "/home/luca/.config/shell/profile"
|
||||||
|
map Ecfm $$EDITOR "/home/luca/.config/mutt/muttrc"
|
||||||
|
map Ecfn $$EDITOR "/home/luca/.config/newsboat/config"
|
||||||
|
map Ecfu $$EDITOR "/home/luca/.config/newsboat/urls"
|
||||||
|
map Ecfmb $$EDITOR "/home/luca/.config/ncmpcpp/bindings"
|
||||||
|
map Ecfmc $$EDITOR "/home/luca/.config/ncmpcpp/config"
|
||||||
|
map Ecfl $$EDITOR "/home/luca/.config/lf/lfrc"
|
||||||
|
map EcfL $$EDITOR "/home/luca/.config/lf/scope"
|
||||||
|
map EcfX $$EDITOR "/home/luca/.config/sxiv/exec/key-handler"
|
|
@ -4,7 +4,7 @@
|
||||||
[ -f "$XINITRC" ] && alias startx="startx $XINITRC"
|
[ -f "$XINITRC" ] && alias startx="startx $XINITRC"
|
||||||
|
|
||||||
# sudo not required for some system commands
|
# sudo not required for some system commands
|
||||||
for command in mount umount sv pacman updatedb su shutdown poweroff reboot ; do
|
for command in mount umount sv pacman apt updatedb su shutdown poweroff reboot ; do
|
||||||
alias $command="sudo $command"
|
alias $command="sudo $command"
|
||||||
done; unset command
|
done; unset command
|
||||||
|
|
||||||
|
@ -18,20 +18,29 @@ alias \
|
||||||
ffmpeg="ffmpeg -hide_banner" \
|
ffmpeg="ffmpeg -hide_banner" \
|
||||||
exa="exa -abghHliS" \
|
exa="exa -abghHliS" \
|
||||||
duf="duf -all" \
|
duf="duf -all" \
|
||||||
lock='slock -m "$(cowsay "$(fortune)" | lolcat -ft)"'
|
lock='slock -m "$(cowsay "$(fortune)" | lolcat -ft)"' \
|
||||||
|
ls="ls -hN --color=auto --group-directories-first" \
|
||||||
|
grep="grep --color=auto" \
|
||||||
|
diff="diff --color=auto" \
|
||||||
|
|
||||||
|
|
||||||
# Colorize commands when possible.
|
# Colorize commands when possible.
|
||||||
alias \
|
alias \
|
||||||
ls="ls -hN --color=auto --group-directories-first" \
|
ls="ls -hN --color=auto --group-directories-first" \
|
||||||
grep="grep --color=auto" \
|
grep="grep --color=auto" \
|
||||||
diff="diff --color=auto" \
|
diff="diff --color=auto" \
|
||||||
ccat="highlight --out-format=ansi"
|
ccat="highlight --out-format=ansi" \
|
||||||
|
ip="ip -color=auto"
|
||||||
|
|
||||||
# These common commands are just too long! Abbreviate them.
|
# These common commands are just too long! Abbreviate them.
|
||||||
alias \
|
alias \
|
||||||
ka="killall" \
|
ka="killall" \
|
||||||
e="$EDITOR" \
|
e="$EDITOR" \
|
||||||
p="pacman"
|
z="zathura" \
|
||||||
|
p="pacman" \
|
||||||
|
au="apt uninstall" \
|
||||||
|
ar="apt reinstall" \
|
||||||
|
ai="apt install" \
|
||||||
|
|
||||||
# Misc.
|
# Misc.
|
||||||
alias \
|
alias \
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# You can add comments to these files with #
|
# You can add comments to these files with #
|
||||||
tr ${XDG_DATA_HOME:-$HOME/Trash}
|
|
||||||
cac ${XDG_CACHE_HOME:-$HOME/.cache}
|
cac ${XDG_CACHE_HOME:-$HOME/.cache}
|
||||||
cf ${XDG_CONFIG_HOME:-$HOME/.config}
|
cf ${XDG_CONFIG_HOME:-$HOME/.config}
|
||||||
D ${XDG_DOWNLOAD_DIR:-$HOME/Downloads}
|
D ${XDG_DOWNLOAD_DIR:-$HOME/Downloads}
|
||||||
|
|
|
@ -1,24 +1,24 @@
|
||||||
# vim: filetype=sh
|
# vim: filetype=sh
|
||||||
alias tr="cd /home/luca/.local/share && ls -a" \
|
alias \
|
||||||
cac="cd /home/luca/.cache && ls -a" \
|
cac="cd /home/luca/.cache" \
|
||||||
cf="cd /home/luca/.config && ls -a" \
|
cf="cd /home/luca/.config" \
|
||||||
D="cd /home/luca/Downloads && ls -a" \
|
D="cd /home/luca/Downloads" \
|
||||||
d="cd /home/luca/Documents && ls -a" \
|
d="cd /home/luca/Documents" \
|
||||||
dt="cd /home/luca/.local/share && ls -a" \
|
dt="cd /home/luca/.local/share" \
|
||||||
rr="cd /home/luca/.local/src && ls -a" \
|
rr="cd /home/luca/.local/src" \
|
||||||
h="cd /home/luca && ls -a" \
|
h="cd /home/luca" \
|
||||||
m="cd /home/luca/Music && ls -a" \
|
m="cd /home/luca/Music" \
|
||||||
mn="cd /mnt && ls -a" \
|
mn="cd /mnt" \
|
||||||
pp="cd /home/luca/Pictures && ls -a" \
|
pp="cd /home/luca/Pictures" \
|
||||||
sc="cd /home/luca/.local/bin && ls -a" \
|
sc="cd /home/luca/.local/bin" \
|
||||||
src="cd /home/luca/.local/src && ls -a" \
|
src="cd /home/luca/.local/src" \
|
||||||
vv="cd /home/luca/Videos && ls -a" \
|
vv="cd /home/luca/Videos" \
|
||||||
bf="$EDITOR /home/luca/.config/shell/bm-files" \
|
bf="$EDITOR /home/luca/.config/shell/bm-files" \
|
||||||
bd="$EDITOR /home/luca/.config/shell/bm-dirs" \
|
bd="$EDITOR /home/luca/.config/shell/bm-dirs" \
|
||||||
cfx="$EDITOR /home/luca/.config/x11/xresources" \
|
cfx="$EDITOR /home/luca/.config/x11/xresources" \
|
||||||
cfb="$EDITOR ~/.local/src/dwmblocks/config.h" \
|
cfb="$EDITOR ~/.local/src/dwmblocks/config.h" \
|
||||||
cfv="$EDITOR /home/luca/.config/nvim/init.vim" \
|
cfv="$EDITOR /home/luca/.config/nvim/init.vim" \
|
||||||
cfz="$EDITOR /home/luca/.config/zsh/.zshrc" \
|
cfz="$EDITOR /.zshrc" \
|
||||||
cfa="$EDITOR /home/luca/.config/shell/aliasrc" \
|
cfa="$EDITOR /home/luca/.config/shell/aliasrc" \
|
||||||
cfp="$EDITOR /home/luca/.config/shell/profile" \
|
cfp="$EDITOR /home/luca/.config/shell/profile" \
|
||||||
cfm="$EDITOR /home/luca/.config/mutt/muttrc" \
|
cfm="$EDITOR /home/luca/.config/mutt/muttrc" \
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
hash -d tr=/home/luca/.local/share
|
|
||||||
hash -d cac=/home/luca/.cache
|
hash -d cac=/home/luca/.cache
|
||||||
hash -d cf=/home/luca/.config
|
hash -d cf=/home/luca/.config
|
||||||
hash -d D=/home/luca/Downloads
|
hash -d D=/home/luca/Downloads
|
||||||
|
@ -17,7 +16,7 @@ hash -d bd=/home/luca/.config/shell/bm-dirs
|
||||||
hash -d cfx=/home/luca/.config/x11/xresources
|
hash -d cfx=/home/luca/.config/x11/xresources
|
||||||
hash -d cfb=~/.local/src/dwmblocks/config.h
|
hash -d cfb=~/.local/src/dwmblocks/config.h
|
||||||
hash -d cfv=/home/luca/.config/nvim/init.vim
|
hash -d cfv=/home/luca/.config/nvim/init.vim
|
||||||
hash -d cfz=/home/luca/.config/zsh/.zshrc
|
hash -d cfz=/.zshrc
|
||||||
hash -d cfa=/home/luca/.config/shell/aliasrc
|
hash -d cfa=/home/luca/.config/shell/aliasrc
|
||||||
hash -d cfp=/home/luca/.config/shell/profile
|
hash -d cfp=/home/luca/.config/shell/profile
|
||||||
hash -d cfm=/home/luca/.config/mutt/muttrc
|
hash -d cfm=/home/luca/.config/mutt/muttrc
|
||||||
|
|
|
@ -21,12 +21,8 @@ printf "\" vim: filetype=vim\\n" > "$vifm_shortcuts"
|
||||||
# Format the `directories` file in the correct syntax and sent it to all three configs.
|
# Format the `directories` file in the correct syntax and sent it to all three configs.
|
||||||
eval "echo \"$(cat "$bmdirs")\"" | \
|
eval "echo \"$(cat "$bmdirs")\"" | \
|
||||||
awk "!/^\s*#/ && !/^\s*\$/ {gsub(\"\\\s*#.*$\",\"\");
|
awk "!/^\s*#/ && !/^\s*\$/ {gsub(\"\\\s*#.*$\",\"\");
|
||||||
printf(\"%s=\42cd %s && ls -a\42 \\\\\n\",\$1,\$2) >> \"$shell_shortcuts\" ;
|
printf(\"%s=\42cd %s\42 \\\\\n\",\$1,\$2) >> \"$shell_shortcuts\" ;
|
||||||
printf(\"hash -d %s=%s \n\",\$1,\$2) >> \"$zsh_named_dirs\" ;
|
printf(\"hash -d %s=%s \n\",\$1,\$2) >> \"$zsh_named_dirs\" ;
|
||||||
printf(\"abbr %s \42cd %s; and ls -a\42\n\",\$1,\$2) >> \"$fish_shortcuts\" ;
|
|
||||||
printf(\"map g%s :cd %s<CR>\nmap t%s <tab>:cd %s<CR><tab>\nmap M%s <tab>:cd %s<CR><tab>:mo<CR>\nmap Y%s <tab>:cd %s<CR><tab>:co<CR> \n\",\$1,\$2, \$1, \$2, \$1, \$2, \$1, \$2) >> \"$vifm_shortcuts\" ;
|
|
||||||
printf(\"config.bind(';%s', \42set downloads.location.directory %s ;; hint links download\42) \n\",\$1,\$2) >> \"$qute_shortcuts\" ;
|
|
||||||
printf(\"map g%s cd %s\nmap t%s tab_new %s\nmap m%s shell mv -v %%s %s\nmap Y%s shell cp -rv %%s %s \n\",\$1,\$2,\$1,\$2, \$1, \$2, \$1, \$2) >> \"$ranger_shortcuts\" ;
|
|
||||||
printf(\"map C%s cd \42%s\42 \n\",\$1,\$2) >> \"$lf_shortcuts\" }"
|
printf(\"map C%s cd \42%s\42 \n\",\$1,\$2) >> \"$lf_shortcuts\" }"
|
||||||
|
|
||||||
# Format the `files` file in the correct syntax and sent it to both configs.
|
# Format the `files` file in the correct syntax and sent it to both configs.
|
||||||
|
@ -34,7 +30,4 @@ eval "echo \"$(cat "$bmfiles")\"" | \
|
||||||
awk "!/^\s*#/ && !/^\s*\$/ {gsub(\"\\\s*#.*$\",\"\");
|
awk "!/^\s*#/ && !/^\s*\$/ {gsub(\"\\\s*#.*$\",\"\");
|
||||||
printf(\"%s=\42\$EDITOR %s\42 \\\\\n\",\$1,\$2) >> \"$shell_shortcuts\" ;
|
printf(\"%s=\42\$EDITOR %s\42 \\\\\n\",\$1,\$2) >> \"$shell_shortcuts\" ;
|
||||||
printf(\"hash -d %s=%s \n\",\$1,\$2) >> \"$zsh_named_dirs\" ;
|
printf(\"hash -d %s=%s \n\",\$1,\$2) >> \"$zsh_named_dirs\" ;
|
||||||
printf(\"abbr %s \42\$EDITOR %s\42 \n\",\$1,\$2) >> \"$fish_shortcuts\" ;
|
|
||||||
printf(\"map %s :e %s<CR> \n\",\$1,\$2) >> \"$vifm_shortcuts\" ;
|
|
||||||
printf(\"map %s shell \$EDITOR %s \n\",\$1,\$2) >> \"$ranger_shortcuts\" ;
|
|
||||||
printf(\"map E%s \$\$EDITOR \42%s\42 \n\",\$1,\$2) >> \"$lf_shortcuts\" }"
|
printf(\"map E%s \$\$EDITOR \42%s\42 \n\",\$1,\$2) >> \"$lf_shortcuts\" }"
|
||||||
|
|
Loading…
Add table
Reference in a new issue