]> git.armaanb.net Git - config.org.git/blobdiff - config.org
inputrc: switch to Emacs editing mode
[config.org.git] / config.org
index cddf865ac48040049962d6aa6d7ab2eee1560f55..02b3696b454ffa1f8f7a8161333c59c4c921bcb5 100644 (file)
@@ -50,10 +50,8 @@ Its fine to set this here because I run Emacs in daemon mode, but if I were not,
 #+begin_src emacs-lisp
   (setq modus-themes-slanted-constructs t
         modus-themes-bold-constructs t
-        modus-themes-org-blocks 'grayscale
         modus-themes-mode-line '3d
         modus-themes-scale-headings t
-        modus-themes-region 'no-extend
         modus-themes-diffs 'desaturated)
   (load-theme 'modus-vivendi t)
 #+end_src
@@ -263,7 +261,7 @@ Add back C-a/C-x
     ;; TODO: There's gotta be a more efficient way to write this
     (add-to-list 'org-structure-template-alist '("el" . "src emacs-lisp"))
     (add-to-list 'org-structure-template-alist '("sp" . "src conf :tangle ~/.spectrwm.conf"))
-    (add-to-list 'org-structure-template-alist '("zsh" . "src shell :tangle ~/.config/zsh/zshrc"))
+    (add-to-list 'org-structure-template-alist '("ash" . "src shell :tangle ~/.config/ash/ashrc"))
     (add-to-list 'org-structure-template-alist '("al" . "src yml :tangle ~/.config/alacritty/alacritty.yml"))
     (add-to-list 'org-structure-template-alist '("ipy" . "src python :tangle ~/.ipython/"))
     (add-to-list 'org-structure-template-alist '("pi" . "src conf :tangle ~/.config/picom/picom.conf"))
@@ -748,66 +746,14 @@ No more clogging up init.el.
   quirk[Castle Menu] = FLOAT
   quirk[momen] = FLOAT
 #+end_src
-** Zsh
-*** Settings
-**** Completions
-#+begin_src shell :tangle ~/.config/zsh/zshrc
-  autoload -Uz compinit
-  compinit
-
-  setopt no_case_glob
-  unsetopt glob_complete
-#+end_src
-**** Vim bindings
-#+begin_src shell :tangle ~/.config/zsh/zshrc
-  bindkey -v
-  KEYTIMEOUT=1
-
-  bindkey -M vicmd "^[[3~" delete-char
-  bindkey "^[[3~" delete-char
-
-  autoload edit-command-line
-  zle -N edit-command-line
-  bindkey -M vicmd ^e edit-command-line
-  bindkey ^e edit-command-line
-#+end_src
-**** History
-#+begin_src shell :tangle ~/.config/zsh/zshrc
-  setopt extended_history
-  setopt share_history
-  setopt inc_append_history
-  setopt hist_ignore_dups
-  setopt hist_reduce_blanks
-
-  HISTSIZE=100000
-  SAVEHIST=100000
-  HISTFILE=~/.local/share/zsh/history
-#+end_src
-*** Plugins
-I manage plugins using my own plugin manager, ZPE. https://git.sr.ht/~armaan/zpe
-
-Right now, I'm only using fast-syntax-highlighting. It's a really nice visual addition.
-**** ZPE
-#+begin_src conf :tangle ~/.config/zpe/repositories
-  https://github.com/zdharma/fast-syntax-highlighting
-#+end_src
-**** Zshrc
-#+begin_src shell :tangle ~/.config/zsh/zshrc
-  source ~/Code/zpe/zpe.sh
-  source ~/Code/admone/admone.zsh
-  source ~/.config/zsh/fzf-bindings.zsh
-
-  zpe-source fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh
+** Ash
+*** Options
+#+begin_src conf :tangle ~/.config/ash/ashrc
+  set -o vi
 #+end_src
 *** Functions
-**** Time Zsh startup
-#+begin_src shell :tangle ~/.config/zsh/zshrc
-  timer() {
-      for i in $(seq 1 10); do time "$1" -i -c exit; done
-  }
-#+end_src
 **** Update all packages
-#+begin_src shell :tangle ~/.config/zsh/zshrc
+#+begin_src shell :tangle ~/.config/ash/ashrc
   color=$(tput setaf 5)
   reset=$(tput sgr0)
 
@@ -832,7 +778,7 @@ Right now, I'm only using fast-syntax-highlighting. It's a really nice visual ad
   }
 #+end_src
 **** Clean all packages
-#+begin_src shell :tangle ~/.config/zsh/zshrc
+#+begin_src shell :tangle ~/.config/ash/ashrc
   apap() {
       sudo echo "${color}== cleaning pacman orphans ==${reset}"
       (pacman -Qtdq | sudo pacman -Rns - 2> /dev/null) || echo "No orphans"
@@ -850,33 +796,17 @@ Right now, I'm only using fast-syntax-highlighting. It's a really nice visual ad
       echo "${color}All orphans cleaned!${reset}"
   }
 #+end_src
-**** Setup anaconda
-#+begin_src shell :tangle ~/.config/zsh/zshrc
-  zconda() {
-      __conda_setup="$('/opt/anaconda/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
-      if [ $? -eq 0 ]; then
-          eval "$__conda_setup"
-      else
-          if [ -f "/opt/anaconda/etc/profile.d/conda.sh" ]; then
-              . "/opt/anaconda/etc/profile.d/conda.sh"
-          else
-              export PATH="/opt/anaconda/bin:$PATH"
-          fi
-      fi
-      unset __conda_setup
-  }
-#+end_src
 **** Interact with 0x0
-#+begin_src shell :tangle ~/.config/zsh/zshrc
+#+begin_src shell :tangle ~/.config/ash/ashrc
   zxz="https://envs.sh"
-  0file() { curl -F"file=@$1" "$zxz" ; }
-  0pb() { curl -F"file=@-;" "$zxz" ; }
-  0url() { curl -F"url=$1" "$zxz" ; }
-  0short() { curl -F"shorten=$1" "$zxz" ; }
-  0clip() { xclip -out | curl -F"file=@-;" "$zxz" ; }
+  ufile() { curl -F"file=@$1" "$zxz" ; }
+  upb() { curl -F"file=@-;" "$zxz" ; }
+  uurl() { curl -F"url=$1" "$zxz" ; }
+  ushort() { curl -F"shorten=$1" "$zxz" ; }
+  uclip() { xclip -out | curl -F"file=@-;" "$zxz" ; }
 #+end_src
 **** Finger
-#+begin_src shell :tangle ~/.config/zsh/zshrc
+#+begin_src shell :tangle ~/.config/ash/ashrc
   finger() {
       user=$(echo "$1" | cut -f 1 -d '@')
       host=$(echo "$1" | cut -f 2 -d '@')
@@ -884,7 +814,7 @@ Right now, I'm only using fast-syntax-highlighting. It's a really nice visual ad
   }
 #+end_src
 **** Upload to ftp.armaanb.net
-#+begin_src shell :tangle ~/.config/zsh/zshrc
+#+begin_src shell :tangle ~/.config/ash/ashrc
   pubup() {
       rsync "$1" "root@armaanb.net:/var/ftp/pub/${2}"
       echo "https://ftp.armaanb.net/pub/"$(basename "$1") | tee /dev/tty | xclip -sel c
@@ -892,28 +822,26 @@ Right now, I'm only using fast-syntax-highlighting. It's a really nice visual ad
 #+end_src
 *** Aliases
 **** SSH
-#+begin_src shell :tangle ~/.config/zsh/zshrc
+#+begin_src shell :tangle ~/.config/ash/ashrc
   alias bhoji-drop='ssh -p 23 root@armaanb.net'
-  alias catgirl='ssh root@armaanb.net -t abduco -A irc catgirl freenode'
+  alias irc='ssh root@armaanb.net -t abduco -A irc catgirl freenode'
   alias union='ssh 192.168.1.18'
   alias mine='ssh -p 23 root@pickupserver.cc'
   alias tcf='ssh root@204.48.23.68'
   alias ngmun='ssh root@157.245.89.25'
   alias prox='ssh root@192.168.1.224'
   alias ncq='ssh root@143.198.123.17'
-  alias dock='ssh root@192.168.1.225'
-  alias jenkins='ssh root@192.168.1.226'
   alias envs='ssh acheam@envs.net'
 #+end_src
 **** File management
-#+begin_src shell :tangle ~/.config/zsh/zshrc
+#+begin_src shell :tangle ~/.config/ash/ashrc
   alias ls='exa -lh --icons --git --group-directories-first'
   alias la='exa -lha --icons --git --group-directories-first'
   alias df='df -h / /boot'
   alias du='du -h'
   alias free='free -h'
   alias cp='cp -riv'
-  alias rm='rm -Iv'
+  alias rm='rm -iv'
   alias mv='mv -iv'
   alias ln='ln -iv'
   alias grep='grep -in --exclude-dir=.git --color=auto'
@@ -922,15 +850,10 @@ Right now, I'm only using fast-syntax-highlighting. It's a really nice visual ad
   alias unar='atool -x'
   alias wget='wget -e robots=off'
   alias lanex='~/.local/share/lxc/lxc'
-#+end_src
-**** Editing
-#+begin_src shell :tangle ~/.config/zsh/zshrc
-  alias v='nvim'
   alias vim='nvim'
-  alias vw="nvim ~/Documents/vimwiki/index.md"
 #+end_src
 **** System management
-#+begin_src shell :tangle ~/.config/zsh/zshrc
+#+begin_src shell :tangle ~/.config/ash/ashrc
   alias jctl='journalctl -p 3 -xb'
   alias pkill='pkill -i'
   alias cx='chmod +x'
@@ -942,25 +865,25 @@ Right now, I'm only using fast-syntax-highlighting. It's a really nice visual ad
     yadm push'
 #+end_src
 **** Networking
-#+begin_src shell :tangle ~/.config/zsh/zshrc
-    alias ping='ping -c 10'
-    alias speed='speedtest-cli'
-    alias ip='ip --color=auto'
-    alias cip='curl https://armaanb.net/ip'
-    alias gps='gpg --keyserver keyserver.ubuntu.com --search-keys'
-    alias gpp='gpg --keyserver keyserver.ubuntu.com --recv-key'
-    alias plan='T=$(mktemp) && \
-          rsync root@armaanb.net:/etc/finger/plan.txt "$T" && \
-          TT=$(mktemp) && \
-          head -n -2 $T > $TT && \
-          vim $TT && \
-          echo "\nLast updated: $(date -R)" >> "$TT" && \
-          fold -sw 72 "$TT" > "$T"| \
-          rsync "$T" root@armaanb.net:/etc/finger/plan.txt'
-    alias wttr='curl -s "wttr.in/02445?n" | head -n -3'
+#+begin_src shell :tangle ~/.config/ash/ashrc
+  alias ping='ping -c 10'
+  alias speed='speedtest-cli'
+  alias ip='ip --color=auto'
+  alias cip='curl https://armaanb.net/ip'
+  alias gps='gpg --keyserver keyserver.ubuntu.com --search-keys'
+  alias gpp='gpg --keyserver keyserver.ubuntu.com --recv-key'
+  alias plan='T=$(mktemp) && \
+        rsync root@armaanb.net:/etc/finger/plan.txt "$T" && \
+        TT=$(mktemp) && \
+        head -n -2 $T > $TT && \
+        vim $TT && \
+        echo "\nLast updated: $(date -R)" >> "$TT" && \
+        fold -sw 72 "$TT" > "$T"| \
+        rsync "$T" root@armaanb.net:/etc/finger/plan.txt'
+  alias wttr='curl -s "wttr.in/02445?n" | head -n -3'
 #+end_src
 **** Other
-#+begin_src shell :tangle ~/.config/zsh/zshrc
+#+begin_src shell :tangle ~/.config/ash/ashrc
   alias bigrandomfile='dd if=/dev/urandom of=1GB-urandom bs=1M count=1024 \
     iflag=fullblock status=progress'
   alias bigboringfile='dd if=/dev/zero of=1GB-zero bs=1M count=1024 \
@@ -976,7 +899,7 @@ Right now, I'm only using fast-syntax-highlighting. It's a really nice visual ad
   alias bc='bc -l'
 #+end_src
 **** Virtual machines, chroots
-#+begin_src shell :tangle ~/.config/zsh/zshrc
+#+begin_src shell :tangle ~/.config/ash/ashrc
   alias ckiss="sudo chrooter ~/Virtual/kiss"
   alias cdebian="sudo chrooter ~/Virtual/debian bash"
   alias cwindows='devour qemu-system-x86_64 \
@@ -992,7 +915,7 @@ Right now, I'm only using fast-syntax-highlighting. It's a really nice visual ad
     -drive format=qcow2,file=/home/armaa/Virtual/windows.qcow2'
 #+end_src
 **** Python
-#+begin_src shell :tangle ~/.config/zsh/zshrc
+#+begin_src shell :tangle ~/.config/ash/ashrc
   alias ipy="ipython"
   alias zpy="zconda && ipython"
   alias math="ipython --profile=math"
@@ -1001,12 +924,12 @@ Right now, I'm only using fast-syntax-highlighting. It's a really nice visual ad
   alias black="black -l 79"
 #+end_src
 **** Latin
-#+begin_src shell :tangle ~/.config/zsh/zshrc
+#+begin_src shell :tangle ~/.config/ash/ashrc
   alias words='gen-shell -c "words"'
   alias words-e='gen-shell -c "words ~E"'
 #+end_src
 **** Devour
-#+begin_src shell :tangle ~/.config/zsh/zshrc
+#+begin_src shell :tangle ~/.config/ash/ashrc
   alias zathura='devour zathura'
   alias mpv='devour mpv'
   alias sql='devour sqlitebrowser'
@@ -1014,7 +937,7 @@ Right now, I'm only using fast-syntax-highlighting. It's a really nice visual ad
   alias feh='devour feh'
 #+end_src
 **** Package management (Pacman)
-#+begin_src shell :tangle ~/.config/zsh/zshrc
+#+begin_src shell :tangle ~/.config/ash/ashrc
   alias aps='yay -Ss'
   alias api='yay -Syu'
   alias apii='sudo pacman -S'
@@ -1028,12 +951,12 @@ Right now, I'm only using fast-syntax-highlighting. It's a really nice visual ad
      ~/.local/etc/pacman.d/mirrorlist --download-timeout 60' # Takes ~45m to run
 #+end_src
 **** Package management (KISS)
-#+begin_src shell :tangle ~/.config/zsh/zshrc
+#+begin_src shell :tangle ~/.config/ash/ashrc
   alias kzf="kiss s \* | xargs -l basename | \
     fzf --preview 'kiss search {} | xargs -l dirname'"
 #+end_src
 *** Exports
-#+begin_src shell :tangle ~/.config/zsh/zshrc
+#+begin_src shell :tangle ~/.config/ash/ashrc
   export EDITOR="emacsclient -c"
   export VISUAL="$EDITOR"
   export TERM=xterm-256color # for compatability
@@ -1169,7 +1092,7 @@ Make MPV play a little bit smoother.
 ** Inputrc
 For any GNU Readline programs
 #+begin_src conf :tangle ~/.inputrc
-  set editing-mode vi
+  set editing-mode emacs
 #+end_src
 ** Git
 *** User
@@ -1212,10 +1135,10 @@ For any GNU Readline programs
   a = add
   aa = add .
   c = commit
+  quickfix = commit . --amend --no-edit
   p = push
   subup = submodule update --remote
   loc = diff --stat 4b825dc642cb6eb9a060e54bf8d69288fbee4904 # Empty hash
-  mirror = git config --global alias.mirrormirror
   pushnc = push -o skip-ci
 #+end_src
 *** Commits
@@ -1395,10 +1318,10 @@ Modus operandi.
 *** Copy paste
 #+begin_src conf :tangle ~/.Xresources
   xterm*VT100.Translations: #override \
-    Shift <KeyPress> Insert: insert-selection(CLIPBOARD) \n\
-    Ctrl Shift <Key>V:    insert-selection(CLIPBOARD) \n\
-    Ctrl Shift <Key>C:    copy-selection(CLIPBOARD) \n\
-    Ctrl <Btn1Up>: exec-formatted("xdg-open '%t'", PRIMARY)
+  Shift <KeyPress> Insert: insert-selection(CLIPBOARD) \n\
+  Ctrl Shift <Key>V:    insert-selection(CLIPBOARD) \n\
+  Ctrl Shift <Key>C:    copy-selection(CLIPBOARD) \n\
+  Ctrl <Btn1Up>: exec-formatted("xdg-open '%t'", PRIMARY)
 #+end_src
 *** Blink cursor
 #+begin_src conf :tangle ~/.Xresources