Giter VIP home page Giter VIP logo

simply-workspaces's Introduction

Simply Workspaces

Gnome 3 workspace indicator with an i3/polybar style.

Note: Similar to polybar, workspaces that have no windows will be hidden

Screenshot from 2021-06-07 20-17-10

Installation

The easiest way to get started is by getting this from the Gnome Extensions site.

Manual installation

System installation

git clone https://github.com/andyrichardson/simply-workspaces.git
cd simply-workspaces
make install

User installation (and/or dev)

git clone https://github.com/andyrichardson/simply-workspaces.git ~/.local/share/gnome-shell/extensions/[email protected]

Nix

See example dotfiles here.

Usage

Make sure you're using static workspaces (required)

dconf write /org/gnome/shell/overrides/dynamic-workspaces false

or for Gnome 42:

dconf write /org/gnome/mutter/dynamic-workspaces false

Suggested setup

Here's some quick tips for getting an i3-like experience in Gnome.

Workspace count

Configure Gnome to use 10 static workspaces.

dconf write /org/gnome/desktop/wm/preferences/num-workspaces 10

Keyboard shortcuts

Set up super+num keyboard shortcut to switch between workspaces.

for i in {1..10}
do
   dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-$i "['<Super>$i']"
   # Remove default binding
   dconf write /org/gnome/shell/keybindings/switch-to-application-$i "@as []"
done
# Workspace 10 -> 0
dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-10 "['<Super>0']"

Set up super+shift+num keyboard shortcut to move windows between workspaces.

for i in {1..10}
do
   dconf write /org/gnome/desktop/wm/keybindings/move-to-workspace-$i "['<Super><Shift>$i']"
done
# Workspace 10 -> 0
dconf write /org/gnome/desktop/wm/keybindings/move-to-workspace-10 "['<Super><Shift>0']"

Tiling

Install Pop Shell for window tiling.

simply-workspaces's People

Contributors

andyrichardson avatar jjmachan avatar joaovs2004 avatar ricpelo avatar spladug avatar yurenchen000 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

simply-workspaces's Issues

Usage with Dash to Panel

Hello! Is there any possible way to use this along with dash to panel? Currently after dash to panel is enabled, this disappears.

[feature request] highlight workspace when a window demands attention

Hello Andy!

Thank you for the great extension!

I'm a recent convert from arch+i3 to fedora+gnome, so I'm using the following for the closes to my former i3 UX:

However there's one thing missing: I was using the script which listens to notifications and runs .e.g.:
wmctrl -r 'Telegram' -b add,demands_attention when Telegram notification comes.

I'm kind of new to Gnome and what is feasible, so do you think it's possible to e.g. highlight a workspace (red background?) where a window needs attention (gets a notification)?

Thanks,
Nikita A

user friendly way to edit workspace icons

hi! i found this extension a couple days ago, and i love it, it's really useful!
one thing that bugged me however was that the workspaces were labelled with numbers, which is quite helpful, but i wanted to use icons as labels. i solved this by just editing my copy of extensions.js to display all workspaces as ๏„‘, which looks nicer imo. i think it'll be nice to have a preferences menu that lets you choose the label style, and the color.
(i tried making it myself but making gnome extensions is confusing XD)

gnome-shell complain last_focus_time (1659504135) is greater than comparison timestamp (401703).

version info

$ gnome-extensions info [email protected]
[email protected]
  Name: Simply Workspaces
  Description: Workspace indication with an i3/polybar style.
  Path: ~/.local/share/gnome-shell/extensions/[email protected]
  URL: https://github.com/andyrichardson/simply-workspaces
  Version: 6
  State: ENABLED

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.4 LTS
Release:	20.04
Codename:	focal

$ gnome-shell --version
GNOME Shell 3.36.9

description

Each time switch workspaces by clicking on the indicator,
gnome-shell complain this warning log:

