From 2763057d778b0af042e33c4eaecb5b9a6e51713a Mon Sep 17 00:00:00 2001 From: Massaki Archambault Date: Wed, 8 Nov 2023 23:06:25 -0500 Subject: [PATCH] add sunshine --- files/.config/sway/config | 12 ++++-------- .../default.target.wants/modprobed-db.service | 1 - .../systemd/user/default.target.wants/mpd.service | 1 - .../pipewire-media-session.service | 1 - files/.config/systemd/user/sunshine.service | 15 +++++++++++++++ .../sway-session.target.wants/sunshine.service | 1 + files/.local/bin/gamemode-start | 2 ++ files/.local/bin/gamemode-stop | 2 ++ 8 files changed, 24 insertions(+), 11 deletions(-) delete mode 120000 files/.config/systemd/user/default.target.wants/modprobed-db.service delete mode 120000 files/.config/systemd/user/default.target.wants/mpd.service delete mode 120000 files/.config/systemd/user/pipewire.service.wants/pipewire-media-session.service create mode 100644 files/.config/systemd/user/sunshine.service create mode 120000 files/.config/systemd/user/sway-session.target.wants/sunshine.service diff --git a/files/.config/sway/config b/files/.config/sway/config index cea953e..e54ee31 100644 --- a/files/.config/sway/config +++ b/files/.config/sway/config @@ -101,10 +101,9 @@ workspace $ws8 output $output1 VGA-1 workspace $ws9 output $output1 VGA-1 workspace $ws10 output $output1 VGA-1 output $output1 { - # we need to explicitly select the mode, otherwise - # sway will select 4k 30Hz - position 0 0 - mode 2560x1440@60Hz + position 0 270 + # we need to explicitly select the mode + mode 2560x1440@144Hz adaptive_sync on } @@ -112,13 +111,10 @@ set $output2 "Ancor Communications Inc ASUS VH238 BALMIB547836" workspace $ws1 output $output2 eDP-1 workspace $ws2 output $output2 eDP-1 output $output2 { - position 2560 -270 + position 2560 0 transform 270 } -# Disable this output for consistency when running with discrete GPU enabled -output "DP-3" disable - ### Input configuration # mod key set $mod Mod4 diff --git a/files/.config/systemd/user/default.target.wants/modprobed-db.service b/files/.config/systemd/user/default.target.wants/modprobed-db.service deleted file mode 120000 index 3f0cbde..0000000 --- a/files/.config/systemd/user/default.target.wants/modprobed-db.service +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/systemd/user/modprobed-db.service \ No newline at end of file diff --git a/files/.config/systemd/user/default.target.wants/mpd.service b/files/.config/systemd/user/default.target.wants/mpd.service deleted file mode 120000 index 0524f66..0000000 --- a/files/.config/systemd/user/default.target.wants/mpd.service +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/systemd/user/mpd.service \ No newline at end of file diff --git a/files/.config/systemd/user/pipewire.service.wants/pipewire-media-session.service b/files/.config/systemd/user/pipewire.service.wants/pipewire-media-session.service deleted file mode 120000 index b091abb..0000000 --- a/files/.config/systemd/user/pipewire.service.wants/pipewire-media-session.service +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/systemd/user/pipewire-media-session.service \ No newline at end of file diff --git a/files/.config/systemd/user/sunshine.service b/files/.config/systemd/user/sunshine.service new file mode 100644 index 0000000..8a1e3ba --- /dev/null +++ b/files/.config/systemd/user/sunshine.service @@ -0,0 +1,15 @@ +[Unit] +Description=Sunshine is a self-hosted game stream host for Moonlight. +StartLimitIntervalSec=500 +StartLimitBurst=5 +PartOf=graphical-session.target +Wants=sway-session.target +After=sway-session.target + +[Service] +ExecStart=/usr/bin/sunshine +Restart=on-failure +RestartSec=5s + +[Install] +WantedBy=sway-session.target \ No newline at end of file diff --git a/files/.config/systemd/user/sway-session.target.wants/sunshine.service b/files/.config/systemd/user/sway-session.target.wants/sunshine.service new file mode 120000 index 0000000..c92818f --- /dev/null +++ b/files/.config/systemd/user/sway-session.target.wants/sunshine.service @@ -0,0 +1 @@ +/home/marchambault/.config/systemd/user/sunshine.service \ No newline at end of file diff --git a/files/.local/bin/gamemode-start b/files/.local/bin/gamemode-start index 2a1e9b1..10b8e86 100755 --- a/files/.local/bin/gamemode-start +++ b/files/.local/bin/gamemode-start @@ -1,3 +1,5 @@ #!/bin/bash systemctl --user stop gammastep +sudo systemctl stop docker + diff --git a/files/.local/bin/gamemode-stop b/files/.local/bin/gamemode-stop index 0c3d8a0..cfd6b8b 100755 --- a/files/.local/bin/gamemode-stop +++ b/files/.local/bin/gamemode-stop @@ -1,3 +1,5 @@ #!/bin/bash systemctl --user start gammastep +sudo systemctl start docker +