From ce22b8347c43d6a93765bf88fb1f0499a0f672a3 Mon Sep 17 00:00:00 2001 From: Hunter Jozwiak Date: Sat, 21 Sep 2024 15:09:05 -0400 Subject: [PATCH] Fix for reloading and restarting the configuration. In Sway, you say "command" instead of "run_command" Additionally, take out the restart since that's not available in Sway. --- i38.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/i38.sh b/i38.sh index 799b011..4f1c3f6 100755 --- a/i38.sh +++ b/i38.sh @@ -625,10 +625,16 @@ bindsym g exec ${i3Path}/scripts/game_controler.sh -s, mode "default" bindsym apostrophe exec --no-startup-id ${i3Path}/scripts/window_list.sh, mode "default" # Restart orca bindsym Shift+o exec $(command -v orca) --replace, mode "default" -# reload the configuration file -bindsym Control+semicolon exec bash -c '$i3msg -t run_command reload && spd-say -P important -Cw "I38 Configuration reloaded."', mode "default" -# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) -bindsym Control+Shift+semicolon exec $i3msg -t run_command restart && spd-say -P important -Cw "I3 restarted.", mode "default" +$(if [[ $usingSway -eq 0 ]]; then + echo "# reload the configuration file" + echo "bindsym Control+semicolon exec bash -c '$i3msg -t command reload && spd-say -P important -Cw "I38 Configuration reloaded."', mode "default"" + +else + echo "# reload the configuration file" + echo "bindsym Control+semicolon exec bash -c '$i3msg -t run_command reload && spd-say -P important -Cw "I38 Configuration reloaded."', mode "default"" + echo "# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)" + echo "bindsym Control+Shift+semicolon exec $i3msg -t run_command restart && spd-say -P important -Cw "I3 restarted.", mode "default"" +fi) # Run dialog with exclamation bindsym Shift+exclam exec ${i3Path}/scripts/run_dialog.sh, mode "default" # exit i3 (logs you out of your X session)