Skip to content

Commit

Permalink
Show/hide tab deco global toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
jmmaranan committed Feb 26, 2023
1 parent be31147 commit 30b2066
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Forge is a GNOME Shell extension that provides tiling/window management.
- Works on GNOME 3.36+ (feature-freeze) and 40. X11 and Wayland
- Swap current window with the last active window
- Auto Split or Quarter Tiling
- Show/hide tab decoration via keybinding https://github.com/jmmaranan/forge/issues/180

![image](https://user-images.githubusercontent.com/348125/146386593-8f53ea8b-2cf3-4d44-a613-bbcaf89f9d4a.png)

Expand All @@ -42,12 +43,7 @@ Forge is a GNOME Shell extension that provides tiling/window management.
### New
| Action | Shortcut |
| --- | --- |
| Snap active window left two thirds | `<Ctrl> + <Alt> + e` |
| Snap active window right two thirds | `<Ctrl> + <Alt> + t` |
| Snap active window left third | `<Ctrl> + <Alt> + d` |
| Snap active window right third | `<Ctrl> + <Alt> + g` |
| Persist toggle floating for active window | `<Super> + c` |
| Persist toggle floating for active window and its window class | `<Super><Shift> + c` |
| Show/hide tab decoration | `<Ctrl> + <Alt> + y` |

### Current

Expand Down Expand Up @@ -78,6 +74,12 @@ Forge is a GNOME Shell extension that provides tiling/window management.
| Toggle stacked layout | `<Shift> + <Super> + s` |
| Toggle tabbed layout | `<Shift> + <Super> + t` |
| Activate tile drag-drop | `Start dragging - Mod key configuration in prefs` |
| Snap active window left two thirds | `<Ctrl> + <Alt> + e` |
| Snap active window right two thirds | `<Ctrl> + <Alt> + t` |
| Snap active window left third | `<Ctrl> + <Alt> + d` |
| Snap active window right third | `<Ctrl> + <Alt> + g` |
| Persist toggle floating for active window | `<Super> + c` |
| Persist toggle floating for active window and its window class | `<Super><Shift> + c` |

For any shortcut conflicts, the user has to manually configure those for now from the
`GNOME Control Center > Keyboard > Customize Shortcuts`. https://github.com/jmmaranan/forge/issues/37
Expand Down
9 changes: 2 additions & 7 deletions window.js
Original file line number Diff line number Diff line change
Expand Up @@ -742,14 +742,9 @@ var WindowManager = GObject.registerClass(
if (!focusNodeWindow) return;
if (!this.ext.settings.get_boolean("tabbed-tiling-mode-enabled")) return;

currentLayout = focusNodeWindow.parentNode.layout;
let showTabs = this.ext.settings.get_boolean("showtab-decoration-enabled");
this.ext.settings.set_boolean("showtab-decoration-enabled", !showTabs);

if (currentLayout === Tree.LAYOUT_TYPES.TABBED) {
let showTabs = this.ext.settings.get_boolean("showtab-decoration-enabled");
this.ext.settings.set_boolean("showtab-decoration-enabled", !showTabs);
} else {
return;
}
this.unfreezeRender();
this.tree.attachNode = focusNodeWindow.parentNode;
this.renderTree("showtab-decoration-enabled");
Expand Down

0 comments on commit 30b2066

Please sign in to comment.