Moved sway to --user service and other fixes

Signed-off-by: Marko Korhonen <marko.korhonen@reekynet.com>
This commit is contained in:
Marko Korhonen 2020-01-11 18:51:29 +02:00
parent daec7ef233
commit b98cc2a7e0
No known key found for this signature in database
GPG key ID: 911B85FBC6003FE5
9 changed files with 64 additions and 96 deletions

View file

@ -113,45 +113,47 @@ dotfiles:
profiles: profiles:
Locale: Locale:
dotfiles: dotfiles:
- f_locale.conf - f_locale.conf
- f_locale.gen - f_locale.gen
Pacman: Pacman:
dotfiles: dotfiles:
- f_pacman.conf - f_pacman.conf
- f_pacserve.service.conf - f_pacserve.service.conf
- f_pacman-dl.service - f_pacman-dl.service
- f_pacman-dl.timer - f_pacman-dl.timer
Mirkwood: Mirkwood:
dotfiles: dotfiles:
- f_cryptissue - f_getty.conf
- f_welcomemessage.conf - f_environment
- d_bin - f_cryptissue
- f_adb.service - f_welcomemessage.conf
- f_bluetooth.conf - d_bin
- f_iwd@.service - f_adb.service
- f_loader.conf - f_bluetooth.conf
- f_sshd_config - f_iwd@.service
- f_logind.conf - f_loader.conf
- f_60-uinput-permissions.rules - f_sshd_config
- f_freetype2.sh - f_logind.conf
- f_fonts.conf - f_60-uinput-permissions.rules
- f_timesyncd.conf - f_freetype2.sh
- f_99-sysctl.conf - f_fonts.conf
- f_99-lowbat.rules - f_timesyncd.conf
- f_ignore - f_99-sysctl.conf
- f_zsh.hook - f_99-lowbat.rules
- f_sway@.service - f_ignore
- f_zsh.hook
- f_sway@.service
include: include:
- Locale - Locale
- Pacman - Pacman
Rivendell: Rivendell:
include: include:
- Locale - Locale
- Pacman - Pacman
dotfiles: dotfiles:
- f_bluetooth.conf - f_bluetooth.conf
- f_60-uinput-permissions.rules - f_60-uinput-permissions.rules
- f_timesyncd.conf - f_timesyncd.conf
- f_sshd_config - f_sshd_config
- f_nightly-reboot.service - f_nightly-reboot.service
- f_nightly-reboot.timer - f_nightly-reboot.timer

View file

@ -2,4 +2,4 @@
output * bg $wallpaper fill output * bg $wallpaper fill
output eDP-1 position 0 0 output eDP-1 position 0 0
output HDMI-A-1 position 1900 0 output HDMI-A-1 position 1920 0

View file

@ -1,7 +1,7 @@
# vim:ft=sway # vim:ft=sway
# Start applications in specific workspaces # Start applications in specific workspaces
assign [title="Telegram"] workspace 3 assign [app_id="telegramdesktop"] workspace 3
assign [app_id="thunderbird"] workspace 4 assign [app_id="thunderbird"] workspace 4
# Automatically switch to urgent workspace # Automatically switch to urgent workspace

View file

@ -39,7 +39,7 @@ bindsym $mod+Backspace exec makoctl invoke
bindsym Control+Escape exec makoctl dismiss bindsym Control+Escape exec makoctl dismiss
# activate lockscreen # activate lockscreen
bindsym Control+Shift+Backspace exec loginctl lock-session bindsym Control+Shift+Backspace exec loginctl lock-session $(loginctl show-user $USER -p Sessions | cut -d'=' -f2)
# Move your focus around # Move your focus around
bindsym $mod+h focus left bindsym $mod+h focus left

View file

@ -1,5 +1,3 @@
XDG_SESSION_TYPE=wayland
# Fix java on wayland # Fix java on wayland
_JAVA_AWT_WM_NONREPARENTING=1 _JAVA_AWT_WM_NONREPARENTING=1
_JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel' _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel'

