org-config

General config files, using org-babel
git clone https://git.jamzattack.xyz/org-config
Log | Files | Refs

xorg.org (2728B)


      1 # -*- org-use-property-inheritance: t; -*-
      2 #+TITLE: Xorg configuration: Global keybindings and xinitrc
      3 
      4 * xinitrc
      5 :PROPERTIES:
      6 :header-args: :tangle "out/.xinitrc"
      7 :END:
      8 
      9 This file is read by startx(1) and is executed as a shell script to
     10 start the X server.
     11 
     12 ** Keyboard
     13 
     14 Dvorak keyboard layout with caps acting as ctrl. Faster repeat rate
     15 and delay.
     16 
     17 #+begin_src shell
     18   setxkbmap us dvorak 'ctrl:nocaps' &
     19   xset r rate 200 50 &
     20   sxhkd -c $XDG_CONFIG_HOME/sxhkd/sxhkdrc &
     21 #+end_src
     22 
     23 ** Mouse
     24 
     25 xbanish hides the cursor whenever you start typing.
     26 
     27 #+begin_src shell
     28   xbanish &
     29 #+end_src
     30 
     31 I only use the trackpoint on my thinkpad, so I disable the other one.
     32 
     33 #+begin_src shell
     34   xinput disable "SynPS/2 Synaptics TouchPad" &
     35 #+end_src
     36 
     37 ** Background
     38 
     39 Set the default background color to sky blue (#87ceeb).
     40 
     41 #+begin_src shell
     42   xsetroot -solid "cadetblue" &
     43 #+end_src
     44 
     45 ** Dunst (notification daemon)
     46 
     47 #+begin_src shell
     48   dunst &
     49 #+end_src
     50 
     51 ** Window Manager
     52 
     53 If starting X from tty1, launch EWXM.  Otherwise, start twm using [[file:twm.org][this
     54 config file]].
     55 
     56 Note: these scripts are created [[*Scripts][here]] and are not standard.
     57 
     58 #+begin_src shell
     59   if [ "$(tty)" == "/dev/tty1" ]; then
     60      exec exwm
     61   else
     62      exec twmrc
     63   fi
     64 #+end_src
     65 
     66 * sxhkd
     67 :PROPERTIES:
     68 :header-args: :tangle "xdg-config/sxhkd/sxhkdrc" :mkdirp yes
     69 :END:
     70 
     71 Sxhkd config. Just audio and brightness controls, and screen locker.
     72 
     73 ** volume
     74 
     75 This assumes that alsa and pulse are used.
     76 
     77 #+begin_src conf
     78   XF86Audio{Mute,LowerVolume,RaiseVolume}
     79           amixer sset Master {toggle,5%-,5%+}
     80 #+end_src
     81 
     82 ** brightness
     83 
     84 Brightness uses xbacklight.
     85 
     86 #+begin_src conf
     87   XF86MonBrightness{Up,Down}
     88           xbacklight -{inc,dec} 5
     89 #+end_src
     90 
     91 ** lockscreen
     92 
     93 =s-`= starts i3lock with a black background.
     94 
     95 #+begin_src conf
     96   super + grave
     97         i3lock -c "#000000"
     98 #+end_src
     99 
    100 ** mpd controls
    101 
    102 Pause/Prev/Next all control [[file:mpd.org][mpd]].
    103 
    104 #+begin_src conf
    105   XF86Audio{Play,Prev,Next}
    106           mpc {toggle,prev,next}
    107 #+end_src
    108 
    109 ** screenshot
    110 
    111 Take a screenshot and save it in =~/Pictures=.
    112 
    113 | Print   | Screenshot of whole desktop |
    114 | S-Print | Select a region             |
    115 
    116 #+begin_src conf
    117   {_,shift + }Print
    118 	   maim -uo {_,-s} > ~/Pictures/$(date +'%F_%R').png
    119 #+end_src
    120 * Scripts
    121 
    122 A couple of scripts to start my window managers with their non-default
    123 config files.
    124 
    125 ** Ratpoison
    126 
    127 #+begin_src shell :tangle bin/ratpoisonrc :shebang "#!/bin/sh"
    128   ratpoison -f "$XDG_CONFIG_HOME/ratpoison/config"
    129 #+end_src
    130 
    131 ** Twm
    132 
    133 #+begin_src shell :tangle bin/twmrc :shebang "#!/bin/sh"
    134   twm -f "$XDG_CONFIG_HOME/twm/config"
    135 #+end_src
    136 
    137 ** EXWM
    138 
    139 #+begin_src shell :tangle bin/exwm :shebang "#!/bin/sh"
    140   emacsclient -c -a emacs --eval '(exwm-init)'
    141 #+end_src