aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-10-27 14:08:47 +0100
committerdec05eba <dec05eba@protonmail.com>2024-10-27 14:08:47 +0100
commitc6b5ff05ecf4072ab83d5618eb41937b0db489c8 (patch)
tree91c46f22a0c4fd4e8d338691d80992e7f559d643
parent80ff6582a95854712221bf4c84252584566ac041 (diff)
Add systemd service
-rw-r--r--README.md3
-rw-r--r--extra/gpu-screen-recorder-ui.service11
-rw-r--r--meson.build6
-rw-r--r--meson_options.txt1
4 files changed, 20 insertions, 1 deletions
diff --git a/README.md b/README.md
index 49c15cc..8dfdb15 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,9 @@
# GPU Screen Recorder UI
A fullscreen overlay UI for [GPU Screen Recorder](https://git.dec05eba.com/gpu-screen-recorder/about/) in the style of ShadowPlay.
+# Usage
+Run `gsr-ui` and press `Alt+Z` to show/hide the UI. You can start the overlay UI at system startup by running `systemctl enable --now --user gpu-screen-recorder-ui`.
+
# Dependencies
GPU Screen Recorder UI uses meson build system so you need to install `meson` to build GPU Screen Recorder UI.
diff --git a/extra/gpu-screen-recorder-ui.service b/extra/gpu-screen-recorder-ui.service
new file mode 100644
index 0000000..8abb3de
--- /dev/null
+++ b/extra/gpu-screen-recorder-ui.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=GPU Screen Recorder UI Service
+
+[Service]
+ExecStart=gsr-ui
+KillSignal=SIGINT
+Restart=on-failure
+RestartSec=5s
+
+[Install]
+WantedBy=default.target \ No newline at end of file
diff --git a/meson.build b/meson.build
index 82b00ca..edd90b8 100644
--- a/meson.build
+++ b/meson.build
@@ -58,4 +58,8 @@ executable(
)
install_subdir('images', install_dir : gsr_ui_resources_path)
-install_subdir('fonts', install_dir : gsr_ui_resources_path) \ No newline at end of file
+install_subdir('fonts', install_dir : gsr_ui_resources_path)
+
+if get_option('systemd') == true
+ install_data(files('extra/gpu-screen-recorder-ui.service'), install_dir : 'lib/systemd/user')
+endif \ No newline at end of file
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 0000000..9d0b960
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1 @@
+option('systemd', type : 'boolean', value : true, description : 'Install systemd service file')