summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaumit Dinesan <justsaumit@protonmail.com>2023-09-02 22:23:45 +0530
committerSaumit Dinesan <justsaumit@protonmail.com>2023-09-02 22:23:45 +0530
commit45682d84556785c5e15d158b44de817cb5b3d905 (patch)
tree0b511502fdeefa263bbea3aa32e0fdfc73ec7732
parent54ab7eaca3a11265ad11afe4f99fb01dc1d371ac (diff)
.config: Updating aliasrc + shortcutrc
-rw-r--r--.config/shell/aliasrc29
-rw-r--r--.config/shell/shortcutrc16
2 files changed, 28 insertions, 17 deletions
diff --git a/.config/shell/aliasrc b/.config/shell/aliasrc
index d14edf1..af6db49 100644
--- a/.config/shell/aliasrc
+++ b/.config/shell/aliasrc
@@ -3,13 +3,14 @@
# Use neovim for vim if present.
[ -x "$(command -v nvim)" ] && alias vim="nvim" vimdiff="nvim -d"
-# use x-clip if X11 and wl-copy if Wayland as clipboard
+# use x-clip if X11 and wl-copy if Wayland, as clipboard
[ "$XDG_SESSION_TYPE" = "x11" ] && CLIP="xclip -sel c" || [ "$XDG_SESSION_TYPE" = "wayland" ] && CLIP="wl-copy"
# auto add sudo in front of commands
-for command in mount umount pacman updatedb su ; do
+for command in mount umount pacman updatedb su; do
alias $command="sudo $command"
-done; unset command
+done
+unset command
##aliases
@@ -28,10 +29,11 @@ alias \
ncmpcpp='ncmpcpp -b .config/ncmpcpp/keybindings' \
jds='export _JAVA_AWT_WM_NONREPARENTING=1' \
jd='jdownloader' \
- yt='ytfzf -t' \
+ yt='ytfzf -lts' \
ytq='ytfzf -faH' \
leaf='notepadqq' \
qb='qbittorrent' \
+ jn='jupyter-notebook' \
polkit='/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1'
#git
@@ -42,12 +44,12 @@ alias \
#cut -d\ -f4
alias \
g1='git add "$(git status -s | fzf | cut -b 1-3 --complement)"' \
- gr='git restore --staged "$(git status -s | fzf | cut -b 1-3 --complement)"' \
+ gr='git restore --staged "$(git status -s | fzf | cut -b 1-3 --complement)"' \
g2='git commit -S -m' \
g3='git push "$(git remote show | fzf)" HEAD' \
gs='git status' \
gd='git diff --staged' \
- gu='git remote update && git status -uno' \
+ gu='git remote update && git status -uno' \
glg="git log --graph --abbrev-commit --decorate --format=format:'%C(bold green)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold yellow)(%ar)%C(reset)%C(auto)%d%C(reset)%n''%C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all"
#useful command line substitutions
@@ -66,8 +68,9 @@ alias \
ranger='ranger --choosedir=$HOME/.rangerdir; LASTDIR=`cat $HOME/.rangerdir`; cd "$LASTDIR"' \
recentpacks="grep -i installed /var/log/pacman.log |tac| fzf | cut -d' ' -f4 | "$CLIP" " \
scr='ffmpeg -f x11grab -i :0.0 out.mp4' \
- ss="maim -D -u --select | tee "~/pix/Screenshots/pic-sel-$(date '+%y-%m-%d--%H-%M-%S').png" | "$CLIP" " \
- pas='pulseaudio --start' \
+ ss="maim -D -u --select | tee "~/pix/Screenshots/pic-sel-$(date '+%y-%m-%d--%H-%M-%S').png" | "$CLIP" "
+
+pas='pulseaudio --start' \
pak='pulseaudio --kill' \
pm='pulsemixer' \
ssha="echo 'ssh-keygen -t ed25519 -a 100 -f ~/.ssh/<Identityfile> -C <comment>'" \
@@ -78,12 +81,12 @@ alias \
dwm='cd ~/.local/src/dwm' \
dwmblocks='cd ~/.local/src/dwmblocks' \
calc='quich' \
- wlc='wl-copy' \
- wlk='wl-copy' \
- pw='pomodoro work' \
- pb='pomodoro break' \
+ wlc='wl-copy' \
+ wlk='wl-copy' \
+ pw='pomodoro work' \
+ pb='pomodoro break' \
rm='trash -v' \
listdel='trash-list' \
restore='trash-restore' \
empty='trash-empty' \
- q='exit'
+ q='exit'
diff --git a/.config/shell/shortcutrc b/.config/shell/shortcutrc
index 96790d0..9482a24 100644
--- a/.config/shell/shortcutrc
+++ b/.config/shell/shortcutrc
@@ -1,7 +1,15 @@
#!/bin/sh
alias \
- cb='cd ~/codebase' \
- dl='cd ~/dl' \
- px='cd ~/pix' \
- src='cd ~/.local/src/'
+ cf='cd ~/.config/' \
+ cfg='cd ~/.config/' \
+ nvc='cd ~/.config/nvim' \
+ src='cd ~/.local/src/' \
+ cb='cd ~/codebase/' \
+ dl='cd ~/Downloads' \
+ px='cd ~/pix' \
+ brc='nvim ~/.bashrc && source ~/.bashrc' \
+ zrc='nvim ~/.zshrc && exec zsh' \
+ nbu='nvim ~/.config/newsboat/urls' \
+ nbc='nvim ~/.config/newsboat/config' \
+ tt='img2sixel ~/TT.png'