Auto create scratch pad

Issue #40 resolved
Viktor created an issue

When loading the dk, how could I immediately open a terminal hidden as a scratchpad, so that if needed, I can call it up with a button press (dkcmd win scratch?)?

Comments (9)

  1. Nate Maia repo owner

    You can do this with rules like I show in the example configs

    dkrc

    # send a window to the scratchpad
    dkcmd rule class="^scratchpad$" scratch=true
    alacritty --class scratchpad
    

    sxhkdrc

    # toggle scratchpad
    alt + shift + u
        dkcmd win "scratchpad" scratch
    

  2. Nate Maia repo owner

    If you want to do this with a window that you cannot set the class on then adjust the value “scratchpad“ to match your window class (it’s not regex but a direct match)

  3. Viktor reporter

    The goal would be that when the dk window manager (exec dk) starts, a terminal program (alacritty) starts automatically as a scratchpad, and I can call it up. So I don't want to open a terminal, which I move to scratchpad, and then I can turn it on and off, but create a terminal that is automatically in scratchpad when dk starts.

  4. Nate Maia repo owner

    Another user has this rule to also set the location

    dkcmd rule class="^scratchpad$" scratch=true float=true x=800 y=28 w=1000 h=600
    

  5. Viktor reporter

    Thx. Now working great. I did the following:

    In sxhkdrc:

    # Scratchpad
    super + shift + Return
        dkcmd win scratchpad scratch
    

    in dkrc:

    alacritty --class scratchpad -o "window.dimensions.lines=25" -o "window.dimensions.columns=120" &
    .
    .
    .
    dkcmd rule class="^scratchpad$" scratch=true float=true x=center y=center
    

  6. Log in to comment