$ journalctl -f
gnome-shell[2743]: Window manager warning: last_focus_time (1659504134) is greater than comparison timestamp (400564). This most likely represents a buggy client sending inaccurate timestamps in messages such as _NET_ACTIVE_WINDOW. Trying to work around...
gnome-shell[2743]: indicator
gnome-shell[2743]: indicator active
gnome-shell[2743]: Window manager warning: last_focus_time (1659504135) is greater than comparison timestamp (401703). This most likely represents a buggy client sending inaccurate timestamps in messages such as _NET_ACTIVE_WINDOW. Trying to work around...

try to fix

https://github.com/andyrichardson/simply-workspaces/blob/master/extension.js#L71

    const nodeClick = instance.node.connect("clicked", () => {
-      workspace.activate(Date.now() / 1000);
+      workspace.activate(global.get_current_time());
    });

that seems fix the warning log.

// edit ~/.local/share/gnome-shell/extensions/[email protected]/extension.js
// then, restart gnome shell ( Alt+F2 r Enter)

A small mistake in README.md

I spotted a small error. Under the "keyboard shortcuts" section in README.md, there is a block of code which changes the shortcuts of moving windows to different workspaces:

for i in {1..10}
do
   dconf write /org/gnome/desktop/wm/keybindings/move-to-workspace-$i "['<Super><Shift>$i']"
done
# Workspace 10 -> 0
dconf write /org/gnome/desktop/wm/keybindings/move-to-workspace-10 "['<Super><Shift>10']"

The last line should have the value ['<Super><Shift>0'] instead of ['<Super><Shift>10'], just like the code block above it.

All workspace numbers will display when screen sharing on Meet

Describe the bug
I set fixed number of workspace (i.e 6). When not screen sharing, it display active workspace (which is correct), only displaying number which have application opened in it (i.e 1 2 6). But when I screen sharing on Google Meet, it show all the numbers including workspace that doesn't have application open in it (i.e 1 2 3 4 5 6).

To Reproduce

  1. Set fixed number of workspace on gnome setting (i.e 6)
  2. Leave some workspace active and inactive (i.e 1 2 6)
  3. Screen sharing on Google Meet

Expected behavior
The numbers should display only active workspace even on screen sharing

Version Information (please complete the following information):

  • OS: Linux 6.0.11-arch1-1
  • Extension Version: v7
  • Gnome Shell: GNOME 43.1
  • Windowing System: Wayland

Additional context
Not sure this is useful or not, but I use pipewire with chrome enable chrome://flags/#enable-webrtc-pipewire-capturer

Indicator shows all the workspaces, albeit with no windows

Hi!

In the README.md we can read:

Note: Similar to polybar, workspaces that have no windows will be hidden

However, using Pop!_OS 21.04 with 10 static workspaces, the indicator shows all the workspace numbers albeit the workspace has no windows.

For example, here I only have a Firefox window on workspace 1 and a gnome-terminal window on workspace 3. There's no more windows in any workspace. However, indicator shows all the workspace numbers from 1 to 10:

Screenshot from 2021-08-06 20-03-07

Gnome 44 compatibility

Please update for Gnome 44 ๐Ÿ™
This is by far the nicest workspace indicator plugin, would be great to be able to use it again.

Compatibility with Gnome 43

This is my favourite workspace plugin, but I have upgraded to Gnome 43 and extensions.gnome.org says it is incompatible :(

Just bringing this to your attention, in case you have time to upgrade it :)

Thank you!

Multi-monitor workspace detection

About

When a second monitor is connected, any windows on the second monitor are considered to be a member of ALL workspaces.

For example, if there is a single window open on the secondary monitor, each workspace would have an n_windows value of 1.

It's unclear to me whether this is a Gnome bug or not.

Slightly off topic - Gnome doesn't currently support workspaces on secondary monitors

This affects this extension because it means all workspace numbers (1-10) will be permanently visible if there are any windows on the secondary monitor.

All Workspaces Numbers Are Displayed

Hi Andy,

Thanks for this great extension !

I am also, a recent convert from i3wm, like Nikita from the feature request (which I also "+1ed").

I have an issue where all the workspaces numbers are displayed from 1 to 10, even though I do not have programs open on several of those.

My config looks like so :

