How to Use Scratchpads on i3

  Рет қаралды 10,395

The Linux Cast

The Linux Cast

Күн бұрын

Today I talk about how to use scratchpads on i3wm. i3 is one of the best window managers out there. Scratchpads just make it so much better.
👇 PULL IT DOWN FOR THE GOOD STUFF 👇
Patreon - / thelinuxcast
Liberapay - liberapay.com/thelinuxcast/
KZbin - / @thelinuxcast
===== Follow us 🐧🐧 ======
Odysee - odysee.com/$/invite/@thelinux...
Mastadon - @drmdub@distrotoot.com
/ thelinuxcast
/ mtwb
Discord - / discord
gitlab.com/thelinuxcast
Subscribe at thelinuxcast.org
Contact us email@thelinuxcast.org
Telegram Group - t.me/+9lYoIuLh0JIyMzcx
Amazon Wishlist - www.amazon.com/hz/wishlist/ls...
Merch Store - zaney.creator-spring.com/
Logo Courtesy of - pedropaulo.net
==== Referenced ====
‪@JakeLinux‬ Channel - / @jakelinux
===== Thanks to Our Patrons! ====
Tier 7 - Tux Level - Patrons
Robert M.
Tier 5 Patrons
Syd A.
Tier 4 Patrons
Devon, Patrick, Fred, Kramer K.
Tier 3 Patrons
Maeglin, Jackson Knife and Tool, Steve A, CyberGuyLinux, Garrick, Samuel, KB, TGB
Tier 2 Patrons
Mitchel, Joris AKA JDawg, carnondated, Shaun, Jeremy, Odin, Martin, Andy P., Ross, Eduardo S.
Tier 1 Patrons
Marek, Camp514, Joshua Lee, Peter, Crucible, Darkbadits6, Primus, PM
#i3 #tut #thelinuxcast

