literate-dotfiles/xconfig.org

181 lines
3.7 KiB
Org Mode
Raw Normal View History

2019-12-30 17:21:22 +01:00
#+TITLE: Configuration Files related to Xorg
2021-01-01 20:12:34 +01:00
#+SETUPFILE: ./setup/org-setup-file.org
2019-12-30 17:21:22 +01:00
2021-01-01 20:12:34 +01:00
* =~/.Xresources=
2019-12-30 17:21:22 +01:00
:PROPERTIES:
:header-args: :tangle ~/.Xresources
:header-args+: :comments none :mkdirp yes
2021-01-01 20:12:34 +01:00
:CUSTOM_ID: xresources
2019-12-30 17:21:22 +01:00
:END:
** Colors
#+begin_src conf
2022-02-06 21:48:34 +01:00
,*foreground: #d5c4a1
#ifdef background_opacity
2022-02-06 21:48:34 +01:00
,*background: [background_opacity]#32302f
#else
2022-02-06 21:48:34 +01:00
,*background: #32302f
#endif
2022-02-06 21:48:34 +01:00
,*cursorColor: #d5c4a1
,*color0: #32302f
,*color1: #fb4934
,*color2: #b8bb26
,*color3: #fabd2f
,*color4: #83a598
,*color5: #d3869b
,*color6: #8ec07c
,*color7: #d5c4a1
,*color8: #665c54
,*color9: #fb4934
,*color10: #b8bb26
,*color11: #fabd2f
,*color12: #83a598
,*color13: #d3869b
,*color14: #8ec07c
,*color15: #fbf1c7
! Note: colors beyond 15 might not be loaded (e.g., xterm, urxvt),
! use 'shell' template to set these if necessary
2022-02-06 21:48:34 +01:00
,*color16: #fe8019
,*color17: #d65d0e
,*color18: #3c3836
,*color19: #504945
,*color20: #bdae93
,*color21: #ebdbb2
2019-12-30 17:21:22 +01:00
#+end_src
** Fonts
2019-12-30 17:21:22 +01:00
#+BEGIN_SRC conf
Xft.dpi: 96
Xft.autohint: 0
Xft.lcdfilter: lcddefault
Xft.hintstyle: hintfull
Xft.hinting: 1
Xft.antialias: 1
Xft.rgba: rgb
2019-12-30 17:21:22 +01:00
#+END_SRC
** Cursor
2019-12-30 17:21:22 +01:00
#+BEGIN_SRC conf
Xcursor.theme: Breeze
Xcursor.size: 0
2019-12-30 17:21:22 +01:00
#+END_SRC
2021-01-01 20:12:34 +01:00
* =~/.xinitrc=
2019-12-30 17:21:22 +01:00
:PROPERTIES:
:header-args: :tangle ~/.xinitrc
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/bin/sh"
2021-01-01 20:12:34 +01:00
:CUSTOM_ID: xinitrc
2019-12-30 17:21:22 +01:00
:END:
#+begin_src bash
dbus-update-activation-environment --systemd DISPLAY
2019-12-30 17:21:22 +01:00
#+end_src
2020-01-11 22:24:51 +01:00
Fix for Matlab.
#+begin_src bash
2022-02-06 21:48:34 +01:00
# export _JAVA_AWT_WM_NONREPARENTING=1
2020-01-11 22:24:51 +01:00
#+end_src
Set =DISPLAY= for =dunst= when started with =systemd=.
#+begin_src bash
2022-02-06 21:48:34 +01:00
# systemctl --user import-environment DISPLAY
#+end_src
2019-12-30 17:21:22 +01:00
Merge in defaults and keymaps
#+BEGIN_SRC bash
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi
if [ -f $sysmodmap ]; then
xmodmap $sysmodmap
fi
if [ -f "$userresources" ]; then
xrdb -merge "$userresources"
fi
if [ -f "$usermodmap" ]; then
xmodmap "$usermodmap"
fi
2019-12-30 17:21:22 +01:00
#+END_SRC
2020-12-09 22:14:58 +01:00
Start =gnome-keyring-daemon=.
#+begin_src bash
eval $(gnome-keyring-daemon --start --components=pkcs11,secrets,ssh)
export SSH_AUTH_SOCK
2020-12-09 22:14:58 +01:00
#+end_src
2019-12-30 17:21:22 +01:00
#+begin_src bash
[ -f ~/.xprofile ] && . ~/.xprofile
2019-12-30 17:21:22 +01:00
#+end_src
2020-12-09 22:14:58 +01:00
#+begin_src bash
exec i3
2020-12-09 22:14:58 +01:00
#+end_src
2021-01-01 20:12:34 +01:00
* =~/.xprofile=
2019-12-30 17:21:22 +01:00
:PROPERTIES:
:header-args: :tangle ~/.xprofile
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/bin/sh"
2021-01-01 20:12:34 +01:00
:CUSTOM_ID: xprofile
2019-12-30 17:21:22 +01:00
:END:
2021-01-01 20:12:34 +01:00
Keyboard Options:
2019-12-30 17:21:22 +01:00
#+begin_src bash
# Set repetition keyboard rate
xset r rate 200 40 &
2020-05-26 08:36:28 +02:00
# Set International US keyboard layout
setxkbmap -layout us -variant intl -option caps:escape &
2019-12-30 17:21:22 +01:00
#+end_src
2021-01-01 20:12:34 +01:00
Start programs related to display:
2019-12-30 17:21:22 +01:00
#+begin_src bash
# Screen options
2022-02-06 21:48:34 +01:00
xrandr --output eDP-1 --mode 1920x1200 --dpi 192 &
2019-12-30 17:21:22 +01:00
# Set random wallpaper
setbg ~/.local/data/wallpapers/ &
2019-12-30 17:21:22 +01:00
# Hide mouse cursor after x seconds
pgrep -xu "$USER" unclutter >/dev/null || \
unclutter --timeout 5 &
2019-12-30 17:21:22 +01:00
# Autolock screen after x minutes
2022-02-06 21:48:34 +01:00
xautolock -locker "~/.local/bin/lockscreen" -detectsleep -time 30 -notify 60 -notifier "notify-send -u critical -t 10000 -- 'Locking Screen' '60 seconds'" &
2019-12-30 17:21:22 +01:00
# Redshift
pgrep -xu "$USER" redshift >/dev/null || \
redshift &
2019-12-30 17:21:22 +01:00
# Run Picom (compositor)
picom --daemon &
2022-02-06 21:48:34 +01:00
# Network Manager Applet
nm-applet &
2019-12-30 17:21:22 +01:00
#+end_src
2021-01-01 20:12:34 +01:00
Manually start =mopidy= as it seems to not start automatically:
#+begin_src bash
# Mopidy
mopidy --config ~/.config/mopidy/mopidy.conf >/dev/null 2>&1 &
#+end_src
2021-01-01 20:12:34 +01:00
Finally, run SXHKD for the key bindings:
2019-12-30 17:21:22 +01:00
#+begin_src bash
# Start sxhkd
pgrep -xu "$USER" sxhkd >/dev/null || \
sxhkd -m 1 -c ~/.config/sxhkd/sxhkdrc &
2019-12-30 17:21:22 +01:00
#+end_src