dconf read /org/gnome/shell/overrides/dynamic-workspaces
false
dconf read /org/gnome/desktop/wm/preferences/num-workspaces
10

I have no idea where to look for / debug this issue. Let me know if I can provide any other log / config.

Thanks in advance,
Denis

gnome-shell error log flood: Object St.Button (...), has been already disposed

environment

  • ubuntu 20 LTS, gnome-shell 36
  • ubuntu 22 LTS, gnome-shell 42.4

gnome-shell error log flood

Sep 16 17:06:09 ubuntu gnome-shell[5793]: Object St.Button (0x55d1fd2ac0c0), has been already disposed โ€” impossible to access it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
Sep 16 17:06:09 ubuntu gnome-shell[5793]: == Stack trace for context 0x55d1fb868190 ==
Sep 16 17:06:09 ubuntu gnome-shell[5793]: #0   55d1fc44c4d8 i   /home/ubuntu/.local/share/gnome-shell/extensions/[email protected]/ui.js:20 (387ccdafcf10 @ 200)
Sep 16 17:06:09 ubuntu gnome-shell[5793]: #1   7fff80cf3320 b   /home/ubuntu/.local/share/gnome-shell/extensions/[email protected]/ui.js:39 (27f611520ec0 @ 30)
Sep 16 17:06:09 ubuntu gnome-shell[5793]: #2   7fff80cf33e0 b   /home/ubuntu/.local/share/gnome-shell/extensions/[email protected]/extension.js:64 (387ccda9e2e0 @ 35)
Sep 16 17:06:09 ubuntu gnome-shell[5793]: == Stack trace for context 0x55d1fb868190 ==
Sep 16 17:06:09 ubuntu gnome-shell[5793]: #0   55d1fc44c4d8 i   /home/ubuntu/.local/share/gnome-shell/extensions/[email protected]/ui.js:21 (387ccdafcf10 @ 216)
Sep 16 17:06:09 ubuntu gnome-shell[5793]: #1   7fff80cf3320 b   /home/ubuntu/.local/share/gnome-shell/extensions/[email protected]/ui.js:39 (27f611520ec0 @ 30)
Sep 16 17:06:09 ubuntu gnome-shell[5793]: #2   7fff80cf33e0 b   /home/ubuntu/.local/share/gnome-shell/extensions/[email protected]/extension.js:64 (387ccda9e2e0 @ 35)
Sep 16 17:06:09 ubuntu gnome-shell[5793]: == Stack trace for context 0x55d1fb868190 ==
Sep 16 17:06:09 ubuntu gnome-shell[5793]: #0   55d1fc44c4d8 i   /home/ubuntu/.local/share/gnome-shell/extensions/[email protected]/ui.js:22 (387ccdafcf10 @ 242)
Sep 16 17:06:09 ubuntu gnome-shell[5793]: #1   7fff80cf3320 b   /home/ubuntu/.local/share/gnome-shell/extensions/[email protected]/ui.js:39 (27f611520ec0 @ 30)
Sep 16 17:06:09 ubuntu gnome-shell[5793]: #2   7fff80cf33e0 b   /home/ubuntu/.local/share/gnome-shell/extensions/[email protected]/extension.js:64 (387ccda9e2e0 @ 35)
Sep 16 17:06:09 ubuntu gnome-shell[5793]: Object St.Button (0x55d1fd2ac0c0), has been already disposed โ€” impossible to access it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
Sep 16 17:06:09 ubuntu gnome-shell[5793]: == Stack trace for context 0x55d1fb868190 ==
Sep 16 17:06:09 ubuntu gnome-shell[5793]: #0   7fff80cf2cd0 b   /home/ubuntu/.local/share/gnome-shell/extensions/[email protected]/ui.js:20 (387ccdafcf10 @ 200)
Sep 16 17:06:09 ubuntu gnome-shell[5793]: #1   7fff80cf3320 b   /home/ubuntu/.local/share/gnome-shell/extensions/[email protected]/ui.js:39 (27f611520ec0 @ 30)
Sep 16 17:06:09 ubuntu gnome-shell[5793]: #2   7fff80cf33e0 b   /home/ubuntu/.local/share/gnome-shell/extensions/[email protected]/extension.js:64 (387ccda9e2e0 @ 35)
Sep 16 17:06:09 ubuntu gnome-shell[5793]: == Stack trace for context 0x55d1fb868190 ==
Sep 16 17:06:09 ubuntu gnome-shell[5793]: #0   7fff80cf2cd0 b   /home/ubuntu/.local/share/gnome-shell/extensions/[email protected]/ui.js:21 (387ccdafcf10 @ 216)
Sep 16 17:06:09 ubuntu gnome-shell[5793]: #1   7fff80cf3320 b   /home/ubuntu/.local/share/gnome-shell/extensions/[email protected]/ui.js:39 (27f611520ec0 @ 30)
Sep 16 17:06:09 ubuntu gnome-shell[5793]: #2   7fff80cf33e0 b   /home/ubuntu/.local/share/gnome-shell/extensions/[email protected]/extension.js:64 (387ccda9e2e0 @ 35)
Sep 16 17:06:09 ubuntu gnome-shell[5793]: == Stack trace for context 0x55d1fb868190 ==
Sep 16 17:06:09 ubuntu gnome-shell[5793]: #0   7fff80cf2cd0 b   /home/ubuntu/.local/share/gnome-shell/extensions/[email protected]/ui.js:22 (387ccdafcf10 @ 242)
Sep 16 17:06:09 ubuntu gnome-shell[5793]: #1   7fff80cf3320 b   /home/ubuntu/.local/share/gnome-shell/extensions/[email protected]/ui.js:39 (27f611520ec0 @ 30)
Sep 16 17:06:09 ubuntu gnome-shell[5793]: #2   7fff80cf33e0 b   /home/ubuntu/.local/share/gnome-shell/extensions/[email protected]/extension.js:64 (387ccda9e2e0 @ 35)
Sep 16 17:06:09 ubuntu gnome-shell[5793]: Object St.Button (0x55d1fd2ac0c0), has been already disposed โ€” impossible to access it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.

