From 02c5daf2bc25439a1c9dc715510616eddb88ec11 Mon Sep 17 00:00:00 2001 From: zappaboy Date: Sat, 20 Aug 2022 00:55:33 +0200 Subject: [PATCH 1/6] Added interactive process call --- src/dmenu_extended/main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/dmenu_extended/main.py b/src/dmenu_extended/main.py index f7b8287..2e771f1 100755 --- a/src/dmenu_extended/main.py +++ b/src/dmenu_extended/main.py @@ -203,6 +203,7 @@ def unsatisfied_plugin_requirements(plugin): "indicator_edit": "*", # Symbol to indicate an item will launch an editor "indicator_alias": "", # Symbol to indicate an aliased command "prompt": "Open:", # Prompt + "interactive_shell": False, # Run commands in interactive mode } @@ -750,7 +751,10 @@ def execute(self, command, fork=None): print("Command converted into:") print(command) - return subprocess.call(command) + if self.prefs["interactive_shell"] is True: + shell = os.environ.get('SHELL', "/bin/bash") + command = shell + " -i -c " + " ".join(command) + return subprocess.call(command, shell=self.prefs["interactive_shell"]) def cache_regenerate(self, message=True): if message: From f5c5fbca485f0c7848d65d8c4a2a3964128413dd Mon Sep 17 00:00:00 2001 From: zappaboy Date: Sat, 20 Aug 2022 00:59:42 +0200 Subject: [PATCH 2/6] Fixed lint quote warning; --- src/dmenu_extended/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dmenu_extended/main.py b/src/dmenu_extended/main.py index 2e771f1..e5c9da4 100755 --- a/src/dmenu_extended/main.py +++ b/src/dmenu_extended/main.py @@ -752,7 +752,7 @@ def execute(self, command, fork=None): print(command) if self.prefs["interactive_shell"] is True: - shell = os.environ.get('SHELL', "/bin/bash") + shell = os.environ.get("SHELL", "/bin/bash") command = shell + " -i -c " + " ".join(command) return subprocess.call(command, shell=self.prefs["interactive_shell"]) From 0a30a44f1f006851d3fb45db9c61cd9099a2ce15 Mon Sep 17 00:00:00 2001 From: ZappaBoy Date: Sat, 5 Nov 2022 16:10:19 +0100 Subject: [PATCH 3/6] Run commands in interactive mode --- src/dmenu_extended/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dmenu_extended/main.py b/src/dmenu_extended/main.py index e5c9da4..52dfe61 100755 --- a/src/dmenu_extended/main.py +++ b/src/dmenu_extended/main.py @@ -203,7 +203,7 @@ def unsatisfied_plugin_requirements(plugin): "indicator_edit": "*", # Symbol to indicate an item will launch an editor "indicator_alias": "", # Symbol to indicate an aliased command "prompt": "Open:", # Prompt - "interactive_shell": False, # Run commands in interactive mode + "interactive_shell": False, # Run commands in an interactive shell session } @@ -752,7 +752,7 @@ def execute(self, command, fork=None): print(command) if self.prefs["interactive_shell"] is True: - shell = os.environ.get("SHELL", "/bin/bash") + shell = os.environ.get("SHELL", "/usr/bin/env bash") command = shell + " -i -c " + " ".join(command) return subprocess.call(command, shell=self.prefs["interactive_shell"]) From 0f292dd4b3355aa2daff730d12a43fac4d9a8e60 Mon Sep 17 00:00:00 2001 From: ZappaBoy Date: Sat, 5 Nov 2022 16:10:19 +0100 Subject: [PATCH 4/6] Changed interactive shell comment; Moved interactive shell to "/usr/bin/env bash" to improve compatibility; Referred to #154 #discussion_r1014608222. --- src/dmenu_extended/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dmenu_extended/main.py b/src/dmenu_extended/main.py index e5c9da4..52dfe61 100755 --- a/src/dmenu_extended/main.py +++ b/src/dmenu_extended/main.py @@ -203,7 +203,7 @@ def unsatisfied_plugin_requirements(plugin): "indicator_edit": "*", # Symbol to indicate an item will launch an editor "indicator_alias": "", # Symbol to indicate an aliased command "prompt": "Open:", # Prompt - "interactive_shell": False, # Run commands in interactive mode + "interactive_shell": False, # Run commands in an interactive shell session } @@ -752,7 +752,7 @@ def execute(self, command, fork=None): print(command) if self.prefs["interactive_shell"] is True: - shell = os.environ.get("SHELL", "/bin/bash") + shell = os.environ.get("SHELL", "/usr/bin/env bash") command = shell + " -i -c " + " ".join(command) return subprocess.call(command, shell=self.prefs["interactive_shell"]) From 2034ce0a8c17c21ef78da92b85c1dc18288d5b8b Mon Sep 17 00:00:00 2001 From: zappaboy Date: Wed, 9 Nov 2022 18:21:42 +0100 Subject: [PATCH 5/6] Increased version; --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 11f8676..192c242 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "dmenu_extended" -version = "1.1.4" +version = "1.2.0" authors = [ { name="Mark Hedley Jones", email="markhedleyjones@gmail.com" }, ] From 26745387370e393eba10cd5773bfdf2af9c5a6ad Mon Sep 17 00:00:00 2001 From: Mark Hedley Jones Date: Mon, 21 Nov 2022 05:49:36 +0900 Subject: [PATCH 6/6] Update README.md Add acknowledgement --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index db0228d..45a9e19 100644 --- a/README.md +++ b/README.md @@ -290,3 +290,4 @@ For those looking to improve the code, the code uses [Black](https://github.com/ * [**nanobecquerel**](https://github.com/nanobecquerel) for improving systemd integration * [**fat-fighter**](https://github.com/fat-fighter) for bug fixes and solving GitHub issues * [**vestingz**](https://github.com/vestingz) for Incron and pacman integration. +* [**ZappaBoy**](https://github.com/ZappaBoy) for improving alias/shell integration