From 3fd57a233767a6d412bc95935f0615889d77d977 Mon Sep 17 00:00:00 2001 From: joygnu Date: Tue, 16 Jul 2024 00:06:38 +0200 Subject: [PATCH] cmus script --- home/hyprland/cmus.sh | 9 +++++++++ home/hyprland/default.nix | 3 +-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100755 home/hyprland/cmus.sh diff --git a/home/hyprland/cmus.sh b/home/hyprland/cmus.sh new file mode 100755 index 0000000..375e67f --- /dev/null +++ b/home/hyprland/cmus.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +if screen -list | grep -q '\.cmus'; then + alacritty -e screen -r cmus +else + screen -dmS cmus cmus & + alacritty -e screen -r cmus +fi + diff --git a/home/hyprland/default.nix b/home/hyprland/default.nix index bf9bd5b..6774748 100644 --- a/home/hyprland/default.nix +++ b/home/hyprland/default.nix @@ -42,7 +42,6 @@ "ags -c ~/nix/home/ags/bar/config.js &" "wl-paste --type text --watch cliphist store" "wl-paste --type image --watch cliphist store" - "screen -dmS cmus cmus &" ]; @@ -70,7 +69,7 @@ "$mod, G, exec, sh ~/nix/home/hyprland/gamemode.sh" # cmus - "$mod, D, exec, alacritty -e screen -r cmus" + "$mod, D, exec, sh ~/nix/home/hyprland/cmus.sh" "$mod, P, exec, cmus-remote --pause" "$mod, comma, exec, cmus-remote --prev" "$mod, period, exec, cmus-remote --next"