cfg icon indicating copy to clipboard operation
cfg copied to clipboard

Config files

#+TITLE: cfg #+AUTHOR: Abhinav Tushar

#+PROPERTY: header-args :exports both :results output

Config scripts and notes in literate style configuration using Org-Babel.

  • Basic packages

My current OS is manjaro. Need to setup yay first.

#+BEGIN_SRC bash uname -a #+END_SRC

#+RESULTS: : Linux euclid-red 4.19.147-1-MANJARO #1 SMP Wed Sep 23 18:00:56 UTC 2020 x86_64 GNU/Linux

#+BEGIN_SRC bash yay -S $(grep -vE "^\s*#" ./packages/arch | tr "\n" " ") #+END_SRC

Set ~fish~ as default shell #+BEGIN_SRC bash chsh -s $(which fish) #+END_SRC

  • Stow basics

#+BEGIN_SRC shell stow -t ~/ fish stow -t ~/ git stow -t ~/ scripts #+END_SRC

  • Window manager and related tools

Stow config files.

#+BEGIN_SRC shell stow -t ~/ stumpwm stow -t ~/ polybar stow -t ~/ dunst stow -t ~/ picom stow -t ~/ redshift stow -t ~/ rofi #+END_SRC

** Rofi Use theme set up from [[https://github.com/adi1090x/rofi][here]] and the following colors.

#+begin_src /* colors / , { al: #00000000; bg: #2E3440ff; se: #374C6Bff; fg: #D8DEE9cc; ac: #81A1C1ff; red: #434C5Eff; green: #475C6Bff; yellow: #8a9899ff; blue: #42A5F5ff; purple: #B48EADff; cyan: #4DD0E1ff; } #+end_src

** Stumpwm

Need two sbcl setups. The one from main repo is going to run stumpwm with swank. The following snip setups that. Needs quicklisp:

#+BEGIN_SRC shell sbcl --eval "(ql:quickload '(clx-truetype swank stumpwm cl-strings inferior-shell))" --quit mkdir -p ~/stumpwm #+END_SRC

Clone the repo and use make from there on #+BEGIN_SRC shell :dir ~/stumpwm/ git clone https://github.com/stumpwm/stumpwm

Should checkout to some version

git clone https://github.com/stumpwm/stumpwm-contrib ./contrib #+END_SRC

Here goes the xinitrc #+BEGIN_SRC shell :tangle ~/.xinitrc #!/bin/sh

xrandr --setprovideroutputsource modesetting NVIDIA-0 xrandr --auto exec stumpwm xset r rate 660 25 #+END_SRC

#+BEGIN_SRC shell chmod +x ~/.xinitrc #+END_SRC

I might also need to disable the default display manager. See [[https://askubuntu.com/a/882436][this]].

There might be a font loading issue which is fixed by ~(xft:cache-fonts)~.

** Grub Currently using the [[https://github.com/lfelipe1501/Atomic-GRUB2-Theme][Atomic]] theme.

#+BEGIN_SRC shell :dir /sudo::/tmp git clone https://github.com/lfelipe1501/Atomic-GRUB2-Theme.git cp -r Atomic-GRUB2-Theme/Atomic /usr/share/grub/themes #+END_SRC

Change grub theme line in ~/etc/default/grub~

#+BEGIN_SRC shell :dir /sudo:: update-grub #+END_SRC

** Desktop files and defaults

Desktop file for ~www~.

#+BEGIN_SRC ini :tangle ~/.local/share/applications/www.desktop [Desktop Entry] Encoding=UTF-8 Version=1.0 Type=Application NoDisplay=true Exec=/home/lepisma/bin/www Name=www Comment=Browser dispatch #+END_SRC

#+begin_src ini :tangle ~/.local/share/applications/compose-mail.desktop [Desktop Entry] Type=Application Name=Compose Mail Exec=/home/lepisma/bin/compose-mail %u StartupNotify=false MimeType=x-scheme-handler/mailto #+end_src

Setup default programs:

#+BEGIN_SRC shell xdg-mime default org.kde.dolphin.desktop inode/directory xdg-mime default feh.desktop image/jpeg xdg-mime default feh.desktop image/png xdg-mime default www.desktop x-scheme-handler/http xdg-mime default www.desktop x-scheme-handler/https xdg-mime default compose-mail.desktop x-scheme-handler/mailto xdg-mime default org.kde.okular.desktop application/pdf

handlr set .doc libreoffice-writer.desktop handlr set .docx libreoffice-writer.desktop #+END_SRC

** Fonts

*** Custom iosevka #+BEGIN_SRC shell :dir /sudo:: git clone [email protected]/lepisma/iosevka-lepisma /tmp/iosevka-lepisma mkdir /usr/share/fonts/iosevka/ mv /tmp/iosevka-lepisma/ttf/patched/*ttf /usr/share/fonts/iosevka/ #+END_SRC

Override medium fonts #+BEGIN_SRC shell :dir /sudo::/usr/share/fonts yes | cp iosevka/iosevka-lepisma-regular.ttf iosevka/iosevka-lepisma-medium.ttf yes | cp iosevka/iosevka-lepisma-italic.ttf iosevka/iosevka-lepisma-mediumitalic.ttf yes | cp iosevka/iosevka-lepisma-oblique.ttf iosevka/iosevka-lepisma-mediumoblique.ttf

fc-cache -f #+END_SRC

*** Et book #+BEGIN_SRC shell :dir /sudo:: git clone [email protected]:edwardtufte/et-book /tmp/et-book mkdir /usr/share/fonts/et-book/ mv /tmp/et-book/et-book//.ttf /usr/share/fonts/et-book/

fc-cache -f #+END_SRC

*** Other fonts to setup

  • All the icons

    Better install this using the Emacs package: #+BEGIN_SRC elisp (require 'all-the-icons) (all-the-icons-install-fonts) #+END_SRC

  • SauceCodePro Nerd font

  • Fira Code / Fira Sans. Also install Fira code symbol which is used for ligatures in Emacs.

  • Source Code / Source Sans

  • Konsole theming

#+BEGIN_SRC init :tangle ~/.local/share/konsole/lepisma.profile [Appearance] AntiAliasFonts=true BoldIntense=true ColorScheme=Nordic Font=Iosevka,12,-1,5,50,0,0,0,0,0 LineSpacing=4 UseFontLineChararacters=false

[Cursor Options] CursorShape=1

[General] Command=/usr/bin/fish DimWhenInactive=false Directory=/home/lepisma/Desktop LocalTabTitleFormat=%d | %n Name=lepisma Parent=FALLBACK/ RemoteTabTitleFormat=%d | %n TerminalCenter=false TerminalMargin=10

[Interaction Options] AutoCopySelectedText=true

[Scrolling] HistoryMode=2 ScrollBarPosition=2

[Terminal Features] BlinkingCursorEnabled=true UrlHintsModifiers=67108864 #+END_SRC

#+BEGIN_SRC shell cp ./konsole/Nordic.colorscheme ~/.local/share/konsole/Nordic.colorscheme #+END_SRC

** Linux Console

#+BEGIN_SRC ini :tangle /sudo::/etc/vconsole.conf KEYMAP="us" FONT="ter-v18n" #+END_SRC

  • Language setup

** Common Lisp

Setup roswell, quicklisp and other tools.

#+BEGIN_SRC shell ros install lake #+END_SRC

Symlink ~pod~ to roswell local projects.

#+BEGIN_SRC shell ln -s ./pod ~/.roswell/local-projects #+END_SRC

Setup pod scripts.

#+BEGIN_SRC shell :dir ./pod lake setup #+END_SRC

** Python setup

Setup miniconda. Install basic packages #+BEGIN_SRC shell pip install -r ./packages/pip #+END_SRC

Setup jupyter notebook theme. #+BEGIN_SRC shell jt -t grade3 -f iosevka -nf iosevka -tf iosevka -tfs 12 -cellw 1200 #+END_SRC

Some package config #+BEGIN_SRC shell stow -t ~/ bbq stow -t ~/ beets #+END_SRC

IPython init #+BEGIN_SRC python :tangle ~/.ipython/profile_default/startup/00-auto.py get_ipython().magic("%load_ext autoreload") get_ipython().magic("%autoreload 2") #+END_SRC

** JS

Get nvm and use brigand/fast-nvm-fish. Install some command line tools.

#+BEGIN_SRC shell cat ./packages/node | while read -l line npm i -g $line end #+END_SRC

** R

Setup ~pkr~

#+BEGIN_SRC shell wget https://raw.githubusercontent.com/reichlab/pkr/master/pkr mv pkr ~/bin/ chmod +x ~/bin/pkr #+END_SRC

** Haskell

#+BEGIN_SRC haskell :tangle ~/.ghci :set prompt "\ESC[32mλ> \ESC[m" :set -XOverloadedStrings :set +m :set +t :set +s #+END_SRC

  • Setup email

Stow offlineimap

#+BEGIN_SRC shell stow -t ~/ offlineimap #+END_SRC

Copy over the template ~authinfo.gpg~

#+BEGIN_SRC shell cp ./misc/.authinfo.gpg ~/ #+END_SRC

  • Setup hardware ** Bluetooth sinks Dumping commands. Need to enable bluetooth service and stuff.

#+begin_src shell pacmd list-sinks | grep -e 'name:' -e 'index:' pacmd set-default-sink #+end_src

** Tablet Run ~configure-tablet~.

** Touchpad Two finger for right click.

#+begin_src ini :tangle /sudo::/etc/X11/xorg.conf.d/99-synaptics-overrides.conf Section "InputClass" Identifier "touchpad overrides" Driver "libinput" MatchIsTouchpad "on" Option "Tapping" "on" Option "TappingButtonMap" "lrm" EndSection #+end_src

** Keyboard Swap keys on laptop's board.

#+BEGIN_SRC ini :tangle ~/.Xmodmap clear lock clear control keycode 66 = Control_L add control = Control_L Control_R #+END_SRC

Set up [[./keyboard/kmonad.service][kmonad service]] for macropad.

** Graphics Card [[https://forum.manjaro.org/t/howto-set-up-prime-with-nvidia-proprietary-driver/40225?u=bogdancovaciu][This guide]] helps me setting up 1060. Although the battery drain goes up a bit, it's not really bad.

Relevant portion for ~xinitrc~:

#+BEGIN_SRC shell

Goes above exec stump..

xrandr --setprovideroutputsource modesetting NVIDIA-0 xrandr --auto #+END_SRC

  • Modules

Some modules that I might need to blacklist:

  • ~i2c_hid~
  • ~r8169~
  • ~ideapad_laptop~