mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-06-25 19:28:34 +02:00
69 lines
2 KiB
Bash
Executable file
69 lines
2 KiB
Bash
Executable file
#!/bin/sh
|
|
# This file should be symlinked from ~/.xsession
|
|
|
|
# Don't read anything from stdin.
|
|
exec < /dev/null
|
|
|
|
# Set some XDG_* variables
|
|
export XDG_SESSION_DESKTOP=i3
|
|
export XDG_CURRENT_DESKTOP=i3
|
|
|
|
# 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
|
|
|
|
# Qt HiDPI (https://doc.qt.io/qt-6/highdpi.html)
|
|
export QT_AUTO_SCREEN_SCALE_FACTOR=1
|
|
export QT_SCALE_FACTOR_ROUNDING_POLICY=PassThrough
|
|
# Qt theme
|
|
export QT_QPA_PLATFORMTHEME=qt5ct
|
|
|
|
# GTK3 apps try to contact org.a11y.Bus. Disable that.
|
|
export NO_AT_BRIDGE=1
|
|
|
|
# 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.
|
|
export XCURSOR_PATH=/usr/share/icons
|
|
|
|
# Environment variables
|
|
. ~/.zshenv
|
|
export TERMINAL=vbeterm
|
|
|
|
# Copy some configuration files
|
|
while read source target; do
|
|
mkdir -p $(dirname $HOME/$target)
|
|
ln -nsf ~/.config/i3/dotfiles/$source $HOME/$target
|
|
done <<EOF
|
|
Xresources .Xresources
|
|
XCompose .XCompose
|
|
gtkrc-2.0 .gtkrc-2.0
|
|
gtk3.css .config/gtk-3.0/gtk.css
|
|
qt5ct.conf .config/qt5ct/qt5ct.conf
|
|
qt5ct.conf .config/qt6ct/qt6ct.conf
|
|
systemd .config/systemd/user
|
|
dunstrc .config/dunst/dunstrc
|
|
polybar.conf .config/polybar/config
|
|
rofi.conf .config/rofi/config.rasi
|
|
fonts.conf .config/fontconfig/fonts.conf
|
|
portals.conf .config/xdg-desktop-portal/i3-portals.conf
|
|
EOF
|
|
rm -f ~/.config/gtk-3.0/settings.ini
|
|
dconf load / < ~/.config/i3/dotfiles/dconf.ini
|
|
|
|
# GTK bookmarks
|
|
for f in ~/.zsh/run/marks/*; do
|
|
[ -d "$f" ] || continue
|
|
echo file://"$f"
|
|
done > ~/.config/gtk-3.0/bookmarks
|
|
|
|
# Services are started with systemd
|
|
systemctl --user import-environment
|
|
systemctl --user daemon-reload
|
|
exec systemctl --user start --wait i3.service
|