~proycon/dotfiles

789fda8910c4eb3b6c1975a27af577aaac9d97f1 — Maarten van Gompel a month ago 57327f5
river updates
5 files changed, 50 insertions(+), 34 deletions(-)

A river/env.sh
M river/init
M scripts/lock.sh
M scripts/starthyprland.sh
A scripts/startriver.sh
A river/env.sh => river/env.sh +32 -0
@@ 0,0 1,32 @@
#!/bin/sh

export QT_AUTO_SCREEN_SCALE_FACTOR=1
export QT_QPA_PLATFORM=wayland
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
export QT_QPA_PLATFORMTHEME=qt5ct
export QT_SCALE_FACTOR=1.8
#export TDESKTOP_DISABLE_GTK_INTEGRATION=1
export CLUTTER_BACKEND=wayland
export ELM_SCALE=1.8
export XDG_CURRENT_DESKTOP=river
export XDG_SESSION_TYPE=wayland
export XDG_SESSION_DESKTOP=river
export GDK_BACKEND=wayland
export MOZ_ENABLE_WAYLAND=1
export SDL_VIDEODRIVER=wayland
export GLFW_IM_MODULE=fcitx
#export GTK_IM_MODULE=fcitx
export INPUT_METHOD=fcitx
export XMODIFIERS=@im=fcitx
export IMSETTINGS_MODULE=fcitx
export QT_IM_MODULE=fcitx
#export GDK_DPI_SCALE=2    # only needed for firefox, messes up others
export BEMENU_BACKEND=wayland

HOSTNAME=$(hostname)
if [ "$HOSTNAME" = "trantor" ]; then
    KB_OPTS="-options lv3:ralt_switch,caps:ctrl_modifier,altwin:swap_alt_win,grp:alt_shift_toggle"
else
    KB_OPTS=
fi
export KB_OPTS

M river/init => river/init +2 -31
@@ 1,41 1,13 @@
#!/bin/sh

killall client.sh
pkill -f lighthome
rm /tmp/locked
export QT_AUTO_SCREEN_SCALE_FACTOR=1
export QT_QPA_PLATFORM=wayland;xcb 
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
export QT_QPA_PLATFORMTHEME=qt5ct
export QT_SCALE_FACTOR=1.8
export TDESKTOP_DISABLE_GTK_INTEGRATION=1
export CLUTTER_BACKEND=wayland
export ELM_SCALE=1.8
export XDG_CURRENT_DESKTOP=river
export XDG_SESSION_TYPE=wayland
export XDG_SESSION_DESKTOP=river
export GDK_BACKEND=wayland
export MOZ_ENABLE_WAYLAND=1
export SDL_VIDEODRIVER=wayland
export GLFW_IM_MODULE=fcitx
#export GTK_IM_MODULE=fcitx
export INPUT_METHOD=fcitx
export XMODIFIERS=@im=fcitx
export IMSETTINGS_MODULE=fcitx
export QT_IM_MODULE=fcitx
#export GDK_DPI_SCALE=2    # only needed for firefox, messes up others
export BEMENU_BACKEND=wayland
. ~/.config/river/env.sh

# See the river(1), riverctl(1), and rivertile(1) man pages for complete
# documentation.

HOSTNAME=$(hostname)
if [ "$HOSTNAME" = "trantor" ]; then
    KB_OPTS="-options lv3:ralt_switch,caps:ctrl_modifier,altwin:swap_alt_win,grp:alt_shift_toggle"
else
    KB_OPTS=
fi
export KB_OPTS

if [ -e ~/dotfiles/kanshi/$HOSTNAME.config ]; then
    kanshi -c ~/dotfiles/kanshi/$HOSTNAME.config &
fi


@@ 281,7 253,6 @@ riverctl spawn "mako"
riverctl spawn "dbus-launch gnome-keyring-daemon -s --components=pkcs11,secrets,ssh,gpg"
riverctl spawn "udiskie"
riverctl spawn "setsid /home/proycon/projects/lighthome/client.sh"
# ~/dotfiles/scripts/handlehyprland.sh &
riverctl spawn "swayidle timeout 300 '/home/proycon/dotfiles/scripts/lock.sh' timeout 900 'wlopm --off \*' resume 'wlopm --on \*'"

#swayidle -w timeout 300 'swaylock -f -i $wallpaper' timeout 600 'wlopm --off \*;swaylock -F -i $wallpaper' resume 'wlopm --on \*' \ before-sleep 'swaylock -f -i $wallpaper' &

M scripts/lock.sh => scripts/lock.sh +9 -3
@@ 6,7 6,11 @@ if [ ! -f /tmp/locked ]; then
    killall gpg-agent
    paplay ~/dotfiles/media/lock.wav >/dev/null 2>/dev/null &!
    if [ -n "$WAYLAND_DISPLAY" ]; then
        hyprctl keyword input:kb_layout proylatin
        if [ "$XDG_SESSION_DESKTOP" = "Hyprland" ]; then
            hyprctl keyword input:kb_layout proylatin
        elif [ "$XDG_SESSION_DESKTOP" = "river" ]; then
            riverctl keyboard-layout $KB_OPTS proylatin
        fi
        hyprlock
        if [ "$XDG_SESSION_DESKTOP" = "Hyprland" ]; then
            hyprctl dispatch dpms on #ensure dpms is on after lock finishes


@@ 20,7 24,9 @@ if [ ! -f /tmp/locked ]; then
    paplay ~/dotfiles/media/unlock.wav >/dev/null 2>/dev/null &!
    rm /tmp/locked
    todo.sh timetrack start "$task"
    if [ "$(hostname)" = "pollux" ]; then
        ~/dotfiles/scripts/fixworkspaces.sh
    if [ "$XDG_SESSION_DESKTOP" = "Hyprland" ]; then
        if [ "$(hostname)" = "pollux" ]; then
            ~/dotfiles/scripts/fixworkspaces.sh
        fi
    fi
fi

M scripts/starthyprland.sh => scripts/starthyprland.sh +2 -0
@@ 2,6 2,8 @@
killall client.sh
rm /tmp/locked
export QT_AUTO_SCREEN_SCALE_FACTOR=0
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
export QT_QPA_PLATFORM=wayland;xcb 
export QT_SCALE_FACTOR=1.8
export ELM_SCALE=1.8
export XDG_CURRENT_DESKTOP=Hyprland

A scripts/startriver.sh => scripts/startriver.sh +5 -0
@@ 0,0 1,5 @@
#!/bin/sh

. ~/.config/river/env.sh

exec river