those err log flood to syslog & journal,
size can be growing to GB in few days.

All workspace numbers displayed after creating window on empty workspace in dual-monitor setup

Thanks for this extension, I really like this in combination with pop-shell. Makes Gnome feel quite like i3.

Describe the bug

Gnome is set to a fixed number of workspaces (10) to be shown only on the primary display. A second monitor is connected.
Whenever a new window (A) is opened on an empty workspace on the primary display, while another window (B) is open on the secondary display, all workspace numbers will show up.

They will only disappear again if the window (B) is moved from the secondary to the primary display, or if the extension is disabled and enabled again.

To Reproduce

  • Set fixed number of workspace on gnome setting
  • Set Gnome to show workspaces only on the primary display
  • Open any window on the secondary display
  • Go to any empty workspace on the primary display
  • Open a window on the primary display

Expected behavior
The numbers should display only active workspace.

Version Information (please complete the following information):

  • OS: Fedora 37
  • Extension Version: 7
  • Gnome Shell: GNOME 43.4
  • Windowing System: Wayland

Extension does not work under GNOME 44

The extension does not work under GNOME 44. I have already tried to add gnome 44 to the metadata.json,but that didnยดt work. It crashes the session and i get thrown back to gdm.

Coredump:

mei 07 14:51:39 x260 systemd-coredump[13325]: [๐Ÿก•] Process 12218 (gnome-shell) of user 1000 dumped core.
                                              
                                              Stack trace of thread 12218:
                                              #0  0x00007f881acb9864 meta_display_get_primary_monitor (libmutter-12.so.0 + 0xb9864)
                                              #1  0x00007f881a2694f6 n/a (libffi.so.8 + 0x74f6)
                                              #2  0x00007f881a265f5e n/a (libffi.so.8 + 0x3f5e)
                                              #3  0x00007f881a268b73 ffi_call (libffi.so.8 + 0x6b73)
                                              #4  0x00007f881b0e1958 n/a (libgjs.so.0 + 0x4e958)
                                              #5  0x00007f881b0e2058 n/a (libgjs.so.0 + 0x4f058)
                                              #6  0x00007f88194b2c96 n/a (libmozjs-102.so + 0x12b2c96)
                                              #7  0x00007f88194a3d95 n/a (libmozjs-102.so + 0x12a3d95)
                                              #8  0x00007f8819b24d4b _Z20JS_CallFunctionValueP9JSContextN2JS6HandleIP8JSObjectEENS2_INS1_5ValueEEERKNS1_16HandleValueArrayENS1_13MutableHandleIS6_EE (libmozjs-102.s>
                                              #9  0x00007f881b0d7969 n/a (libgjs.so.0 + 0x44969)
                                              #10 0x00007f881b10d9ac n/a (libgjs.so.0 + 0x7a9ac)
                                              #11 0x00007f881b81c210 g_closure_invoke (libgobject-2.0.so.0 + 0x14210)
                                              #12 0x00007f881b84a2f8 n/a (libgobject-2.0.so.0 + 0x422f8)
                                              #13 0x00007f881b83a095 g_signal_emit_valist (libgobject-2.0.so.0 + 0x32095)
                                              #14 0x00007f881b83a324 g_signal_emit (libgobject-2.0.so.0 + 0x32324)
                                              #15 0x00007f881acee05d n/a (libmutter-12.so.0 + 0xee05d)
                                              #16 0x00007f881acee416 n/a (libmutter-12.so.0 + 0xee416)
                                              #17 0x00007f881ace31b7 n/a (libmutter-12.so.0 + 0xe31b7)
                                              #18 0x00007f881b82c9e6 n/a (libgobject-2.0.so.0 + 0x249e6)
                                              #19 0x00007f881b82e695 g_object_new_valist (libgobject-2.0.so.0 + 0x26695)
                                              #20 0x00007f881b2a0175 g_initable_new_valist (libgio-2.0.so.0 + 0x75175)
                                              #21 0x00007f881b2a027e g_initable_new (libgio-2.0.so.0 + 0x7527e)
                                              #22 0x00007f881ad368a1 n/a (libmutter-12.so.0 + 0x1368a1)
                                              #23 0x00007f881ad12292 n/a (libmutter-12.so.0 + 0x112292)
                                              #24 0x00007f881ad1432f n/a (libmutter-12.so.0 + 0x11432f)
                                              #25 0x00007f881ad17c5e n/a (libmutter-12.so.0 + 0x117c5e)
                                              #26 0x00007f881b71753b g_main_context_dispatch (libglib-2.0.so.0 + 0x5a53b)
                                              #27 0x00007f881b774219 n/a (libglib-2.0.so.0 + 0xb7219)
                                              #28 0x00007f881b716c7f g_main_loop_run (libglib-2.0.so.0 + 0x59c7f)
                                              #29 0x00007f881accdc5b meta_context_run_main_loop (libmutter-12.so.0 + 0xcdc5b)
                                              #30 0x0000556830883526 n/a (gnome-shell + 0x3526)
                                              #31 0x00007f881aa39850 n/a (libc.so.6 + 0x23850)
                                              #32 0x00007f881aa3990a __libc_start_main (libc.so.6 + 0x2390a)
                                              #33 0x0000556830883835 n/a (gnome-shell + 0x3835)
                                              
                                              Stack trace of thread 12223:
                                              #0  0x00007f881ab13c0f __poll (libc.so.6 + 0xfdc0f)
                                              #1  0x00007f881b77417f n/a (libglib-2.0.so.0 + 0xb717f)
                                              #2  0x00007f881b716c7f g_main_loop_run (libglib-2.0.so.0 + 0x59c7f)
                                              #3  0x00007f881b339d3c n/a (libgio-2.0.so.0 + 0x10ed3c)
                                              #4  0x00007f881b744315 n/a (libglib-2.0.so.0 + 0x87315)
                                              #5  0x00007f881aa9d44b n/a (libc.so.6 + 0x8744b)
                                              #6  0x00007f881ab20e40 n/a (libc.so.6 + 0x10ae40)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.