org-config

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

xorg.org (2778B)


      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, and then turns the screen
     94 off.
     95 
     96 #+begin_src conf
     97   super + grave
     98 	i3lock -c "#000000" & xset dpms force standby
     99 #+end_src
    100 
    101 ** mpd controls
    102 
    103 Pause/Prev/Next all control [[file:mpd.org][mpd]].
    104 
    105 #+begin_src conf
    106   XF86Audio{Play,Prev,Next}
    107           mpc {toggle,prev,next}
    108 #+end_src
    109 
    110 ** screenshot
    111 
    112 Take a screenshot and save it in =~/Pictures=.
    113 
    114 | Print   | Screenshot of whole desktop |
    115 | S-Print | Select a region             |
    116 
    117 #+begin_src conf
    118   {_,shift + }Print
    119 	   maim -uo {_,-s} > ~/Pictures/$(date +'%F_%R').png
    120 #+end_src
    121 * Scripts
    122 
    123 A couple of scripts to start my window managers with their non-default
    124 config files.
    125 
    126 ** Ratpoison
    127 
    128 #+begin_src shell :tangle bin/ratpoisonrc :shebang "#!/bin/sh"
    129   ratpoison -f "$XDG_CONFIG_HOME/ratpoison/config"
    130 #+end_src
    131 
    132 ** Twm
    133 
    134 #+begin_src shell :tangle bin/twmrc :shebang "#!/bin/sh"
    135   twm -f "$XDG_CONFIG_HOME/twm/config"
    136 #+end_src
    137 
    138 ** EXWM
    139 
    140 #+begin_src shell :tangle bin/exwm :shebang "#!/bin/sh"
    141   emacsclient -c -a emacs --eval '(exwm-init)'
    142 #+end_src