From d6ac253fb200afb4a50711957bb7b9c836608b0f Mon Sep 17 00:00:00 2001 From: Alexander Oakman Date: Tue, 20 Aug 2024 00:11:26 +0300 Subject: [PATCH 1/4] Fix that rofi doesn't execute commands Using the default pattern for the run-shell-command option in the rofi binding allows it to run applications and commands. --- etc/sway/variables | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/sway/variables b/etc/sway/variables index 5ddcf7b..4f31a77 100644 --- a/etc/sway/variables +++ b/etc/sway/variables @@ -21,7 +21,7 @@ set $term_float alacritty --class floating_shell -e set $rofi_theme "* {lightbg: $base; background: $base; lightfg: $blue; foreground: $text; border-color: $blue;} window {border: 2;}" # Your preferred application launcher -set $menu rofi -show combi -combi-modi "drun,run" -terminal $term -ssh-command "{terminal} {ssh-client} {host} [-p {port}]" -run-shell-command "{terminal} {cmd}" -show-icons -font "$gui-font" +set $menu rofi -show combi -combi-modi "drun,run" -terminal "$term" -ssh-command "{terminal} {ssh-client} {host} [-p {port}]" -show-icons -font "$gui-font" # Add --to-code to bindsym, support for non-latin layouts set $bindsym bindsym --to-code From 418cc0a2fcbb967e7380c1d4fc95bb3837543be9 Mon Sep 17 00:00:00 2001 From: Alexander Oakman Date: Tue, 20 Aug 2024 00:17:58 +0300 Subject: [PATCH 2/4] Fix the rofi binding Update the rofi binding according to the modern syntax (1.7.3+). Remove redundant options. --- etc/sway/variables | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/sway/variables b/etc/sway/variables index 4f31a77..50418e0 100644 --- a/etc/sway/variables +++ b/etc/sway/variables @@ -21,7 +21,7 @@ set $term_float alacritty --class floating_shell -e set $rofi_theme "* {lightbg: $base; background: $base; lightfg: $blue; foreground: $text; border-color: $blue;} window {border: 2;}" # Your preferred application launcher -set $menu rofi -show combi -combi-modi "drun,run" -terminal "$term" -ssh-command "{terminal} {ssh-client} {host} [-p {port}]" -show-icons -font "$gui-font" +set $menu rofi -show combi -modes combi -combi-modes "drun,run" -terminal "$term" -show-icons -font "$gui-font" # Add --to-code to bindsym, support for non-latin layouts set $bindsym bindsym --to-code From 94b021990203c64eafbb6aa96fd1a204ecccdb01 Mon Sep 17 00:00:00 2001 From: Alexander Oakman Date: Tue, 20 Aug 2024 01:05:06 +0300 Subject: [PATCH 3/4] Fix that nwg-drawer doesn't run applications Providing a terminal emulator to the nwg-drawer allows it to run applications. --- etc/sway/variables | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/sway/variables b/etc/sway/variables index 50418e0..a95465b 100644 --- a/etc/sway/variables +++ b/etc/sway/variables @@ -111,7 +111,7 @@ set $cliphist_store '[ -x "$(command -v wl-paste)" ] && [ -x "$(command -v cliph set $cliphist_watch '[ -x "$(command -v wl-paste)" ] && [ -x "$(command -v cliphist)" ] && wl-paste --watch pkill -RTMIN+9 waybar' # Start nwg-drawer as a daemon -set $nwg_drawer_daemon '[ -x "$(command -v nwg-drawer)" ] && nwg-drawer -r' +set $nwg_drawer_daemon '[ -x "$(command -v nwg-drawer)" ] && nwg-drawer -r -term "$term"' # Start playerctl as daemon set $watch_playerctl '[ -x "$(command -v playerctl)" ] && pkill playerctl; playerctl -a metadata --format \'{{status}} {{title}}\' --follow | while read line; do pkill -RTMIN+5 waybar; done' From 89a7a823ad07299bd0047df1b0618dc5efe04dd2 Mon Sep 17 00:00:00 2001 From: Alexander Oakman Date: Tue, 20 Aug 2024 02:16:06 +0300 Subject: [PATCH 4/4] Use the terminal alias in term_float command --- etc/sway/variables | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/sway/variables b/etc/sway/variables index a95465b..3c41955 100644 --- a/etc/sway/variables +++ b/etc/sway/variables @@ -15,7 +15,7 @@ set $flock /usr/share/sway/scripts/flock.sh # Your preferred terminal emulator set $term alacritty set $term_cwd $term --working-directory "$(/usr/share/sway/scripts/swaycwd.sh 2>/dev/null || echo $HOME)" -set $term_float alacritty --class floating_shell -e +set $term_float $term --class floating_shell -e # Rofi theme set $rofi_theme "* {lightbg: $base; background: $base; lightfg: $blue; foreground: $text; border-color: $blue;} window {border: 2;}"