You are not logged in.

#1 2018-04-04 01:30:58

Socke
New Member
Registered: 2018-04-04
Posts: 1

How to set window type

How could i create xpad notes which are unaffected by the wmctr shortcut? Conky stays open because it sets its window type to desktop, but i can't find a way to do this outside conky with other programs. But surely there is a methode I don't know here... Google was't that helpful, as i could't reproduce their solution:
I tried changing the window type with devilspie2 and "xdotool search --class "Xpad" windowunmap --sync windowmap" should redraw the windows to change window type afterwards. But it only affects _NET_WM_WINDOW_TYPE from which openbox should generate the OB_APP_TYPE. As seen in the dump below that does't work.

xprop | egrep '(_OB_APP|_NET_WM_WINDOW_TYPE)'
_OB_APP_TYPE(UTF8_STRING) = "normal"
_OB_APP_TITLE(UTF8_STRING) = "Notes"
_OB_APP_GROUP_CLASS(UTF8_STRING) = "Xpad"
_OB_APP_GROUP_NAME(UTF8_STRING) = "xpad"
_OB_APP_CLASS(UTF8_STRING) = "xpad"
_OB_APP_NAME(UTF8_STRING) = "xpad"
_OB_APP_ROLE(UTF8_STRING) = "info-JX00DZ"
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DESKTOP

How do you display applications as desktop background? I would love to hear your thoughts because minimizing every window to finally see my notes was not my intention behind this^^

Update: when i restart openbox manually after xpad is open it works like a charm, but restarting openbox blures conkys font until conky is restarted too hmm

Last edited by Socke (2018-04-04 01:55:05)

Offline

#2 2018-04-04 03:15:20

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,673
Website

Re: How to set window type

Another approach: have a look at the bottom of ~/.config/openbox/rc.xml
In the <applications> section you can identify a window by various attributes, and apply various actions to it, including <layer> and <focus>.
I don't know if that will help or not.


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Online

#3 2018-04-04 05:36:55

ohnonot
...again
Registered: 2015-09-29
Posts: 5,592

Re: How to set window type

so you want xpad to stay on the desktop when you press Super-D (win+d) and all other windows are hidden?

you can try to edit rc.xml as suggested by johnraff, maybe it helps.

if you say it works when you restart openbox, does it also work when you reconfigure openbox?
then you could just write a small wrapper script to start xpad:

#!/bin/sh
xpad &
# now find the windowid of xpad 
xprop -set someproperty -id windowid
openbox --reconfigure

if you have an editable file(*) that executes before openbox starts, you can put it there (and maybe no --reconfigure is required).

(*) on my system it's ~/.xinitrc, but i gather things are handled differently on bunsenlabs.

Last edited by ohnonot (2018-04-04 05:37:38)

Offline

#4 2018-04-04 08:28:53

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: How to set window type

ohnonot wrote:

on my system it's ~/.xinitrc, but i gather things are handled differently on bunsenlabs.

The OP could try adding your stanza to ~/.xsessionrc, that should be run by LightDM upon login (add it to ~/.profile for a console login).

Offline

#5 2018-04-05 05:55:56

ohnonot
...again
Registered: 2015-09-29
Posts: 5,592

Re: How to set window type

disclaimer: this report is from an archlinux system. things might always be different on debian stable.

I tested adding xpad to ~/.xinitrc (~/.xsessionrc on BL), and then the xdotool line you mentioned:

xpad &
xdotool search --sync --onlyvisible --class "Xpad" windowunmap --sync windowmap

it works in the sense that it doesn't break anything and i can see xpad on the desktop after logging in.

but i could not get openbox to exclude it from Win-D, nor would it ignore it when placing new windows, and making it visible on all desktops only works when i do it this way + add an according instruction to openbox' rc.xml <applications> section.

I also tried

xprop -format _NET_WM_WINDOW_TYPE 32a -set _NET_WM_WINDOW_TYPE _NET_WM_WINDOW_TYPE_DOCK
xdotool search --sync --onlyvisible --class "Xpad" windowunmap --sync windowmap
xdotool search --sync --onlyvisible --class "Xpad" --overrideredirect 1

but nothing works in a satisfactory way.

my suspicion is that GTK3 simply does not want to play ball and changes things back the way it deems appropriate.
sad

However, I'm intrigued and I might hack a notepad script that uses conky & a simple text file & some xdotool magic to make it clickable (and thus indirectly editable).

Last edited by ohnonot (2018-04-05 05:56:39)

Offline

#6 2018-04-06 02:05:14

PackRat
jgmenu user Numero Uno
Registered: 2015-10-02
Posts: 2,674

Re: How to set window type

A quick fix -

Make xpad sticky across all desktops. Then when you want to read your notes, instead of using the showdesktop key binding, switch desktops. Xpad should be open on whatever desktop you switch to.


You must unlearn what you have learned.
    -- yoda

Offline

#7 2018-04-06 05:50:45

ohnonot
...again
Registered: 2015-09-29
Posts: 5,592

Re: How to set window type

PackRat wrote:

Make xpad sticky across all desktops.

does that actually work on your system, packrat?

Offline

#8 2018-04-06 12:17:34

PackRat
jgmenu user Numero Uno
Registered: 2015-10-02
Posts: 2,674

Re: How to set window type

Xpad is not in the Void repos, so I can't specifically check that. Works with everything else though. In theory, should work with any application that can be made sticky.

Another option would be to have xpad open on it's own desktop - you'll come across that sort of configuration with tiling window managers; have xpad assigned to workspace/tag 9 in dwm for example.


You must unlearn what you have learned.
    -- yoda

Offline

Board footer

Powered by FluxBB