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

Feature Request: scratchpad #272

Open
ericd23 opened this issue Jun 12, 2024 · 9 comments
Open

Feature Request: scratchpad #272

ericd23 opened this issue Jun 12, 2024 · 9 comments

Comments

@ericd23
Copy link

ericd23 commented Jun 12, 2024

i3 and sway have the concept of scratchpad that you can put some windows there and show/hide the windows in it on any workspace. For example, I could put my note taking or todo apps there. Whenever some random thought comes in, I bring out the scratchpad, log down the thought and then hide it. Quick and simple!

@nikitabobko
Copy link
Owner

nikitabobko commented Jun 12, 2024

I could never understand this feature in i3. It's just a special type of workspace. Why not use a dedicated workspace then? You can have several of them

This feature feels like an unnecessary complication of mental model

@agenttank
Copy link

i like to use scratchpad to make my obsidian note taking app appear on whatever screen I am at the moment and then make it disappear again real quick as i've taken my notes.

@hahuang65
Copy link

For what it's worth, yabai had only recently implemented this. I hacked around this for quite some time with just float, resize, and minimize.

@hahuang65
Copy link

i like to use scratchpad to make my obsidian note taking app appear on whatever screen I am at the moment and then make it disappear again real quick as i've taken my notes.

I've a pretty simple script that works well enough for me:

#!/usr/bin/env bash

APP_ID="md.obsidian"

focus_notepad() {
  open -a Obsidian
}

notepad_focused() {
  if [ "$(aerospace list-windows --focused --format "%{app-bundle-id}")" == "$APP_ID" ]; then
    true
  else
    false
  fi
}

unfocus_notepad() {
  aerospace close
}

if notepad_focused; then
  unfocus_notepad
else
  focus_notepad
fi

@Petemir
Copy link

Petemir commented Aug 16, 2024

I could never understand this feature in i3. It's just a special type of workspace. Why not use a dedicated workspace then? You can have several of them

This feature feels like an unnecessary complication of mental model

@nikitabobko would it be/is it possible to filter windows by their layout? Particularly, I am interested in being able to list floating windows... in that case, it would be trivial (as a user) to implement the requested feature using a modified version of @hahuang65 's script.

@nikitabobko
Copy link
Owner

@Petemir filtering windows by layout makes sense. Please create a separate issue

@x418
Copy link

x418 commented Aug 24, 2024

I could never understand this feature in i3. It's just a special type of workspace. Why not use a dedicated workspace then? You can have several of them

This feature feels like an unnecessary complication of mental model

Firstly, a million thanks for Aerospace. It makes macos usable for me after having to temporarily switch to it.

I also didn't understand the use of Scratchpads until I started using XMonad's NamedScratchpad.

Simply put, I use this feature to immediately bring any window to my current workspace (xmonad uses a hidden workspace called NSP) when needed. For example, as a devops engineer, I could be working on making changes to Kubernetes and I could bring up k9s or aptakube to look at what's going on in the cluster or open up a todo/notes/emacs when I think of something or open Signal to respond to something, etc., and use the same shortcut to toggle it

It has been the single most feature I never thought I would miss

@x418
Copy link

x418 commented Oct 26, 2024

@hahuang65 Thanks to your script for the inspiration. I got XMonad like scratchpad to work for me with the current version of Aerospace. For anyone looking, I have documented here #510 (comment).

Heartfelt thanks to @nikitabobko for Aerospace and for #186

@psiho
Copy link

psiho commented Nov 30, 2024

Just my vote on scratchpads too. I was also one that did not "understand" it when I heard, but I guess it's one of those things you need to try and then you cant live without it. Please reconsider.

I just had to buy a Mac as backup/testing laptop but normaly am on Arch/Hyprland. Without Aerospace (or Yabai, we will see) I'd just hate every second on this thing.

Point with scratchpads in Hyprland is that they're like modals with slightly dimmed overlay and they steal focus. Apps in them (mostly only one), can be as small or as large as you want, so, if they're smaller, they do not cover background apps no matter from which workspace you called it. And thats what makes it so much better than "Normal" workspace. It doesn't interrupt your focus as much. it's less invasive.

Few examples for what I use them every day:

  • Whatsapp - quickly see/reply and go back to work.
  • Spotify - obvious
  • remote terminal sessions, or shells with log outputs - rarely need it, but when I do, I dont want to loose focus from my main Workspace
  • time tracker

So, some above (Whatsapp and Spotify) have rules to move to their respective scratchpads automatically when opened. But some (remote sessions or similar) I manualy move to a scratchpad when I need them.

Currently testing Yabai and Aerospace and this is a big disadvatage for Aerospace when it comes to my preferences.

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

No branches or pull requests

7 participants