Skip to content

Instantly share code, notes, and snippets.

@naranyala
Last active August 28, 2023 08:44
Show Gist options
  • Save naranyala/60ebd2b267b914e16c1397413a194ea6 to your computer and use it in GitHub Desktop.
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)
#!/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
@naranyala
Copy link
Author

if they overlap, just split them into two scripts, one to enable awesomewm fullscreen, and the other to hide the tmux status bar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment