Skip to content
This repository has been archived by the owner on Jun 16, 2024. It is now read-only.

[FEATURE]: dwm tag implementation #201

Open
Adomas-beep-boop-maggots opened this issue Nov 19, 2021 · 9 comments
Open

[FEATURE]: dwm tag implementation #201

Adomas-beep-boop-maggots opened this issue Nov 19, 2021 · 9 comments
Labels
enhancement New feature or request needs more info The issue needs more information from the submitter side upstream Issue depends on the upsteam (in most cases KWin and Plasma)

Comments

@Adomas-beep-boop-maggots

Summary

There is this really cool feature(s) in dwm, that i would love it to get implemented into kde (bismuth). I didn't find much documentation about this feature, but basically in dwm pressing Mod+Ctrl+[1-9] you can select multiple desktops (called tags in dwm) at once, for example if i am at desktop 2 and if i press Mod+Ctrl+1 i combine all windows from desktop 1 and 2 and all the windows from desktop 1 and 2 and it gets displayed in a single monitor, i can then select other desktops and they get also displayed in a same way. Another feature is ability to display the same window in selected desktops, for example in dwm pressing Mod+Shift+Ctrl+[1-9] makes currently focused window exist in other desktops, this is basically kde's "Keep WIndow on All Desktops" but you can select specifically on which desktops do you want that selected window to display.
Sorry if my explanation is bad, i couldn't think of explaining this in any better way.
There is dwm source code (config) with these previously mentioned features:
https://github.com/sr/dwm/blob/master/config.def.h
at line 40 and 42

A clear and concise description of what you want to happen

dwm tag implementation:
With Mod+Ctrl+[1-9] you can select multiple desktops (called tags in dwm) at once,
Mod+Shift+Ctrl+[1-9] keep currently focused window in other selected desktops.

A clear and concise description of any alternative solutions or features you've considered.

No response

Additional info

https://github.com/sr/dwm/blob/master/config.def.h

40 { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} },
42 { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },

@Adomas-beep-boop-maggots Adomas-beep-boop-maggots added the enhancement New feature or request label Nov 19, 2021
@gikari
Copy link
Member

gikari commented Nov 19, 2021

Not sure I understand the first feature. Is there a video demo anywhere?

The second feature: "Make Windows visible only on specified desktops" cannot be implemented, unless we tweak the source code in KWin, so you might ask for it on https://bugs.kde.org

@gikari gikari added upstream Issue depends on the upsteam (in most cases KWin and Plasma) needs more info The issue needs more information from the submitter side labels Nov 19, 2021
@Adomas-beep-boop-maggots
Copy link
Author

Adomas-beep-boop-maggots commented Nov 19, 2021

Not sure I understand the first feature. Is there a video demo anywhere?

The second feature: "Make Windows visible only on specified desktops" cannot be implemented, unless we tweak the source code in KWin, so you might ask for it on https://bugs.kde.org

yes

2021-11-19.12-50-26.mp4
@gikari
Copy link
Member

gikari commented Nov 19, 2021

Sorry, but this demo seems like a regular desktop switching to me. You mentioned, that you have to press Mod + Ctrl + Number, but on your demo I see only Mod + Number. Am I missing something?

Could you also describe what's happening after you pressing each key?

@patbakdev
Copy link

I too am interested in this feature. I am trying to decide between staying with KDE and using this script or switching to dwm. I found this (http://ratfactor.com/dwm) explanation to be helpful (just search for tags).
"A tag is unlike a desktop in that a window may belong to more than one tag and you can even view all tags at once."

Basically if window A is on 1 and B is on 2 and C is on 3 you can shift-click (or whatever) 1 and 2 and then both windows A and B will be shown all in the same stack. (but not C). Unclicking 2 hides B again and only shows A. It makes for an easy way to quickly bring in a window from another "workspace" to sit side by side (say a term and a browser for copy/paste) and then send the window back without actually changing their "workspace assignments"

@gikari
Copy link
Member

gikari commented Nov 19, 2021

Sounds like dwm tags are Plasma Activities, that are used when you have only 1 virtual desktop: windows can be assigned to multiple activities or pined to all of them.

If my assumption is true, I could implement a couple of shortcuts to extend activities functionality. I just need to know what exact ones people need.

@gikari
Copy link
Member

gikari commented Nov 19, 2021

I suggest people here to change their "virtual desktop workflow" to "activities workflow" and tell after that what features (shortcuts) they are missing.

@patbakdev
Copy link

I think that sounds right. I have always found Activities to not be my cup of tea so I am not fully versed on all of its complexities. Tags seam simple and fast. But if it can be accomplished with activities without pulling in any additional overhead that sounds reasonable to me. I'll give it a try and see how it goes.

@patbakdev
Copy link

So, my 30s take on this is that it seems promising, but a bit clumsy at the moment. I only tested with single monitor. Here is what I noticed so far:

  1. Seems easy to setup each Activity and assign a selection key (meta+1, meta+2, etc. to each Activity). The user will probably need to setup wallpaper for each activity. (maybe other things?)
  2. Switch Activities seems snappy (enough).
  3. There doesn't exist any built in shortcuts to move a Window from one Activity to another. This can be easily done with the mouse at the moment. I also don't know if this is per Window or Per Application.
  4. After moving a Window from one Activity to another the layout doesn't update. Will need to force some kind of re-tile. (I think I switched layouts back and forth.)
  5. There isn't a great pager (imo). I currently use the Virtual Desktop Bar widget and it works/looks great for Virtual Desktops. It doesn't seem to handle Activities and the stock Activities Pager widget takes up too much space and it not nearly as configurable. I didn't see a better alternative in the kde store.

Anyways, that my quick observations.

@gikari
Copy link
Member

gikari commented Nov 19, 2021

  1. There doesn't exist any built in shortcuts to move a Window from one Activity to another. This can be easily done with the mouse at the moment. I also don't know if this is per Window or Per Application.

This is per window. I think these shortcuts should be present upstearm. Theoretically, we could provide shortcuts for doing that, bug since activities are not numbered (and not ordered? Not sure, need to check that), how should those shortcuts look like?

  1. After moving a Window from one Activity to another the layout doesn't update. Will need to force some kind of re-tile. (I think I switched layouts back and forth.)

This is a known issue: #35 and it's happening because of an upsteam bug. Maaaaybe this could be partially fixed by triggering the retiling on window focus change. This could fix the issue in case you want to move an active window to another activity, but not if you're trying to move an inactive one.

  1. There isn't a great pager (imo). I currently use the Virtual Desktop Bar widget and it works/looks great for Virtual Desktops. It doesn't seem to handle Activities and the stock Activities Pager widget takes up too much space and it not nearly as configurable. I didn't see a better alternative in the kde store.

This is an upsteam issue, unfortunately.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request needs more info The issue needs more information from the submitter side upstream Issue depends on the upsteam (in most cases KWin and Plasma)
3 participants