From oneself at gmail.com Wed Feb 7 19:20:16 2024 From: oneself at gmail.com (Eyal Erez) Date: Wed, 7 Feb 2024 21:20:16 +0200 Subject: [xmonad] Visual indication of minimized windows Message-ID: Hi, I've recently added XMonad.Actions.Minimize/XMonad.Layout.Minimize to my setup and I like it a lot. My only issue is that I would love it if there was some visual queue that the workspace contains minimized windows. Currently, they just disappear and I need to remember where they exist. Is there some way to show that? I'm also using polybar if that helps. Thank you, -- *Eyal Erez <**oneself at gmail.com* *>* There are 10 types of people, those who know binary and those who don't. -------------- next part -------------- An HTML attachment was scrubbed... URL: From allbery.b at gmail.com Wed Feb 7 19:25:17 2024 From: allbery.b at gmail.com (Brandon Allbery) Date: Wed, 7 Feb 2024 14:25:17 -0500 Subject: [xmonad] Visual indication of minimized windows In-Reply-To: References: Message-ID: If you are using ewmh then the information is available to status bars and such; there may be a polybar widget for it. Personally, since I'm using mate-panel I run its window list widget and minimized windows are listed in brackets. On Wed, Feb 7, 2024 at 2:21 PM Eyal Erez wrote: > Hi, > > I've recently added XMonad.Actions.Minimize/XMonad.Layout.Minimize to my > setup and I like it a lot. My only issue is that I would love it if there > was some visual queue that the workspace contains minimized windows. > Currently, they just disappear and I need to remember where they exist. > > Is there some way to show that? I'm also using polybar if that helps. > > Thank you, > > -- > *Eyal Erez <**oneself at gmail.com* *>* > > There are 10 types of people, those who know binary and those who don't. > > _______________________________________________ > xmonad mailing list > xmonad at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad > -- brandon s allbery kf8nh allbery.b at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From rdiaz02 at gmail.com Wed Feb 7 20:00:54 2024 From: rdiaz02 at gmail.com (Ramon Diaz-Uriarte) Date: Wed, 07 Feb 2024 21:00:54 +0100 Subject: [xmonad] Visual indication of minimized windows In-Reply-To: References: Message-ID: <87v86zhpqm.fsf@gmail.com> Dear Eyal, Without doing anything, special rofi shows the windows (e.g., "rofi -show window") and the workspace where they are. So if you know that somewhere you have a possibly hidden window with a recognizable name, this works perfectly. However, as far as I can tell, there is no indication that they are hidden. This thread in reddit may be relevant too: https://old.reddit.com/r/xmonad/comments/q63wt6/minimized_windows_list_open_from_list_open_all/ Based on that thread, and some trial-and-error, I have some code in my xmonad.hs that will feed the hidden windows to rofi, so that they are listed (with the name of their workspace), and will be un-hidden on pressing Enter. The code works for me, but I am a complete ignorant in Haskell; this is from the reddit thread (i.e., from Ivan Malison) + trial and error + a few questions to perplexity.ai. The function I bind to a keybinding is myHiddenMenuBring ---------------------------------------------------------------------- minimizedWindows = withMinimized return restoreAll = mapM_ maximizeWindow restoreAllMinimized = minimizedWindows >>= restoreAll windowIsMinimized w = do minimized <- XS.gets minimizedStack return $ w `elem` minimized maybeUnminimize w = windowIsMinimized w >>= flip when (maximizeWindow w) maybeUnminimizeFocused = withFocused maybeUnminimize -- Define a custom WindowBringerConfig to use rofi on hidden windows myRofiHiddenConfig :: WindowBringerConfig myRofiHiddenConfig = def { menuCommand = "rofi" , menuArgs = ["-show", "window", "-dmenu", "-p", "Hidden windows"] , windowFilter = \ w -> elem w <$> XS.gets minimizedStack } myHiddenMenuBring :: X () myHiddenMenuBring = actionMenu myRofiHiddenConfig bringWindow >> maybeUnminimizeFocused (It might be necessary to also import this, which I do anyway import qualified XMonad.Util.Dmenu as DM ) ---------------------------------------------------------------------- Best, R. On Wed, 07-February-2024, at 20:20:16, Eyal Erez wrote: > Hi, > > I've recently added XMonad.Actions.Minimize/XMonad.Layout.Minimize to my setup and I like it a lot. My only issue is that I would love it if there > was some visual queue that the workspace contains minimized windows. Currently, they just disappear and I need to remember where they > exist. > > Is there some way to show that? I'm also using polybar if that helps. > > Thank you, -- Ramon Diaz-Uriarte Department of Biochemistry, Lab B-31 Facultad de Medicina Universidad Autónoma de Madrid Arzobispo Morcillo, 4 28029 Madrid Spain Phone: +34-91-497-2412 Email: rdiaz02 at gmail.com r.diaz at uam.es ramon.diaz at iib.uam.es https://ligarto.org/rdiaz From oneself at gmail.com Thu Feb 8 10:01:48 2024 From: oneself at gmail.com (Eyal Erez) Date: Thu, 8 Feb 2024 12:01:48 +0200 Subject: [xmonad] Visual indication of minimized windows In-Reply-To: <87v86zhpqm.fsf@gmail.com> References: <87v86zhpqm.fsf@gmail.com> Message-ID: Interesting, Didn't think of using dmenu for this. I'll explore it, thank you. On Thu, Feb 8, 2024 at 12:30 AM Ramon Diaz-Uriarte wrote: > Dear Eyal, > > Without doing anything, special rofi shows the windows (e.g., "rofi -show > window") and the workspace where they are. So if you know that somewhere > you have a possibly hidden window with a recognizable name, this works > perfectly. However, as far as I can tell, there is no indication that they > are hidden. > > This thread in reddit may be relevant too: > > https://old.reddit.com/r/xmonad/comments/q63wt6/minimized_windows_list_open_from_list_open_all/ > > Based on that thread, and some trial-and-error, I have some code in my > xmonad.hs that will feed the hidden windows to rofi, so that they are > listed (with the name of their workspace), and will be un-hidden on > pressing Enter. The code works for me, but I am a complete ignorant in > Haskell; this is from the reddit thread (i.e., from Ivan Malison) + trial > and error + a few questions to perplexity.ai. The function I bind to a > keybinding is myHiddenMenuBring > > > ---------------------------------------------------------------------- > minimizedWindows = withMinimized return > restoreAll = mapM_ maximizeWindow > restoreAllMinimized = minimizedWindows >>= restoreAll > > > windowIsMinimized w = do > minimized <- XS.gets minimizedStack > return $ w `elem` minimized > > maybeUnminimize w = windowIsMinimized w >>= flip when (maximizeWindow w) > maybeUnminimizeFocused = withFocused maybeUnminimize > > > -- Define a custom WindowBringerConfig to use rofi on hidden windows > myRofiHiddenConfig :: WindowBringerConfig > myRofiHiddenConfig = def > { menuCommand = "rofi" > , menuArgs = ["-show", "window", "-dmenu", "-p", "Hidden windows"] > , windowFilter = \ w -> elem w <$> XS.gets minimizedStack > } > > myHiddenMenuBring :: X () > myHiddenMenuBring = actionMenu myRofiHiddenConfig bringWindow >> > maybeUnminimizeFocused > > > > (It might be necessary to also import this, which I do anyway > > import qualified XMonad.Util.Dmenu as DM > ) > ---------------------------------------------------------------------- > > > Best, > > R. > > > > > On Wed, 07-February-2024, at 20:20:16, Eyal Erez > wrote: > > Hi, > > > > I've recently added XMonad.Actions.Minimize/XMonad.Layout.Minimize to my > setup and I like it a lot. My only issue is that I would love it if there > > was some visual queue that the workspace contains minimized windows. > Currently, they just disappear and I need to remember where they > > exist. > > > > Is there some way to show that? I'm also using polybar if that helps. > > > > Thank you, > > > -- > Ramon Diaz-Uriarte > Department of Biochemistry, Lab B-31 > Facultad de Medicina > Universidad Autónoma de Madrid > Arzobispo Morcillo, 4 > 28029 Madrid > Spain > > Phone: +34-91-497-2412 > > Email: rdiaz02 at gmail.com > r.diaz at uam.es > ramon.diaz at iib.uam.es > > https://ligarto.org/rdiaz > > > -- *Eyal Erez <**oneself at gmail.com* *>* There are 10 types of people, those who know binary and those who don't. -------------- next part -------------- An HTML attachment was scrubbed... URL: