Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/interactive aliases #154

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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="[email protected]" },
]
Expand Down
6 changes: 5 additions & 1 deletion src/dmenu_extended/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 an interactive shell session
}


Expand Down Expand Up @@ -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", "/usr/bin/env bash")
command = shell + " -i -c " + " ".join(command)
return subprocess.call(command, shell=self.prefs["interactive_shell"])

def cache_regenerate(self, message=True):
if message:
Expand Down