Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add stacked tiles feature to tiling mode #481

Merged
merged 23 commits into from
Sep 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
0f3d3b4
feat(core): Add arena class for managing slottable collections
mmstick Aug 5, 2020
977f28a
chore(core): Rectangle may accept Rectangular contains and diff
mmstick Aug 5, 2020
566f955
feat(tiling): Add the stacked tiles feature to tiling mode
mmstick Aug 5, 2020
fa42d49
fix: Perform workspace management in Pop Shell
mmstick Sep 10, 2020
4c75908
fix: Wait for idle to retile after unmaximization
mmstick Sep 15, 2020
a0653c5
fix: Restack stacks on workspace movements
mmstick Sep 16, 2020
0a3f153
fix: Floating windows now get placed in an approximate same location …
mmstick Sep 16, 2020
32c9d3b
fix: Stop tiling windows that move across monitors
mmstick Sep 16, 2020
bb80b55
fix: Support pushing workspaces down and moving a window to a new upp…
mmstick Sep 16, 2020
b90eb8a
fix(smart-gaps): Fix smart gap movements between monitors
mmstick Sep 22, 2020
5476e69
fix: Stack visibility after workspace switch
mmstick Sep 18, 2020
f5c0880
fix: Add pop-shell-border-normal class to stack borders
mmstick Sep 22, 2020
c1cc3d4
fix: apply hint for maximized screen
jmmaranan Sep 23, 2020
ed802ef
fix: Remove stack association when tiling is toggled
mmstick Sep 23, 2020
5a81feb
fix: focus when windows are unstacked
jmmaranan Sep 23, 2020
3b21d27
fix: Also change workspace of windows in stacks on a new top level wo…
mmstick Sep 23, 2020
f685d87
fix: redirect all hint logic to the active window
jmmaranan Sep 23, 2020
5b26250
fix: re-tile when logging back in
jmmaranan Sep 24, 2020
a465ad8
fix: hide stack tabs when full screened
jmmaranan Sep 24, 2020
4fc8df1
fix: Windows moved off a display with keyboard are no longer placed i…
mmstick Sep 24, 2020
24653cc
fix: Debounce focus triggers so windows are more likely to be placed …
mmstick Sep 24, 2020
6b05e18
fix: Active hint now in correct place after un-tiling a stacked window
mmstick Sep 24, 2020
bba0fde
fix: remove excessive polling hint restack
jmmaranan Sep 24, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,22 @@
.pop-shell-gaps-entry {
/* Seems to get the width just right to fit 3 digits */
width: 75px;
}
}

.pop-shell-tab {
border: 1px solid #333;
color: #000;
padding: 0 1em;
}

.pop-shell-tab-active {
background: #FBB86C;
}

.pop-shell-tab-inactive {
background: #9B8E8A;
}

.pop-shell-tab-urgent {
background: #D00;
}
18 changes: 18 additions & 0 deletions light.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,21 @@
/* Seems to get the width just right to fit 3 digits */
width: 75px;
}

.pop-shell-tab {
border: 1px solid #333;
color: #000;
padding: 0 1em;
}

.pop-shell-tab-active {
background: #FFAD00;
}

.pop-shell-tab-inactive {
background: #9B8E8A;
}

.pop-shell-tab-urgent {
background: #D00;
}
8 changes: 4 additions & 4 deletions rebuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ dconf write ${KEYS_GNOME_WM}/move-to-monitor-down "@as []"

# Super + direction keys, move window left and right monitors, or up and down workspaces
# Move window one monitor to the left
dconf write ${KEYS_GNOME_WM}/move-to-monitor-left "['<Shift><Super>Left','<Shift><Super>${left}']"
dconf write ${KEYS_GNOME_WM}/move-to-monitor-left "@as []"
# Move window one workspace down
dconf write ${KEYS_GNOME_WM}/move-to-workspace-down "['<Shift><Super>Down','<Shift><Super>${down}']"
dconf write ${KEYS_GNOME_WM}/move-to-workspace-down "@as []"
# Move window one workspace up
dconf write ${KEYS_GNOME_WM}/move-to-workspace-up "['<Shift><Super>Up','<Shift><Super>${up}']"
dconf write ${KEYS_GNOME_WM}/move-to-workspace-up "@as []"
# Move window one monitor to the right
dconf write ${KEYS_GNOME_WM}/move-to-monitor-right "['<Shift><Super>Right','<Shift><Super>${right}']"
dconf write ${KEYS_GNOME_WM}/move-to-monitor-right "@as []"

# Super + Ctrl + direction keys, change workspaces, move focus between monitors
# Move to workspace below
Expand Down
42 changes: 42 additions & 0 deletions schemas/org.gnome.shell.extensions.pop-shell.gschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,16 @@
</key>

<!-- Window Management Keys -->
<key type="as" name="toggle-stacking">
<default><![CDATA[['s']]]></default>
<summary>Toggle stacking mode inside management mode</summary>
</key>

<key type="as" name="toggle-stacking-global">
<default><![CDATA[['<Super>s']]]></default>
<summary>Toggle stacking mode outside management mode</summary>
</key>

<key type="as" name="management-orientation">
<default><![CDATA[['o']]]></default>
<summary>Toggle tiling orientation</summary>
Expand Down Expand Up @@ -174,5 +184,37 @@
<default><![CDATA[['<Primary>Right','<Primary>l']]]></default>
<summary>Swap window right</summary>
</key>

<!-- Workspace Management -->

<key type="as" name="pop-workspace-down">
<default><![CDATA[['<Super><Shift>Down','<Super><Shift>j']]]></default>
<summary>Move window to the lower workspace</summary>
</key>

<key type="as" name="pop-workspace-up">
<default><![CDATA[['<Super><Shift>Up','<Super><Shift>k']]]></default>
<summary>Move window to the upper workspace</summary>
</key>

<key type="as" name="pop-monitor-down">
<default><![CDATA[['<Super><Shift><Primary>Down','<Super><Shift><Primary>j']]]></default>
<summary>Move window to the lower monitor</summary>
</key>

<key type="as" name="pop-monitor-up">
<default><![CDATA[['<Super><Shift><Primary>Up','<Super><Shift><Primary>k']]]></default>
<summary>Move window to the upper monitor</summary>
</key>

<key type="as" name="pop-monitor-left">
<default><![CDATA[['<Super><Shift>Left','<Super><Shift>h']]]></default>
<summary>Move window to the leftward monitor</summary>
</key>

<key type="as" name="pop-monitor-right">
<default><![CDATA[['<Super><Shift>Right','<Super><Shift>l']]]></default>
<summary>Move window to the rightward monitor</summary>
</key>
</schema>
</schemalist>
42 changes: 42 additions & 0 deletions src/arena.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/** Hop slot arena allocator */
export class Arena<T> {
private slots: Array<null | T> = new Array();
private unused: Array<number> = new Array()

truncate(n: number) {
this.slots.splice(n);
this.unused.splice(n);
}

get(n: number): null | T {
return this.slots[n];
}

insert(v: T): number {
let n;
const slot = this.unused.pop();
if (slot !== undefined) {
n = slot;
this.slots[n] = v;
} else {
n = this.slots.length;
this.slots.push(v);
}

return n;
}

remove(n: number): null | T {
if (this.slots[n] === null) return null;
const v = this.slots[n];
this.slots[n] = null;
this.unused.push(n);
return v;
}

* values(): IterableIterator<T> {
for (const v of this.slots) {
if (v !== null) yield v;
}
}
}
Loading