]> git.armaanb.net Git - config.org.git/blobdiff - config.org
Eliminate rofi
[config.org.git] / config.org
index 63ca6ff178b99b4fded0502109678d60feb8f6cc..9be0949d112615e203b638323643a247dc7464ad 100644 (file)
@@ -297,8 +297,10 @@ Add back C-a/C-x
     (add-to-list 'org-structure-template-alist '("pi" . "src conf :tangle ~/.config/picom/picom.conf"))
     (add-to-list 'org-structure-template-alist '("git" . "src conf :tangle ~/.gitconfig"))
     (add-to-list 'org-structure-template-alist '("du" . "src conf :tangle ~/.config/dunst/dunstrc"))
-    (add-to-list 'org-structure-template-alist '("ro" . "src javascript :tangle ~/.config/rofi/config.rasi"))
-    (add-to-list 'org-structure-template-alist '("za" . "src conf :tangle ~/.config/zathura/zathurarc")))
+    (add-to-list 'org-structure-template-alist '("za" . "src conf :tangle ~/.config/zathura/zathurarc"))
+    (add-to-list 'org-structure-template-alist '("ff1" . "src css :tangle ~/.mozilla/firefox/armaan-release/chrome/userChrome.css"))
+    (add-to-list 'org-structure-template-alist '("ff2" . "src css :tangle ~/.mozilla/firefox/armaan-release/chrome/userContent.css"))
+    (add-to-list 'org-structure-template-alist '("xr" . "src conf :tangle ~/.Xresources")))
 #+end_src
 ** Presentations
 #+begin_src emacs-lisp
