Files
literate-dotfiles/xconfig.org

4.0 KiB

Configuration Files related to Xorg

~/.Xresources

Colors

,*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

Fonts

Xft.dpi:       96
Xft.autohint:  0
Xft.lcdfilter: lcddefault
Xft.hintstyle: hintfull
Xft.hinting:   1
Xft.antialias: 1
Xft.rgba:      rgb

Cursor

Xcursor.theme: Breeze
Xcursor.size:  24

SXIV

Nsxiv.window.background: #FFFFFF
Nsxiv.window.foreground: #d5c4a1
Nsxiv.bar.font: Hack-10
Nsxiv.bar.background: #fbf1c7
Nsxiv.bar.foreground: #32302f

xinitrc

Use the cache directory instead of the default $HOME/.xsession-errors.

ERRFILE="$XDG_CACHE_HOME/X11/xsession-errors"

Set DISPLAY for dunst when started with systemd.

systemctl --user import-environment DISPLAY

Run some default scripts:

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
    for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
        [ -x "$f" ] && . "$f"
    done
    unset f
fi
[ -f ~/.xprofile ] && . ~/.xprofile

Merge the defaults:

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
exec i3

~/.xprofile

Keyboard Options:

# Set International US keyboard layout
setxkbmap -layout us -variant intl -option caps:escape &

Start programs related to display:

# 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 -l 48.8582:2.3387 &

# Run Picom (compositor)
picom --daemon &

# Network Manager Applet
nm-applet &

# Bluetooh Applet
blueman-applet &

# Udiskie - Automatic USB mount
udiskie --notify --automount --tray &

# Japanese input
# fcitx -d &

Manually start mopidy as it seems to not start automatically:

# Mopidy
~/.local/soft/mopidy-jellyfin/env/bin/mopidy >/tmp/mopidy.log 2>&1 &

Finally, run SXHKD for the key bindings:

# Start sxhkd
pgrep -xu "$USER" sxhkd >/dev/null || \
  sxhkd -m 1 -c ~/.config/sxhkd/sxhkdrc &