org-config

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

xorg.org (3099B)


      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 Pipewire, in all its glory, does something fucky when setting its
     76 master gain.  I don't know whether this has come about with my new
     77 computer, or maybe it's always been fucky but I just didn't notice
     78 because I'm usually plugged into an amp.  Anyway, using -c 0 to set
     79 the actual sound card's gain rather than the "pipewire" dummy
     80 soundcard's mitigates this fuckiness.
     81 
     82 #+begin_src conf
     83   XF86Audio{Mute,LowerVolume,RaiseVolume}
     84           amixer -c 0 sset Master {toggle,5%-,5%+}
     85 #+end_src
     86 
     87 ** brightness
     88 
     89 Brightness uses xbacklight.
     90 
     91 #+begin_src conf
     92   XF86MonBrightness{Up,Down}
     93 	  brightnessctl 5%{+,-}
     94 #+end_src
     95 
     96 ** lockscreen
     97 
     98 =s-`= starts i3lock with a black background, and then turns the screen
     99 off.
    100 
    101 #+begin_src conf
    102   super + grave
    103 	i3lock -c "#000000" & xset dpms force standby
    104 #+end_src
    105 
    106 ** mpd controls
    107 
    108 Pause/Prev/Next all control [[file:mpd.org][mpd]].
    109 
    110 #+begin_src conf
    111   XF86Audio{Play,Prev,Next}
    112           mpc {toggle,prev,next}
    113 #+end_src
    114 
    115 ** screenshot
    116 
    117 Take a screenshot and save it in =~/Pictures=.
    118 
    119 | Print   | Screenshot of whole desktop |
    120 | S-Print | Select a region             |
    121 
    122 #+begin_src conf
    123   {_,shift + }Print
    124 	   maim -uo {_,-s} > ~/Pictures/$(date +'%F_%R').png
    125 #+end_src
    126 * Scripts
    127 
    128 A couple of scripts to start my window managers with their non-default
    129 config files.
    130 
    131 ** Ratpoison
    132 
    133 #+begin_src shell :tangle bin/ratpoisonrc :shebang "#!/bin/sh"
    134   ratpoison -f "$XDG_CONFIG_HOME/ratpoison/config"
    135 #+end_src
    136 
    137 ** Twm
    138 
    139 #+begin_src shell :tangle bin/twmrc :shebang "#!/bin/sh"
    140   twm -f "$XDG_CONFIG_HOME/twm/config"
    141 #+end_src
    142 
    143 ** EXWM
    144 
    145 #+begin_src shell :tangle bin/exwm :shebang "#!/bin/sh"
    146   emacsclient -c -a emacs --eval '(exwm-init)'
    147 #+end_src