This commit is contained in:
jay 2023-09-11 08:20:07 +08:00
parent 874f14afee
commit 12bcba518d
3 changed files with 21 additions and 14 deletions

View File

@ -28,6 +28,10 @@
{{- $enableTmux := promptBoolOnce . "enableTmux" "install enable tmux autostart" true -}} {{- $enableTmux := promptBoolOnce . "enableTmux" "install enable tmux autostart" true -}}
{{- $enableSSHAgent := promptBoolOnce . "enableSSHAgent" "install enable ssh agent autostart" true -}} {{- $enableSSHAgent := promptBoolOnce . "enableSSHAgent" "install enable ssh agent autostart" true -}}
{{- $enableUI := promptBoolOnce . "enableUI" "install enable ui" true -}} {{- $enableUI := promptBoolOnce . "enableUI" "install enable ui" true -}}
{{- $systemd := promptBoolOnce . "systemd" "is systemd init" true -}}
[data.settings]
systemd = {{ $systemd }}
[data.ui] [data.ui]
enable = {{ $enableUI }} enable = {{ $enableUI }}

View File

@ -38,7 +38,7 @@ output * bg /home/jay/.config/sway/bg.png fill
exec --no-startup-id dbus-update-activation-environment --all exec --no-startup-id dbus-update-activation-environment --all
# exec_always xdg-desktop-portal -r # exec_always xdg-desktop-portal -r
exec_always /usr/libexec/xdg-desktop-portal-wlr # exec_always /usr/libexec/xdg-desktop-portal-wlr
# exec env XDG_CONFIG_HOME=/home/jay/.config gentoo-pipewire-launcher restart & # exec env XDG_CONFIG_HOME=/home/jay/.config gentoo-pipewire-launcher restart &
exec_always kanshi exec_always kanshi
exec dex -a -e sway exec dex -a -e sway
@ -246,16 +246,16 @@ bindsym --release $mod+Shift+w exec "echo 0 > /tmp/sovpipe"
bindsym $mod+Ctrl+h exec cat ~/.config/sway/config |grep bindsym |grep -v "#"| sed 's/^[[:space:]]*//'| wofi --dmenu bindsym $mod+Ctrl+h exec cat ~/.config/sway/config |grep bindsym |grep -v "#"| sed 's/^[[:space:]]*//'| wofi --dmenu
# set workspace monitor # set workspace monitor
workspace 1 output eDP-1 #workspace 1 output eDP-1
workspace 2 output HDMI-A-1 DP-1 eDP-1 #workspace 2 output HDMI-A-1 DP-1 eDP-1
workspace 3 output HDMI-A-1 DP-1 eDP-1 #workspace 3 output HDMI-A-1 DP-1 eDP-1
workspace 4 output HDMI-A-1 DP-1 eDP-1 #workspace 4 output HDMI-A-1 DP-1 eDP-1
workspace 5 output HDMI-A-1 DP-1 eDP-1 #workspace 5 output HDMI-A-1 DP-1 eDP-1
workspace 6 output HDMI-A-1 DP-1 eDP-1 #workspace 6 output HDMI-A-1 DP-1 eDP-1
workspace 7 output eDP-1 #workspace 7 output eDP-1
workspace 8 output eDP-1 #workspace 8 output eDP-1
workspace 9 output eDP-1 #workspace 9 output eDP-1
workspace 10 output eDP-1 #workspace 10 output eDP-1
# #
# Status Bar: # Status Bar:
@ -290,3 +290,4 @@ focus_follows_mouse no
xwayland enable xwayland enable
# include @sysconfdir@/sway/config.d/* # include @sysconfdir@/sway/config.d/*
include ~/.config/sway/conf.d/*

View File

@ -4,13 +4,15 @@ entries="⇠ Logout\n⏾ Suspend\n⭮ Reboot\n⏻ Shutdown"
selected=$(echo -e $entries|wofi --width 350 --height 250 --dmenu --cache-file /dev/null | awk '{print tolower($2)}') selected=$(echo -e $entries|wofi --width 350 --height 250 --dmenu --cache-file /dev/null | awk '{print tolower($2)}')
cmd="{{- if .settings.systemd }}systemctl{{ else }}loginctl{{ end }}"
case $selected in case $selected in
logout) logout)
swaymsg exit;; swaymsg exit;;
suspend) suspend)
exec loginctl suspend;; exec ${cmd} suspend;;
reboot) reboot)
exec loginctl reboot;; exec ${cmd} reboot;;
shutdown) shutdown)
exec loginctl poweroff -i;; exec ${cmd} poweroff -i;;
esac esac