Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Toggle decorations for a window from the shell?

Tags:

shell

x11

Is there a way to toggle X11 window decorations for a single window, given the window's ID, from a script? If the answer to this question is window manager specific, I'm using openbox.

I thought xdotool could do this with:

xdotool ID alt+space d

or

xdotool ID alt+space; sleep 1; xdotool ID d

The popup does appear but something is typed into my shell rather than into the popup.

like image 436
John Schmitt Avatar asked Oct 18 '25 15:10

John Schmitt


1 Answers

you could set a keystroke for that in the openbox config ~/.config/openbox/${config}.xml in the <keyboard> section like this:

 <keybind key="C-S-d">
   <action name="ToggleDecorations"/>
 </keybind>

..to have decorations toggled by pressing CTRL-SHIFT-d in almost any application.

I've made 'em toggled by the maximize/shade function automatically when double-clicking the titlebar by adding <action name="ToggleDecorations"/> to the <mousebind button="Left" action="DoubleClick"> part of the <context name="Titlebar"> section like this:

<mousebind button="Left" action="DoubleClick">
  <action name="ToggleDecorations"></action>
  <action name="ToggleMaximize"/>
</mousebind>

so windows are decorized only as I need 'em to be. hope it helps even if the question is years old...

regards

like image 179
d0n Avatar answered Oct 20 '25 15:10

d0n