Skip to content

Commit

Permalink
Custom keybindings
Browse files Browse the repository at this point in the history
  • Loading branch information
lttr committed Jan 8, 2025
1 parent 0aa9d41 commit 8302604
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
18 changes: 18 additions & 0 deletions bootstrap/configuration/gnomeKeybindings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,24 @@ function customGnomeKeybinding(
}

const customGnomeKeybindings = [
...customGnomeKeybinding(
0,
"Center window",
"center-window",
"<Primary><Super>c",
),
...customGnomeKeybinding(
0,
"Margin window",
"margin-window",
"<Primary><Super>m",
),
...customGnomeKeybinding(
0,
"Minimize but active",
"minimize-but-active",
"<Primary><Super>b",
),
...customGnomeKeybinding(0, "Sleep", "systemctl suspend", "<Super>u"),
...customGnomeKeybinding(
1,
Expand Down
11 changes: 11 additions & 0 deletions scripts/desktop/minimize-but-active.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

# Get the active window ID
ACTIVE_WINDOW=$(xdotool getactivewindow)

# Get all window IDs and minimize each one except the active window
for WINDOW in $(xdotool search --onlyvisible ".*"); do
if [ "$WINDOW" != "$ACTIVE_WINDOW" ]; then
xdotool windowminimize $WINDOW
fi
done

0 comments on commit 8302604

Please sign in to comment.