181 lines
3.7 KiB
Org Mode
181 lines
3.7 KiB
Org Mode
#+TITLE: Configuration Files related to Xorg
|
|
#+SETUPFILE: ./setup/org-setup-file.org
|
|
|
|
* =~/.Xresources=
|
|
:PROPERTIES:
|
|
:header-args: :tangle ~/.Xresources
|
|
:header-args+: :comments none :mkdirp yes
|
|
:CUSTOM_ID: xresources
|
|
:END:
|
|
|
|
** Colors
|
|
#+begin_src conf
|
|
,*foreground: #d5c4a1
|
|
#ifdef background_opacity
|
|
,*background: [background_opacity]#32302f
|
|
#else
|
|
,*background: #32302f
|
|
#endif
|
|
,*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
|
|
,*color16: #fe8019
|
|
,*color17: #d65d0e
|
|
,*color18: #3c3836
|
|
,*color19: #504945
|
|
,*color20: #bdae93
|
|
,*color21: #ebdbb2
|
|
#+end_src
|
|
|
|
** Fonts
|
|
#+BEGIN_SRC conf
|
|
Xft.dpi: 96
|
|
Xft.autohint: 0
|
|
Xft.lcdfilter: lcddefault
|
|
Xft.hintstyle: hintfull
|
|
Xft.hinting: 1
|
|
Xft.antialias: 1
|
|
Xft.rgba: rgb
|
|
#+END_SRC
|
|
|
|
** Cursor
|
|
#+BEGIN_SRC conf
|
|
Xcursor.theme: Breeze
|
|
Xcursor.size: 0
|
|
#+END_SRC
|
|
|
|
* =~/.xinitrc=
|
|
:PROPERTIES:
|
|
:header-args: :tangle ~/.xinitrc
|
|
:header-args+: :comments both :mkdirp yes
|
|
:header-args+: :shebang "#!/bin/sh"
|
|
:CUSTOM_ID: xinitrc
|
|
:END:
|
|
|
|
#+begin_src bash
|
|
dbus-update-activation-environment --systemd DISPLAY
|
|
#+end_src
|
|
|
|
Fix for Matlab.
|
|
#+begin_src bash
|
|
# export _JAVA_AWT_WM_NONREPARENTING=1
|
|
#+end_src
|
|
|
|
Set =DISPLAY= for =dunst= when started with =systemd=.
|
|
#+begin_src bash
|
|
# systemctl --user import-environment DISPLAY
|
|
#+end_src
|
|
|
|
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
|
|
#+END_SRC
|
|
|
|
Start =gnome-keyring-daemon=.
|
|
#+begin_src bash
|
|
eval $(gnome-keyring-daemon --start --components=pkcs11,secrets,ssh)
|
|
export SSH_AUTH_SOCK
|
|
#+end_src
|
|
|
|
#+begin_src bash
|
|
[ -f ~/.xprofile ] && . ~/.xprofile
|
|
#+end_src
|
|
|
|
#+begin_src bash
|
|
exec i3
|
|
#+end_src
|
|
|
|
* =~/.xprofile=
|
|
:PROPERTIES:
|
|
:header-args: :tangle ~/.xprofile
|
|
:header-args+: :comments both :mkdirp yes
|
|
:header-args+: :shebang "#!/bin/sh"
|
|
:CUSTOM_ID: xprofile
|
|
:END:
|
|
|
|
Keyboard Options:
|
|
#+begin_src bash
|
|
# Set repetition keyboard rate
|
|
xset r rate 200 40 &
|
|
|
|
# Set International US keyboard layout
|
|
setxkbmap -layout us -variant intl -option caps:escape &
|
|
#+end_src
|
|
|
|
Start programs related to display:
|
|
#+begin_src bash
|
|
# Screen options
|
|
xrandr --output eDP-1 --mode 1920x1200 --dpi 192 &
|
|
|
|
# Set random wallpaper
|
|
setbg ~/.local/data/wallpapers/ &
|
|
|
|
# Hide mouse cursor after x seconds
|
|
pgrep -xu "$USER" unclutter >/dev/null || \
|
|
unclutter --timeout 5 &
|
|
|
|
# Autolock screen after x minutes
|
|
xautolock -locker "~/.local/bin/lockscreen" -detectsleep -time 30 -notify 60 -notifier "notify-send -u critical -t 10000 -- 'Locking Screen' '60 seconds'" &
|
|
|
|
# Redshift
|
|
pgrep -xu "$USER" redshift >/dev/null || \
|
|
redshift &
|
|
|
|
# Run Picom (compositor)
|
|
picom --daemon &
|
|
|
|
# Network Manager Applet
|
|
nm-applet &
|
|
#+end_src
|
|
|
|
Manually start =mopidy= as it seems to not start automatically:
|
|
#+begin_src bash
|
|
# Mopidy
|
|
/usr/local/bin/mopidy --config ~/.config/mopidy/mopidy.conf >/dev/null 2>&1 &
|
|
#+end_src
|
|
|
|
Finally, run SXHKD for the key bindings:
|
|
#+begin_src bash
|
|
# Start sxhkd
|
|
pgrep -xu "$USER" sxhkd >/dev/null || \
|
|
sxhkd -m 1 -c ~/.config/sxhkd/sxhkdrc &
|
|
#+end_src
|