@@ -376,6 +378,7 @@ Contexts are a not very well known feature of mu4e that makes it super easy to m
     :straight (:type built-in))
   (use-package mu4e
     :load-path "/usr/share/emacs/site-lisp/mu4e"
+    :straight (:build nil)
     :bind (("C-c m" . mu4e))
     :config
     (setq user-full-name "Armaan Bhojwani"
@@ -428,39 +431,6 @@ Contexts are a not very well known feature of mu4e that makes it super easy to m
     :hook ((mu4e-compose-mode . flyspell-mode)
            (mu4e-view-mode-hook . turn-on-visual-line-mode)))
 #+end_src
-** Calendar
-#+begin_src emacs-lisp
-  (use-package calfw)
-  (use-package calfw-org)
-  (use-package calfw-ical)
-
-  (defun acheam-calendar ()
-    "Open a calendar."
-    (interactive)
-    (shell-command "vdirsyncer sync")
-    (let ((default-directory "~/.local/share/vdirsyncer/"))
-      (cfw:open-calendar-buffer
-       :contents-sources
-       (list
-        (cfw:ical-create-source "School" (expand-file-name "school/abhojwani22@nobles.edu.ics") "Green")
-        (cfw:ical-create-source "Personal" (expand-file-name "mailbox/Y2FsOi8vMC8zMQ.ics") "Blue")
-        (cfw:ical-create-source "Birthdays" (expand-file-name "mailbox/Y2FsOi8vMS8w.ics") "Gray")
-        ))))
-#+end_src
-** IRC
-Another file has more specific network configuration.
-#+begin_src emacs-lisp
-  (use-package circe
-    :config (load-file "~/.emacs.d/irc.el"))
-
-  (use-package circe-chanop
-    :straight (:type built-in)
-    :after circe)
-
-  (use-package circe-color-nicks
-    :straight (:type built-in)
-    :after circe)
-#+end_src
 ** Default browser
 Set EWW as default browser except for videos.
 #+begin_src emacs-lisp
@@ -471,6 +441,9 @@ Set EWW as default browser except for videos.
   (setq browse-url-handlers
         (quote
          (("youtu\\.?be" . browse-url-mpv)
+          ("peertube.*" . browse-url-mpv)
+          ("vid.*" . browse-url-mpv)
+          ("vid.*" . browse-url-mpv)
           ("." . eww-browse-url)
           )))
 #+end_src
@@ -512,21 +485,25 @@ Some EWW enhancements.
 
   (global-set-key (kbd "C-c w") 'prot-eww-browse-dwim)
 #+end_src
+** IRC
+#+begin_src emacs-lisp
+  (use-package erc
+    :straight (:type built-in)
+    :config
+    (load "~/.emacs.d/irc.el")
+    (acheam-irc)
+    (erc-notifications-enable)
+    (erc-smiley-disable))
+
+  (use-package erc-hl-nicks
+    :config (erc-hl-nicks-mode 1))
+#+end_src
 ** Emacs Anywhere
 Use Emacs globally. Use the Emacs daemon and bind a key in your wm to
 =emacsclient --eval "(emacs-everywhere)"=.
 #+begin_src emacs-lisp
   (use-package emacs-everywhere)
 #+end_src
-** Eshell
-#+begin_src emacs-lisp
-  (setq eshell-prompt-function
-        (lambda nil
-          (propertize (concat
-                       "\n" (eshell/pwd) " ➤ ")
-                      'face '(:foreground "cyan")))
-        eshell-highlight-prompt nil)
-#+end_src
 * Emacs IDE
 ** Code cleanup
 #+begin_src emacs-lisp
@@ -778,15 +755,8 @@ No more clogging up init.el.
   workspace_limit = 5
   warp_pointer = 1
   modkey = Mod4
-  border_width = 4
   autorun = ws[1]:/home/armaa/Code/scripts/autostart
 #+end_src
-*** Appearance
-#+begin_src conf :tangle ~/.spectrwm.conf
-  color_focus = rgb:ff/ff/ff
-  color_focus_maximized = rgb:ee/cc/00
-  color_unfocus = rgb:55/55/55
-#+end_src
 *** Bar
 #+begin_src conf :tangle ~/.spectrwm.conf
   bar_enabled = 0
@@ -795,15 +765,11 @@ No more clogging up init.el.
 *** Keybindings
 **** WM actions
 #+begin_src conf :tangle ~/.spectrwm.conf
-  program[lock] = i3lock -c 000000 -ef
   program[term] = alacritty
   program[screenshot_all] = flameshot gui
-  program[menu] = rofi -show run # `rofi-dmenu` handles the rest
-  program[switcher] = rofi -show window
   program[notif] = /home/armaa/Code/scripts/setter status
 
   bind[notif] = MOD+n
-  bind[switcher] = MOD+Tab
 #+end_src
 **** Media keys
 #+begin_src conf :tangle ~/.spectrwm.conf
@@ -843,12 +809,14 @@ No more clogging up init.el.
   program[catgirl] = alacritty --hold -e sh -c "while : ; do ssh root@armaanb.net -t abduco -A irc catgirl freenode; sleep 2; done"
   program[emacs] = emacsclient -c
   program[firefox] = firefox
+  program[calc] = alacritty -e bc
   program[emacs-anywhere] = emacsclient --eval "(emacs-everywhere)"
 
   bind[aerc] = MOD+Control+1
   bind[catgirl] = MOD+Control+2
   bind[firefox] = MOD+Control+3
   bind[emacs-anywhere] = MOD+Control+4
+  bind[calc] = MOD+Control+5
   bind[emacs] = MOD+Control+Return
 #+end_src
 ** Zsh
@@ -860,6 +828,16 @@ No more clogging up init.el.
 
   setopt no_case_glob
   unsetopt glob_complete
+
+  # Fragment completions
+  zstyle ':completion:*' list-suffixes
zstyle ':completion:*' expand prefix suffix
+
+  # Menu completions
+  zstyle ':completion:*' menu select
+  zmodload zsh/complist
+  bindkey -M menuselect '^n' expand-or-complete
+  bindkey -M menuselect '^p' reverse-menu-complete
+
 #+end_src
 **** Vim bindings
 #+begin_src shell :tangle ~/.config/zsh/zshrc
@@ -888,11 +866,11 @@ No more clogging up init.el.
 #+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/Aloxaf/fzf-tab
-    https://github.com/zdharma/fast-syntax-highlighting
-    https://github.com/rupa/z
+  https://github.com/zdharma/fast-syntax-highlighting
 #+end_src
 **** Zshrc
 #+begin_src shell :tangle ~/.config/zsh/zshrc
@@ -900,31 +878,13 @@ I manage plugins using my own plugin manager, ZPE. https://git.sr.ht/~armaan/zpe
   source ~/Code/admone/admone.zsh
   source ~/.config/zsh/fzf-bindings.zsh
 
-  zpe-source fzf-tab/fzf-tab.zsh
-  zstyle ':completion:*:descriptions' format '[%d]'
-  zstyle ':fzf-tab:complete:cd:*' fzf-preview 'exa -1 --color=always $realpath'
-  zstyle ':completion:*' completer _complete
-  zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' \
-         'm:{a-zA-Z}={A-Za-z} l:|=* r:|=*'
-  enable-fzf-tab
   zpe-source fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh
-  export _Z_DATA="/home/armaa/.local/share/z"
-  zpe-source z/z.sh
 #+end_src
 *** Functions
-**** Alert after long command
-#+begin_src shell :tangle ~/.config/zsh/zshrc
-  alert() {
-      notify-send --urgency=low -i ${(%):-%(?.terminal.error)} \
-                  ${history[$HISTCMD]%[;&|][[:space:]]##alert}
-  }
-#+end_src
 **** Time Zsh startup
 #+begin_src shell :tangle ~/.config/zsh/zshrc
-  timezsh() {
-      for i in $(seq 1 10); do
-          time "zsh" -i -c exit;
-      done
+  timer() {
+      for i in $(seq 1 10); do time "$1" -i -c exit; done
   }
 #+end_src
 **** Update all packages
@@ -971,27 +931,6 @@ I manage plugins using my own plugin manager, ZPE. https://git.sr.ht/~armaan/zpe
       echo "${color}All orphans cleaned!${reset}"
   }
 #+end_src
-**** ls every cd
-#+begin_src shell :tangle ~/.config/zsh/zshrc
-  chpwd() {
-      emulate -L zsh
-      exa -lh --icons --git --group-directories-first
-  }
-#+end_src
-**** Change default enter behavior
-If no command given, =ls=, if in a Git repo, =git status= as well.
-#+begin_src shell :tangle ~/.config/zsh/zshrc
-  acheam-accept-line () {
-      zle accept-line
-      if [ ${#${(z)BUFFER}} -eq 0 ]; then
-          echo
-          exa -lh --icons --git --group-directories-first
-          [ -d ".git" ] && git status
-      fi
-  }
-  zle -N acheam-accept-line
-  bindkey '^M' acheam-accept-line
-#+end_src
 **** Setup anaconda
 #+begin_src shell :tangle ~/.config/zsh/zshrc
   zconda() {
@@ -1017,14 +956,6 @@ If no command given, =ls=, if in a Git repo, =git status= as well.
   0short() { curl -F"shorten=$1" "$zxz" ; }
   0clip() { xclip -out | curl -F"file=@-;" "$zxz" ; }
 #+end_src
-**** Swap two files
-#+begin_src shell :tangle ~/.config/zsh/zshrc
-  sw() {
-      mv $1 $1.tmp
-      mv $2 $1
-      mv $1.tmp $2
-  }
-#+end_src
 **** Finger
 #+begin_src shell :tangle ~/.config/zsh/zshrc
   finger() {
@@ -1033,12 +964,20 @@ If no command given, =ls=, if in a Git repo, =git status= as well.
       echo $user | nc "$host" 79 -N
   }
 #+end_src
+**** Upload to ftp.armaanb.net
+#+begin_src shell :tangle ~/.config/zsh/zshrc
+  pubup() {
+      rsync "$1" "root@armaanb.net:/var/ftp/pub/${2}"
+      echo "https://ftp.armaanb.net/pub/"$(basename "$1") | tee /dev/tty | xclip -sel c
+  }
+#+end_src
 *** Aliases
 **** SSH
 #+begin_src shell :tangle ~/.config/zsh/zshrc
   alias bhoji-drop='ssh -p 23 root@armaanb.net'
   alias catgirl='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'
@@ -1065,13 +1004,6 @@ If no command given, =ls=, if in a Git repo, =git status= as well.
   alias wget='wget -e robots=off'
   alias lanex='~/.local/share/lxc/lxc'
 #+end_src
-**** Dotfiles
-#+begin_src shell :tangle ~/.config/zsh/zshrc
-  alias padm='yadm --yadm-repo ~/Code/dotfiles/repo.git'
-  alias yadu='yadm add -u && yadm commit -m "Updated `date -Iseconds`" && \
-    yadm push'
-  alias padu='padm add -u && padm commit && padm push && yadu'
-#+end_src
 **** Editing
 #+begin_src shell :tangle ~/.config/zsh/zshrc
   alias v='nvim'
@@ -1086,6 +1018,10 @@ If no command given, =ls=, if in a Git repo, =git status= as well.
   alias redoas='doas $(fc -ln -1)'
   alias crontab='crontab-argh'
   alias sudo='doas ' # allows aliases to be run with doas
+  alias pasc='pass -c'
+  alias pasu='\pass git push'
+  alias yadu='yadm add -u && yadm commit -m "Updated `date -Iseconds`" && \
+    yadm push'
 #+end_src
 **** Networking
 #+begin_src shell :tangle ~/.config/zsh/zshrc
@@ -1097,8 +1033,11 @@ If no command given, =ls=, if in a Git repo, =git status= as well.
   alias gpp='gpg --keyserver keyserver.ubuntu.com --recv-key'
   alias plan='T=$(mktemp) && \
         rsync root@armaanb.net:/etc/finger/plan.txt "$T" && \
-        vim $T && \
-        rsync "$T" root@armaanb.net:/etc/finger/plan.txt'
+        TT=$(mktemp) && \
+        head -n -2 $T > $TT && \
+        vim $TT && \
+        echo "\nLast updated: $(date -R)" >> "$TT" && \
+        rsync "$TT" root@armaanb.net:/etc/finger/plan.txt'
   alias wttr='curl -s "wttr.in/02445?n" | head -n -3'
 #+end_src
 **** Other
@@ -1115,6 +1054,7 @@ If no command given, =ls=, if in a Git repo, =git status= as well.
   alias ytmusic="youtube-dl -x --add-metadata  --audio-format aac \
     --restrict-filenames -o '%(title)s.%(ext)s'"
   alias cal="cal -3 --color=auto"
+  alias bc='bc -l'
 #+end_src
 **** Virtual machines, chroots
 #+begin_src shell :tangle ~/.config/zsh/zshrc
@@ -1385,7 +1325,7 @@ Lightweight notification daemon.
   monitor = 0
   sticky_history = yes
   line_height = 0
-  separator_height = 4
+  separator_height = 1
   padding = 8
   horizontal_padding = 8
   max_icon_size = 32
@@ -1395,7 +1335,7 @@ Lightweight notification daemon.
 *** Modes
 #+begin_src conf :tangle ~/.config/dunst/dunstrc
   [frame]
-  width = 3
+  width = 1
   color = "#ffffff"
 
   [shortcuts]
@@ -1421,22 +1361,6 @@ Lightweight notification daemon.
   highlight = "#ffffff"
   timeout = 0
 #+end_src
-** Rofi
-Modus vivendi theme that extends DarkBlue.
-#+begin_src javascript :tangle ~/.config/rofi/config.rasi
-  @import "/usr/share/rofi/themes/DarkBlue.rasi"
-      ,* {
-          white:                        rgba ( 255, 255, 255, 100 % );
-          foreground:                   @white;
-          selected-normal-background:   @white;
-          separatorcolor:               @white;
-          background:                   rgba ( 34, 34, 34, 100 % );
-      }
-
-  window {
-      border: 3;
-  }
-#+end_src
 ** Zathura
 *** Options
 #+begin_src conf :tangle ~/.config/zathura/zathurarc
@@ -1460,3 +1384,116 @@ Modus vivendi theme that extends DarkBlue.
   set recolor-darkcolor  "#ffffff" # fg
   set recolor            "true"
 #+end_src
+** Firefox
+*** Swap tab and URL bars
+#+begin_src css :tangle ~/.mozilla/firefox/armaan-release/chrome/userChrome.css
+  #nav-bar {
+      -moz-box-ordinal-group: 1 !important;
+  }
+
+  #PersonalToolbar {
+      -moz-box-ordinal-group: 2 !important;
+  }
+
+  #titlebar {
+      -moz-box-ordinal-group: 3 !important;
+  }
+#+end_src
+*** Hide URL bar when not focused.
+#+begin_src css :tangle ~/.mozilla/firefox/armaan-release/chrome/userChrome.css
+  #navigator-toolbox:not(:focus-within):not(:hover) {
+      margin-top: -30px;
+  }
+
+  #navigator-toolbox {
+      transition: 0.1s margin-top ease-out;
+  }
+#+end_src
+** Black screen by default
+#+begin_src css :tangle ~/.mozilla/firefox/armaan-release/chrome/userChrome.css
+  #main-window,
+  #browser,
+  #browser vbox#appcontent tabbrowser,
+  #content,
+  #tabbrowser-tabpanels,
+  #tabbrowser-tabbox,
+  browser[type="content-primary"],
+  browser[type="content"] > html,
+  .browserContainer {
+      background: black !important;
+      color: #fff !important;
+  }
+#+end_src
+#+begin_src css :tangle ~/.mozilla/firefox/armaan-release/chrome/userContent.css
+  @-moz-document url("about:home"), url("about:blank"), url("about:newtab") {
+      body {
+          background: black !important;
+      }
+  }
+#+end_src
+** Xresources
+*** Font
+#+begin_src conf :tangle ~/.Xresources
+  xterm*font: JetBrains Mono NF:pixelsize=15
+
+  XTerm.vt100.translations: #override \n\
+    Ctrl <Key> minus: smaller-vt-font() \n\
+    Ctrl <Key> plus: larger-vt-font()
+#+end_src
+*** Color scheme
+Modus operandi.
+#+begin_src conf :tangle ~/.Xresources
+  ! special
+  ,*.foreground:   #ffffff
+  ,*.background:   #000000
+  ,*.cursorColor:  #ffffff
+
+  ! black
+  ,*.color0:       #000000
+  ,*.color8:       #555555
+
+  ! red
+  ,*.color1:       #ff8059
+  ,*.color9:       #ffa0a0
+
+  ! green
+  ,*.color2:       #00fc50
+  ,*.color10:      #88cf88
+
+  ! yellow
+  ,*.color3:       #eecc00
+  ,*.color11:      #d2b580
+
+  ! blue
+  ,*.color4:       #29aeff
+  ,*.color12:      #92baff
+
+  ! magenta
+  ,*.color5:       #feacd0
+  ,*.color13:      #e0b2d6
+
+  ! cyan
+  ,*.color6:       #00d3d0
+  ,*.color14:      #a0bfdf
+
+  ! white
+  ,*.color7:       #eeeeee
+  ,*.color15:      #dddddd
+#+end_src
+*** 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)
+#+end_src
+*** Blink cursor
+#+begin_src conf :tangle ~/.Xresources
+  xterm*cursorBlink: true
+#+end_src
+*** Alt keys
+#+begin_src conf :tangle ~/.Xresources
+  XTerm*eightBitInput:   false
+  XTerm*eightBitOutput:  true
+#+end_src