View file

@ -1,31 +1,17 @@
[Unit] [Unit]
Description=sway - SirCmpwn's Wayland window manager Description=sway - SirCmpwn's Wayland window manager
Documentation=man:sway(5)
BindsTo=graphical-session.target
Wants=graphical-session-pre.target
After=graphical-session-pre.target
[Service] [Service]
ExecStartPre=/usr/bin/chvt %I Type=simple
ExecStart=/usr/bin/dbus-launch --exit-with-session /usr/bin/sway EnvironmentFile=-%h/.config/sway/env
TTYPath=/dev/tty%I ExecStart=/usr/bin/dbus-run-session /usr/bin/sway
TTYReset=yes Restart=on-failure
TTYVHangup=yes RestartSec=1
TTYVTDisallocate=yes TimeoutStopSec=10
PAMName=login
User=<user>
WorkingDirectory=/home/<user>
Environment=XDG_RUNTIME_DIR=/run/user/1000
Environment=QT_WAYLAND_FORCE_DPI=100
Environment=QT_PLUGIN_PATH=/usr/lib/kde4/plugins/
Environment=QT_QPA_PLATFORM=wayland
Environment=QT_AUTO_SCREEN_SCALE_FACTOR=0
Environment=QT_QPA_PLATFORMTHEME=gtk3
Environment=QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
Environment=GDK_BACKEND=wayland
Restart=always
RestartSec=2
StandardInput=tty
StandardError=journal
StandardOutput=journal
Nice=-5
[Install] [Install]
WantedBy=graphical.target WantedBy=default.target
Alias=display-manager.service

View file

@ -5,7 +5,7 @@ PartOf=graphical-session.target
[Service] [Service]
Type=simple Type=simple
ExecStartPre=/usr/bin/mkfifo /tmp/sway.wob ExecStartPre=/usr/bin/mkfifo /tmp/sway.wob
ExecStart=/usr/bin/tail -f /tmp/sway.wob | wob ExecStart=/usr/bin/tail -f /tmp/sway.wob | /usr/bin/wob
ExecStop=/usr/bin/rm /tmp/sway.wob ExecStop=/usr/bin/rm /tmp/sway.wob
[Install] [Install]

View file

@ -1,29 +1,29 @@
#!/bin/bash #!/bin/bash
RESP=$(cat <<EOF | fzf RESP=$(cat <<EOF | fzf +s --tac
Exit Shutdown
Reboot
Suspend Suspend
Lock Lock
Reboot Exit
Shutdown
EOF EOF
); );
case "$RESP" in case "$RESP" in
Exit) Shutdown)
swaymsg exit systemctl poweroff
;;
Suspend)
systemctl suspend
;; ;;
Reboot) Reboot)
systemctl reboot systemctl reboot
;; ;;
Shutdown) Suspend)
systemctl poweroff systemctl suspend
;; ;;
Lock) Lock)
loginctl lock-session loginctl lock-session $(loginctl show-user $USER -p Sessions | cut -d'=' -f2)
;;
Exit)
swaymsg exit
;; ;;
*) *)
exit 1 exit 1

View file

@ -1,19 +1 @@
# Fix java on wayland XDG_SESSION_TYPE=wayland
_JAVA_AWT_WM_NONREPARENTING=1
_JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel'
# Enable qt5 theming and wayland support
QT_QPA_PLATFORMTHEME=qt5ct
QT_QPA_PLATFORM=wayland-egl
QT_WAYLAND_DISABLE_WINDOWDECORATION=1
# Firefox
MOZ_ENABLE_WAYLAND=1
MOZ_USE_XINPUT2=1
MOZ_WEBRENDER=1
# Fix redshift on wlroots
WLR_DRM_NO_ATOMIC=1
# Use wayland in SDL2
SDL_VIDEODRIVER=wayland