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

Cycle backwards with Shift #177

Closed
wants to merge 1 commit into from
Closed

Cycle backwards with Shift #177

wants to merge 1 commit into from

Conversation

git-f0x
Copy link
Contributor

@git-f0x git-f0x commented Aug 24, 2024

This should fix #173 and pop-os/cosmic-comp#727.
The reason for a new message is that it could be potentially used in the future to e.g. undo the last Tab autocomplete.
It's possibly not the best way to do this, but it seems to work.

Unrelated, it seems the reason for the extra vertical padding between buttons and dividers is the divider. Changing it to horizontal_rule eliminates the extra vertical padding. Not sure if it should be changed to horizontal rule, or if the divider in libcosmic should be somehow changed.

@pikachunakapika
Copy link

Works pretty good. In the near future this also needs to be covered in shortcuts config:
screenshot-2024-09-02-00-57-26

@bbb651
Copy link

bbb651 commented Sep 2, 2024

This only fixes half of the problem, it won't work unless the launcher is already open (hence why it's not actually a shortcut), meaning you cannot press alt + shift + tab to open the launcher and already be focused on the last window in the list (which would be useful when listing windows by focus order is implemented).

Actually this currently doesn't work with alt + tab either because currently this logic is wrong:

Message::AltTab => {
    if self.alt_tab {
        self.focus_next();
    } else {
        self.alt_tab = true;
    }
}

It should always focus_next() even on the first time.

I tried to implement it before and was a bit confused as to make optional boolean arguments in clap, I think I was looking for ArgAction::SetTrue.

@git-f0x
Copy link
Contributor Author

git-f0x commented Sep 2, 2024

Yeah, this is kind of janky as is. I attempted to make some changes to cosmic-comp and cosmic-settings-daemon to maybe somehow make it work with a subcommand (cosmic-launcher shift-alt-tab), but I only managed to break every shortcut using the Super or Alt Keys.
I'll make this a draft for a while until I maybe figure out a way, and close this if not.

@git-f0x git-f0x marked this pull request as draft September 2, 2024 19:17
@git-f0x
Copy link
Contributor Author

git-f0x commented Sep 2, 2024

I'll close this in favor of #183.

@git-f0x git-f0x closed this Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Support Alt/Super + Shift + Tab in Window Switcher
3 participants