diff options
| author | srdusr <trevorgray@srdusr.com> | 2023-08-01 15:32:24 +0200 |
|---|---|---|
| committer | srdusr <trevorgray@srdusr.com> | 2023-08-01 15:32:24 +0200 |
| commit | 4595be05ff14bca88141394d1a6e52d9c417e317 (patch) | |
| tree | 49b64fc3d2eb80a42d196cf14d25dea4b3807f00 /dropdown | |
| parent | bfe312e506f559fb1aec42e31c0842f6eb09c0d5 (diff) | |
| download | dotfiles-4595be05ff14bca88141394d1a6e52d9c417e317.tar.gz dotfiles-4595be05ff14bca88141394d1a6e52d9c417e317.zip | |
Adjustments to script (wmctrl function)
Diffstat (limited to 'dropdown')
| -rwxr-xr-x | dropdown | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -181,8 +181,9 @@ if [ -z "$my_term" ]; then esac fi -# Function to toggle the visibility of the dropdown terminal -toggle_dropdown() { + +# Check if wmctrl is available +if command -v wmctrl > /dev/null 2>&1; then # Get the window ID of the dropdown terminal id="$(wmctrl -l | grep "dropdown" | awk '{print $1}')" @@ -197,11 +198,6 @@ toggle_dropdown() { wmctrl -i -r "$id" -b add,hidden fi fi -} - -# Check if wmctrl is available -if command -v wmctrl > /dev/null 2>&1; then - toggle_dropdown else echo "Window manipulation requires wmctrl. Install it and try again." exit 1 |
