Last active
August 28, 2023 08:44
-
-
Save naranyala/60ebd2b267b914e16c1397413a194ea6 to your computer and use it in GitHub Desktop.
make awesome window manager fullscreen and hide the tmux status bar (bonus: install neovim zen-mode && harpoon plugin)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Check if we're in an Awesome WM session | |
if [ -z "$DESKTOP_SESSION" ] || [ "$DESKTOP_SESSION" != "awesome" ]; then | |
echo "You are not in an Awesome WM session." | |
exit 1 | |
fi | |
# Function to toggle fullscreen with Control+Shift+F11 | |
toggle_fullscreen() { | |
# Simulate pressing Control+Shift+F11 to toggle fullscreen | |
xdotool key ctrl+shift+F11 | |
sleep 0.5 | |
} | |
# Function to toggle the tmux status line | |
toggle_status() { | |
local current_status="$(tmux show-option -g status)" | |
if [ "$current_status" = "status on" ]; then | |
tmux set-option -g status off | |
else | |
tmux set-option -g status on | |
fi | |
tmux display-message "TMUX zen-mode: $current_status" | |
} | |
# Run the functions sequentially, first toggle fullscreen, then toggle status | |
toggle_fullscreen ; toggle_status |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
if they overlap, just split them into two scripts, one to enable awesomewm fullscreen, and the other to hide the tmux status bar