<div dir="ltr">Interesting,<div><br></div><div>Didn't think of using dmenu for this. I'll explore it, thank you.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Feb 8, 2024 at 12:30 AM Ramon Diaz-Uriarte <<a href="mailto:rdiaz02@gmail.com">rdiaz02@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Dear Eyal,<br>
<br>
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.<br>
<br>
This thread in reddit may be relevant too:<br>
<a href="https://old.reddit.com/r/xmonad/comments/q63wt6/minimized_windows_list_open_from_list_open_all/" rel="noreferrer" target="_blank">https://old.reddit.com/r/xmonad/comments/q63wt6/minimized_windows_list_open_from_list_open_all/</a><br>
<br>
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 <a href="http://perplexity.ai" rel="noreferrer" target="_blank">perplexity.ai</a>. The function I bind to a keybinding is myHiddenMenuBring<br>
<br>
<br>
----------------------------------------------------------------------<br>
minimizedWindows = withMinimized return<br>
restoreAll = mapM_ maximizeWindow<br>
restoreAllMinimized = minimizedWindows >>= restoreAll<br>
<br>
<br>
windowIsMinimized w = do<br>
minimized <- XS.gets minimizedStack<br>
return $ w `elem` minimized<br>
<br>
maybeUnminimize w = windowIsMinimized w >>= flip when (maximizeWindow w)<br>
maybeUnminimizeFocused = withFocused maybeUnminimize<br>
<br>
<br>
-- Define a custom WindowBringerConfig to use rofi on hidden windows<br>
myRofiHiddenConfig :: WindowBringerConfig<br>
myRofiHiddenConfig = def<br>
{ menuCommand = "rofi"<br>
, menuArgs = ["-show", "window", "-dmenu", "-p", "Hidden windows"]<br>
, windowFilter = \ w -> elem w <$> XS.gets minimizedStack<br>
}<br>
<br>
myHiddenMenuBring :: X ()<br>
myHiddenMenuBring = actionMenu myRofiHiddenConfig bringWindow >> maybeUnminimizeFocused<br>
<br>
<br>
<br>
(It might be necessary to also import this, which I do anyway<br>
<br>
import qualified XMonad.Util.Dmenu as DM<br>
)<br>
----------------------------------------------------------------------<br>
<br>
<br>
Best,<br>
<br>
R.<br>
<br>
<br>
<br>
<br>
On Wed, 07-February-2024, at 20:20:16, Eyal Erez <<a href="mailto:oneself@gmail.com" target="_blank">oneself@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
> 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<br>
> was some visual queue that the workspace contains minimized windows. Currently, they just disappear and I need to remember where they<br>
> exist.<br>
><br>
> Is there some way to show that? I'm also using polybar if that helps.<br>
><br>
> Thank you,<br>
<br>
<br>
-- <br>
Ramon Diaz-Uriarte<br>
Department of Biochemistry, Lab B-31<br>
Facultad de Medicina <br>
Universidad Autónoma de Madrid <br>
Arzobispo Morcillo, 4<br>
28029 Madrid<br>
Spain<br>
<br>
Phone: +34-91-497-2412<br>
<br>
Email: <a href="mailto:rdiaz02@gmail.com" target="_blank">rdiaz02@gmail.com</a><br>
<a href="mailto:r.diaz@uam.es" target="_blank">r.diaz@uam.es</a><br>
<a href="mailto:ramon.diaz@iib.uam.es" target="_blank">ramon.diaz@iib.uam.es</a><br>
<br>
<a href="https://ligarto.org/rdiaz" rel="noreferrer" target="_blank">https://ligarto.org/rdiaz</a><br>
<br>
<br>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><font face="'courier new', monospace"><b>Eyal Erez <</b><a href="mailto:oneself@gmail.com" target="_blank"><b>oneself@gmail.com</b></a><b>></b><br><br></font><div><div><font face="'courier new', monospace">There are 10 types of people, those who know binary and those who don't.</font></div></div><div><font face="'courier new', monospace"><br></font></div></div></div>