dotfiles.git

commit e04e711c5686a7aba18fd76c1d172bca0f00d280

Author: Adam Evyčędo <git@apiote.xyz>

starting sway

 .config/fish/config.fish | 19 +++++++++++++------
 .config/sh/variables.wayland | 4 ++--
 .config/sway/sway_startup.sh | 9 ++-------


diff --git a/.config/fish/config.fish b/.config/fish/config.fish
index 8a7a25639845409d59bd708c6c666fa1ab227e4d..04a9eab9329b3e40fbf8a29be4ff1db735325b50 100644
--- a/.config/fish/config.fish
+++ b/.config/fish/config.fish
@@ -31,18 +31,20 @@ 		bash -c ". ~/.config/sh/functions && $_ $argv"
 	end
 end
 
+if [ -z "$XDG_RUNTIME_DIR" ]
+	set -gx XDG_RUNTIME_DIR "/tmp/$(id -u)-runtime-dir"
+	if ! [ -d "$XDG_RUNTIME_DIR" ]
+		mkdir "$XDG_RUNTIME_DIR"
+		chmod 700 "$XDG_RUNTIME_DIR"
+	end
+end
+
 . ~/.config/sh/aliases
 if [ "$WAYLAND_DISPLAY" != "" ]
 	posix_source ~/.config/sh/variables.wayland
 end
 posix_source ~/.config/sh/variables.(hostname)
 posix_source ~/.config/sh/variables
-
-if [ (tty) = "/dev/tty1" ] && which sway >/dev/null 2>&1
-	posix_source ~/.config/sh/variables.wayland
-	exec sway
-end
-
 
 if [ -f /tmp/ssh-agent.fish ]
 	. /tmp/ssh-agent.fish >/dev/null
@@ -62,6 +64,11 @@ 	disown
 end
 
 umask 077
+
+if [ (tty) = "/dev/tty1" ] && which sway >/dev/null 2>&1
+	posix_source ~/.config/sh/variables.wayland
+	exec dbus-run-session -- sway
+end
 
 # todo function fish_prompt
 #   echo ''




diff --git a/.config/sh/variables.wayland b/.config/sh/variables.wayland
index 353507953d052881b6a101926d76e50770fd058e..f8f87919f25ee9b818e4864ffd65e825e8c243bd 100644
--- a/.config/sh/variables.wayland
+++ b/.config/sh/variables.wayland
@@ -1,5 +1,5 @@
-export LIBSEAT_BACKEND=logind
-export XDG_CURRENT_DESKTOP=Unity
+export XDG_CURRENT_DESKTOP=sway
+export XDG_SESSION_DESKTOP=sway
 export QT_QPA_PLATFORM=wayland
 export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
 export MOZ_ENABLE_WAYLAND=1




diff --git a/.config/sway/sway_startup.sh b/.config/sway/sway_startup.sh
index 6ad8fb31166f09c96e6c031525af65bae085d173..2f6e9fc26b7f286ffb35fdf707cc496467158577 100755
--- a/.config/sway/sway_startup.sh
+++ b/.config/sway/sway_startup.sh
@@ -27,21 +27,16 @@
 pgrep ssh-agent || (ssh-agent > /tmp/ssh-agent.sh && ssh-agent -c > /tmp/ssh-agent.fish)
 
 # swaymsg output HDMI-A-1 bg $(ls ~/Pictures/wallpapers/encrypt/ | sort -R | tail -1) fill
- dbus-launch --sh-syntax > /tmp/dbus.sh
- grep -v export /tmp/dbus.sh | sed 's/=/ /' | sed 's/^/set -gx /' > /tmp/dbus.fish
- . /tmp/dbus.sh
 
 pgrep mako || mako &
 
-doas laptop_mode
-doas powertop --auto-tune
+# doas laptop_mode
+doas /usr/sbin/powertop --auto-tune
 
 swayidle -w \
     timeout 600 'swaylock -f' \
     resume 'swaymsg "output * dpms on"; ~/.local/bin/bar_all_once' \
     before-sleep 'swaylock -f' &
-
-# mount | grep nextcloud || mount /media/nextcloud/me@cloud.apiote.xyz/ >/tmp/nextcloud.log 2>&1 &
 
 while [ ! -e /tmp/swaybar/pipe ]
 do