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:
Locale:
dotfiles:
- f_locale.conf
- f_locale.gen
- f_locale.conf
- f_locale.gen
Pacman:
dotfiles:
- f_pacman.conf
- f_pacserve.service.conf
- f_pacman-dl.service
- f_pacman-dl.timer
- f_pacman.conf
- f_pacserve.service.conf
- f_pacman-dl.service
- f_pacman-dl.timer
Mirkwood:
dotfiles:
- f_cryptissue
- f_welcomemessage.conf
- d_bin
- f_adb.service
- f_bluetooth.conf
- f_iwd@.service
- f_loader.conf
- f_sshd_config
- f_logind.conf
- f_60-uinput-permissions.rules
- f_freetype2.sh
- f_fonts.conf
- f_timesyncd.conf
- f_99-sysctl.conf
- f_99-lowbat.rules
- f_ignore
- f_zsh.hook
- f_sway@.service
- f_getty.conf
- f_environment
- f_cryptissue
- f_welcomemessage.conf
- d_bin
- f_adb.service
- f_bluetooth.conf
- f_iwd@.service
- f_loader.conf
- f_sshd_config
- f_logind.conf
- f_60-uinput-permissions.rules
- f_freetype2.sh
- f_fonts.conf
- f_timesyncd.conf
- f_99-sysctl.conf
- f_99-lowbat.rules
- f_ignore
- f_zsh.hook
- f_sway@.service
include:
- Locale
- Pacman
- Locale
- Pacman
Rivendell:
include:
- Locale
- Pacman
- Locale
- Pacman
dotfiles:
- f_bluetooth.conf
- f_60-uinput-permissions.rules
- f_timesyncd.conf
- f_sshd_config
- f_nightly-reboot.service
- f_nightly-reboot.timer
- f_bluetooth.conf
- f_60-uinput-permissions.rules
- f_timesyncd.conf
- f_sshd_config
- f_nightly-reboot.service
- f_nightly-reboot.timer

View file

@ -2,4 +2,4 @@
output * bg $wallpaper fill
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
# Start applications in specific workspaces
assign [title="Telegram"] workspace 3
assign [app_id="telegramdesktop"] workspace 3
assign [app_id="thunderbird"] workspace 4
# Automatically switch to urgent workspace

View file

@ -39,7 +39,7 @@ bindsym $mod+Backspace exec makoctl invoke
bindsym Control+Escape exec makoctl dismiss
# 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
bindsym $mod+h focus left

View file

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

View file

@ -1,31 +1,17 @@
[Unit]
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]
ExecStartPre=/usr/bin/chvt %I
ExecStart=/usr/bin/dbus-launch --exit-with-session /usr/bin/sway
TTYPath=/dev/tty%I
TTYReset=yes
TTYVHangup=yes
TTYVTDisallocate=yes
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
Type=simple
EnvironmentFile=-%h/.config/sway/env
ExecStart=/usr/bin/dbus-run-session /usr/bin/sway
Restart=on-failure
RestartSec=1
TimeoutStopSec=10
[Install]
WantedBy=graphical.target
Alias=display-manager.service
WantedBy=default.target

View file

@ -5,7 +5,7 @@ PartOf=graphical-session.target
[Service]
Type=simple
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
[Install]

View file

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

View file

@ -1,19 +1 @@
# Fix java on 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
XDG_SESSION_TYPE=wayland