2021-07-03 14:13:56 +02:00
|
|
|
#!/bin/sh
|
2022-06-28 18:40:48 +02:00
|
|
|
# This file should be symlinked from ~/.xsession
|
2021-07-03 14:13:56 +02:00
|
|
|
|
2021-10-17 12:25:01 +02:00
|
|
|
# Don't read anything from stdin.
|
2021-10-17 12:13:09 +02:00
|
|
|
exec < /dev/null
|
2021-10-17 08:33:26 +02:00
|
|
|
|
2022-10-25 09:32:58 +02:00
|
|
|
# Set some XDG_* variables
|
|
|
|
export XDG_SESSION_DESKTOP=i3
|
|
|
|
export XDG_CURRENT_DESKTOP=i3
|
|
|
|
|
2021-07-03 14:13:56 +02:00
|
|
|
# Ensure we use the appropriate gtkrc-2.0 file
|
|
|
|
export GTK2_RC_FILES=$HOME/.gtkrc-2.0
|
|
|
|
|
|
|
|
# We do not want to rely on crappy mailcap
|
|
|
|
export MAILCAPS=$HOME/.mailcap
|
|
|
|
|
2022-09-11 08:26:24 +02:00
|
|
|
# Qt HiDPI (https://doc.qt.io/qt-6/highdpi.html)
|
2022-09-09 19:53:21 +02:00
|
|
|
export QT_AUTO_SCREEN_SCALE_FACTOR=1
|
2022-09-11 08:26:24 +02:00
|
|
|
export QT_SCALE_FACTOR_ROUNDING_POLICY=PassThrough
|
|
|
|
# Qt theme
|
2021-07-03 14:13:56 +02:00
|
|
|
export QT_QPA_PLATFORMTHEME=qt5ct
|
|
|
|
|
|
|
|
# GTK3 apps try to contact org.a11y.Bus. Disable that.
|
|
|
|
export NO_AT_BRIDGE=1
|
|
|
|
|
2022-07-03 11:25:19 +02:00
|
|
|
# Make cursor works from Nix programs. This does not solve it for
|
|
|
|
# everything as libXcursor may be loaded dynamically, see:
|
|
|
|
# https://github.com/NixOS/nixpkgs/issues/24137 and
|
|
|
|
# https://github.com/NixOS/nixpkgs/pull/54916. A possible solution
|
|
|
|
# would be to preload host libXcursor. This seems to work:
|
|
|
|
# LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libXcursor.so.1. But we don't
|
|
|
|
# want to do that for all apps.
|
2022-04-21 22:04:27 +02:00
|
|
|
export XCURSOR_PATH=/usr/share/icons
|
|
|
|
|
2021-07-03 14:13:56 +02:00
|
|
|
# Environment variables
|
2021-07-30 23:41:21 +02:00
|
|
|
. ~/.zshenv
|
2021-07-05 17:39:48 +02:00
|
|
|
export TERMINAL=vbeterm
|
2021-07-03 14:13:56 +02:00
|
|
|
|
|
|
|
# Copy some configuration files
|
|
|
|
while read source target; do
|
2021-07-30 23:43:31 +02:00
|
|
|
mkdir -p $(dirname $HOME/$target)
|
|
|
|
ln -nsf ~/.config/i3/dotfiles/$source $HOME/$target
|
2021-07-03 14:13:56 +02:00
|
|
|
done <<EOF
|
2021-07-04 18:25:28 +02:00
|
|
|
Xresources .Xresources
|
2022-11-14 19:34:39 +01:00
|
|
|
XCompose .XCompose
|
2021-07-04 18:25:28 +02:00
|
|
|
gtkrc-2.0 .gtkrc-2.0
|
|
|
|
gtk3.css .config/gtk-3.0/gtk.css
|
|
|
|
qt5ct.conf .config/qt5ct/qt5ct.conf
|
2022-10-12 20:42:48 +02:00
|
|
|
qt5ct.conf .config/qt6ct/qt6ct.conf
|
2021-07-04 18:25:28 +02:00
|
|
|
systemd .config/systemd/user
|
|
|
|
dunstrc .config/dunst/dunstrc
|
|
|
|
polybar.conf .config/polybar/config
|
2021-07-17 22:13:00 +02:00
|
|
|
rofi.conf .config/rofi/config.rasi
|
2021-09-09 08:50:15 +02:00
|
|
|
fonts.conf .config/fontconfig/fonts.conf
|
2024-04-09 07:39:00 +02:00
|
|
|
portals.conf .config/xdg-desktop-portal/i3-portals.conf
|
2021-07-03 14:13:56 +02:00
|
|
|
EOF
|
2021-07-04 14:54:07 +02:00
|
|
|
rm -f ~/.config/gtk-3.0/settings.ini
|
2021-07-31 13:07:49 +02:00
|
|
|
dconf load / < ~/.config/i3/dotfiles/dconf.ini
|
2021-07-03 14:13:56 +02:00
|
|
|
|
2022-04-07 22:38:39 +02:00
|
|
|
# GTK bookmarks
|
|
|
|
for f in ~/.zsh/run/marks/*; do
|
|
|
|
[ -d "$f" ] || continue
|
|
|
|
echo file://"$f"
|
|
|
|
done > ~/.config/gtk-3.0/bookmarks
|
|
|
|
|
2021-07-03 14:13:56 +02:00
|
|
|
# Services are started with systemd
|
|
|
|
systemctl --user import-environment
|
|
|
|
systemctl --user daemon-reload
|
2021-08-01 11:56:27 +02:00
|
|
|
exec systemctl --user start --wait i3.service
|