Пікірлер: 53
@xwinglover
@xwinglover 2 жыл бұрын
I agree Matt, the scratchpad is so useful to me. Especially when I can hide it, and call it into any of the other workspaces.
@phonewithoutquestion80
@phonewithoutquestion80 2 жыл бұрын
I was JUST NOW trying to optimize my scratchpad usage. Thank you for making this video.
@electrodav3878
@electrodav3878 2 жыл бұрын
When you use the `exec_always` method at minute 11:28, you can easily fix the multiple instances' problem through the following command: exec_always --no-startup-id pgrep -f '^alacritty --class ttrm,ttrm' || alacritty --class ttrm,ttrm In this way, if an alacritty instance with the given class is still running, no more instances will be created. You can easily extend this method to the other classes you use in your config. Cheers
@TheLinuxCast
@TheLinuxCast 2 жыл бұрын
That's awesome. I'll give it a try.
@iHateStupidUserName
@iHateStupidUserName Жыл бұрын
Thank you Matt for showing this cool feature! Its also cool to see how organized your i3wm config. One thing that would have made the intro to the scratchpad feature better: is to include the config that actually sets up the scratchpad "workspace". Anyhow did find it in your dotfiles: ``` for_window [class="pulse|ttrm|mus|fm"] floating enable, resize set 1000 600, move scratchpad, border pixel 0 ```
@rmcellig
@rmcellig 2 жыл бұрын
You are such a great teacher and I appreciate that everytime I watch one of your videos! Love this video. Thanks!!! 😀
@itsemermer
@itsemermer 2 жыл бұрын
Hey Matt, so as you said at 4:11, you mentioned you still haven't been able to move your scratchpad bindings over to sxhkd and I noticed by looking at your GitLab that you still haven't found a way to change it. Luckily, I found a pretty simple way that I hope can help you! You can move all of your "bindsym *keybind* [class="*class*"] scratchpad show; move position center" bindings into sxhkd by replacing the bindsym command as well as the keybind with "i3-msg" and put that into the sxhkdrc file. So, as an example for your pulsemixer scratchpad, the added lines in your sxhdrc file should look like this: # Pulsemixer super + b i3-msg [class="pulse"] scratchpad show; move position center I hope this helps! Also, I just wanna say I really appreciate the videos. They've helped out so much and have taught me a lot on how to just make things work, specifically for the scratchpads as well as for polybar. I think my Linux journey would've been much harder if it wasn't for your videos so I genuinely thank you for getting these videos out as much as you do because it hasn't just helped me, but it's definitely helped many other people as well!
@kj-marslander
@kj-marslander 2 жыл бұрын
I don't see many i3wm turorials anymore. Great video! i3wm is the only tiling wm I like. Please make more tutorials like this.
@jonnywester3194
@jonnywester3194 Жыл бұрын
Thank you soo much for this!! Helped me alot!
@ZelenoJabko
@ZelenoJabko Жыл бұрын
Very cool! Trying to set it up on Sway, wish me luck.
@IuliusPsicofactum
@IuliusPsicofactum 2 жыл бұрын
I used the i3 scratchpad a lot at work to have my broswer with my social media hidden and quickly call it between tasks to check on stuff :P
@Maik.iptoux
@Maik.iptoux Жыл бұрын
Minute 12: is it not possible to include an if condition before the exec_always? So you can check if it is already running? Maybe you can check if an pid is there. Or add an Titel and check if scratchpad with given Titel is already running. Titles can be "sc1,sc2,sc3" or something like that. This must be possible i think, you can outsource the if conditions and exec of terminal in an own script and call the script in the config -> persist scratchpad in i3 born and available for all 🤔 Just an idea.
@user-gp8ub8vh7i
@user-gp8ub8vh7i 2 жыл бұрын
Matt, here is the segment of my i3 config with the scratchpads. I can quit them and the windows and bring them back without restarting i3. Actually the first two commands are enough. You can open several terminal windows with a program in each, say ranger, ncmpcpp, pulselmixer, then convert the windows to tabbed and send each to scratchpad with mod+Shift+minus (or whatever keybinding you want) and cycle through them in any space with mod+minus: # SCRATCHPADS # Make the currently focused window a scratchpad bindsym $mod+Shift+minus move scratchpad # Show the first scratchpad window bindsym $mod+minus scratchpad show bindsym $alt+Shift+z exec st -n scratch -e ncmpcpp bindsym $alt+z [instance="scratch"] scratchpad show bindsym $alt+Shift+c exec st -n ranger -e ranger bindsym $alt+c [instance="ranger"] scratchpad show # make scratchpads windows floating for_window [instance="scratch"] floating enable for_window [instance="scratch"] resize set 1000 600 for_window [instance="scratch"] move scratchpad for_window [instance="scratch"] border pixel 10 for_window [instance="ranger"] floating enable for_window [instance="ranger"] resize set 1000 600 for_window [instance="ranger"] move scratchpad for_window [instance="ranger"] border pixel 10 # END OF SCRATCHPADS BTW, nice video and channel. Keep the good work!
@rodoxplo
@rodoxplo 2 жыл бұрын
Great comment; btw the function exec st -n doesn't do anything; any thought?
@thenextpoetician6328
@thenextpoetician6328 2 жыл бұрын
Big scratchpad fan here as well. Still twiddling with how I prefer the setup, and really too bad Budlabs isn't into gaps. His i3 is very cool and completely foreign to any other setup I've seen.
@TheLinuxCast
@TheLinuxCast 2 жыл бұрын
Agreed. i3run was perfect.
@modelkitbeginner
@modelkitbeginner 2 жыл бұрын
Am I late? - I am late .... Thank you very much ! This got me thinking and I didn't quite get it right the way you did it. So here is my alternative which appears to work: exec tilix --name dropdown bindsym $mod+F11 [instance="dropdown"] scratchpad show; move position center exec youtube-music --name youtube bindsym $mod+F10 [instance="youtube"] scratchpad show; move position center # Dropdown for_window [instance="dropdown"] floating enable for_window [instance="dropdown"] resize set 1000 600 for_window [instance="dropdown"] move scratchpad for_window [instance="dropdown"] border pixel 5 # KZbin for_window [instance="youtube"] floating enable for_window [instance="youtube"] resize set 1000 600 for_window [instance="youtube"] move scratchpad for_window [instance="youtube"] border pixel 5 Once changes are done log out and back in. I scratched that together from several websites and videos but yours got the ball rolling. Cheers bud - appreciate it.
@arsacode6145
@arsacode6145 11 ай бұрын
Christmas is there for me whenever I want it is right xD
@keyboardwarrior6296
@keyboardwarrior6296 2 жыл бұрын
If you place the window you want as a scratchpad in an empty workspace and change it to tabbing mode before turning it into a scratchpad, you can have all of your scratchpad programs in the same tabbed parent window, and new windows will spawn in the tabbed window when it is focused. Instead of cycling through windows, you can have them in one convenient place.
@TheLinuxCast
@TheLinuxCast 2 жыл бұрын
That's a neat trick. I don't use tabs as much as I used too. Should get back to doing that.
@vxer
@vxer Жыл бұрын
Good dotfiles
@georgelabonte2258
@georgelabonte2258 Жыл бұрын
Great video. I noticed all the scratchpads where using alacritty. Can you also just use a gui text editor like gvim, and specify a file? I've been looking for a way to be able to call up a floating window to display a specific text file, like a listing of i3 key bindings. I think a scratchpad might do the trick, but not sure how to configure it. The scratchpad section in the i3 user's guide needs a bit of work.
@Prophet6000
@Prophet6000 2 жыл бұрын
I need to get that music player working.
@AnalyticMinded
@AnalyticMinded 2 жыл бұрын
19 workspaces, multi-monitor, and 6 scratchpads... my question is, how many cups of coffee a day?! :P
@TheLinuxCast
@TheLinuxCast 2 жыл бұрын
All of the coffee.
@dvox4361
@dvox4361 Жыл бұрын
Hi Matt, how to find out the CLASS type of applications running inside the terminal (like pulsemixer, etc)? Whenever use xprop on the application window it shows me Alacritty for both class types, but not the application...
@TheLinuxCast
@TheLinuxCast Жыл бұрын
As far as I know, apps that run in the terminal, don't have their own classes. But Alacritty has a way to set the class, so if you're looking to have a pulsemixer window, you could launch it with alacritty --class pulsemixer,pulsemixer -e pulsemixer
@dvox4361
@dvox4361 Жыл бұрын
@@TheLinuxCast Thanks for your fast reply! I'm looking to have a Pulsemixer scratchpad window (similar to yours), but your config doesn't work for me. I'll keep trying! Best regards from Germany!
@androth1502
@androth1502 2 жыл бұрын
hm. my arcolinux has by default F12 set to open the terminal in a scratchpad, and it seems to work consistently on almost all the various DEs and TLMs that it installs and i've tried. does this mean it has a separate setup for this on every single supported environment or does it use some 3rd party package? the terminal is probably the only thing i would want on scratchpad and one thing i have on conemu on windows. i can't live without it. heh.
@TheLinuxCast
@TheLinuxCast 2 жыл бұрын
That's only if you use arcos config. I do not.
@androth1502
@androth1502 2 жыл бұрын
@@TheLinuxCast i'm only a few weeks into linux so all this is new to me. i would like to be able to set this up on anything since i'm considering nuking win 10 on my laptop and installing fedora. still undecided on which distro/env to setup. i have arco on a desktop but i don't use that desktop much. i'm getting too much choice burn. lol.
@androth1502
@androth1502 2 жыл бұрын
addendum: xfce4-terminal has a --drop-down option which effectively gives it a built in scratchpad.
@wisnoskij
@wisnoskij 2 жыл бұрын
That in interesting. But that does mean that these programs are always running even when you are not using them. Would it not just be more efficient to have that same keybinding start and stop the program? Or maybe hardware has advanced to the point where extra memory and threads are less important that not overusing your SSD?
@TheLinuxCast
@TheLinuxCast 2 жыл бұрын
The things I have open I use dozens of times a day, so keeping them open makes sense.
@Froggie92
@Froggie92 2 жыл бұрын
i never thought to split my i3/config, brb also dracula 🧛‍♂️🧛‍♂️ double also, where are your dotfiles, i want to check your bar config
@TheLinuxCast
@TheLinuxCast 2 жыл бұрын
gitlab.com/thelinuxcast
@sgarrison05
@sgarrison05 Жыл бұрын
I am not a Linux newbie, but this is very confusing. I can not for the life of me get the scratchpad to work. There is no problem understanding the bindsym part or the exec part. I feel the problem that I am specifically having is with the class. I can get the class of the window, but that only points to the terminal (usually) and not the specific cli program or application I am trying to bring up (i.e. news, fm, ttrm, pulse, etc). where are you getting that class information? xprop only gives me the terminal window. What am I missing? Also when do you use -e flag or not?
@SilverSeleucid
@SilverSeleucid 2 ай бұрын
ran into this exact issue, using these bindings seem to just recenter an existing floating window but not open pulsemixer (which i have) nor can i find the class for it. have you figured this out since you posted this a year ago or did you move on to another solution?
@sgarrison05
@sgarrison05 2 ай бұрын
@@SilverSeleucid I figured it out. It turned out I could not spell scratchpad very well. I was missing the “t”. Yanking the mistake vim and repeating it didn’t help.
@Klej0aka0Klej
@Klej0aka0Klej 2 жыл бұрын
It doesn't work like it should for me and i am not sure what i am doing wrong: In my config i got: `bindsym $mod+b [class="Alacritty"] scratchpad show; move position center` and it only moves my window to the center but like scratchpad doesn't work, it doesn't hide it or anything //nvm, tbh you should say that there needs to be also move scratchpad in my config for that window also
@TheLinuxCast
@TheLinuxCast 2 жыл бұрын
That's because I don't use it that way. Your binding there will make ever alacritty terminal a scratchpad. The way I show gives one terminal a new class.
@Klej0aka0Klej
@Klej0aka0Klej 2 жыл бұрын
@@TheLinuxCast I totally agree with that you said, I just didn't know that I also need to have like "move scratchpad" in my config for specified classes. Since you didn't show that in your video, and it's in your other file in config, it was a surprise for me :) that's it.
@iusearchbtw4969
@iusearchbtw4969 8 ай бұрын
Doesn't work for me
@PremierSullivan
@PremierSullivan 2 жыл бұрын
Why does i3-not-gaps still exist? You can turn off the gaps with a config. Would be nice if we could consolidate on one version.
@TheLinuxCast
@TheLinuxCast 2 жыл бұрын
The dev of regular i3 has always been against adding gaps, though I read that that might be changing.
@PremierSullivan
@PremierSullivan 2 жыл бұрын
@@TheLinuxCast I hope so
@kj-marslander
@kj-marslander 2 жыл бұрын
I think I read somewhere on the "i3-not-gaps" (lol) dev's github that he doesn't like the code used to make i3gaps, he thinks the code is messy or something, idk.
@Thaleios
@Thaleios 2 жыл бұрын
Wait, you're a nerd? No way! 🙂
@TheLinuxCast
@TheLinuxCast 2 жыл бұрын
Well it was either hand model or nerd, and nerd seemed like the way to go. LOL
@Thaleios
@Thaleios 2 жыл бұрын
@@TheLinuxCast Haha! Same here. Modeling is overrated. :-)
@MrCradleman
@MrCradleman 2 жыл бұрын
In sway I use one keybinding for show scratchpad or open application if show scratchpad doesn't work. See odysee comment
@TheLinuxCast
@TheLinuxCast 2 жыл бұрын
Jake@Linux does something similar, I think
@1987slide
@1987slide Жыл бұрын
i made a quick script to create the scratchpad and then show it if it isn't running or just show it if its is running (if that makes sense), DISCLAIMER: i am a noob when it comes to scripting so feel free to point out any obvious mistakes the script (i3-scratchpad), replace ranger with the application you want: #!/bin/bash APP="alacritty --class $1,$1 -e $1" CHECK=$(pgrep -f "$APP") [[ -z $CHECK ]] && $APP & while [[ -z $CHECK ]]; do sleep 0.1 CHECK=$(pgrep -f "$APP") done i3-msg [class=$1] scratchpad show the config: for_window [class="ranger"] floating enable for_window [class="ranger"] move scratchpad bindsym $mod+b exec --no-startup-id i3-scratchpad ranger
How Often Should You Update Your Computer?
11:55
The Linux Cast
Рет қаралды 3,6 М.
10  Things You Need To Know About Qtile
26:36
The Linux Cast
Рет қаралды 18 М.
Inside Out 2: Who is the strongest? Joy vs Envy vs Anger #shorts #animation
00:22
New model rc bird unboxing and testing
00:10
Ruhul Shorts
Рет қаралды 25 МЛН
How Many Balloons Does It Take To Fly?
00:18
MrBeast
Рет қаралды 181 МЛН
Alex hid in the closet #shorts
00:14
Mihdens
Рет қаралды 13 МЛН
Why I Use Tiling Window Managers - And Why You Should Too
19:52
The Linux Cast
Рет қаралды 52 М.
Make i3wm More AWESOME with i3Run!
11:35
The Linux Cast
Рет қаралды 4,5 М.
What Are Scratchpads and WHY Are They Good?
10:48
The Linux Cast
Рет қаралды 7 М.
How to Use i3 with XFCE
18:29
The Linux Cast
Рет қаралды 31 М.
Window Managers in Linux - Everything you NEED to know!
14:44
Torvalds Speaks: Rust's Impact on the Linux Kernel
3:50
Mastery Learning
Рет қаралды 577 М.
CrowdStrike IT Outage Explained by a Windows Developer
13:40
Dave's Garage
Рет қаралды 2 МЛН
How To Make Your Tiling Window Manager Look Amazing
12:56
DistroTube
Рет қаралды 182 М.
~/.dotfiles in 100 Seconds
13:54
Fireship
Рет қаралды 412 М.
تجربة أغرب توصيلة شحن ضد القطع تماما
0:56
صدام العزي
Рет қаралды 61 МЛН
iPhone 15 Pro в реальной жизни
24:07
HUDAKOV
Рет қаралды 449 М.
8 Товаров с Алиэкспресс, о которых ты мог и не знать!
49:47
РасПаковка ДваПаковка
Рет қаралды 116 М.