You are not logged in.
Hello
I'm trying to replicate a window decoration style I have been using on various window managers since KDE 2, one that is based on the MWM / CDE style.
This is what it should look like for regular windows:
And for a maximized window (ignoring the size):
By the way, the orange is only used to highlight the active window, otherwise it would be grey/blue. I will post full screenshots and the theme files when it's ready.
Leaving aside the toggled maximize button (I can live without it, if it's not an option) I'm having a hard time with the window borders. If I use the option to remove the borders on maximized windows, only the side borders are removed, but the top "border" remains, because it's really part of the title in an XFCE theme:
Can I remove the top border too, maybe using some kind of negative margin? I tried various combinations of options, to no avail. Is this effect at all possible in XFCE?
Last edited by etatoby (2017-04-15 15:40:53)
Offline
There appears to be an issue with the image links you posted.
Regards,
MDM
Offline
Thank you.
Stupid image host!
Offline
I don't think it's possible. As you've noted, the top border is part of the images that make up the title bar part of the xfwm4 theme, so they can't be removed. I can't think of a way to add negative margins either.
Thinking out of the box, if you created a second theme that was exactly the same as the first except for the top border, you could run a repeating script that looks for a window that is maximized and focused, and change the themes on the fly. Something like:
#!/bin/bash
LAST_STATE=0
while true
do
let FOUND=0
for wid in $(wmctrl -l | awk '{print $1}')
do
if xprop -id $wid | grep _NET_WM_STATE | grep -E "MAXIMIZED_HORZ.*MAXIMIZED_VERT.*STATE_FOCUSED" > /dev/null; then
let FOUND=1
break
fi
done
if [ $FOUND -eq 1 ]; then
if [ $LAST_STATE -ne 1 ]; then
let LAST_STATE=1
xfconf-query -c xfwm4 -p /general/theme -s "theme_no_top_border"
fi
else
if [ $LAST_STATE -eq 1 ]; then
let LAST_STATE=0
xfconf-query -c xfwm4 -p /general/theme -s "theme_with_top_border"
fi
fi
sleep 1
done
Replace the strings "theme_no_top_border" and "theme_with_top_border" with the appropriate window manager theme names.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
ToZ, just out of curiosity - could this script be modified to set different Xfwm theme for a different applications on the fly? Based on xprop WM_CLASS for example.
Offline
ToZ, just out of curiosity - could this script be modified to set different Xfwm theme for a different applications on the fly? Based on xprop WM_CLASS for example.
Modified in what way? Do you want it to do exactly the same but have different window manager themes depending on which application is maximized and focused?
Or are you thinking about something a little different? If so, how do you expect that it would work?
Please note that using this method isn't without it's draw backs. The change wouldn't be instantaneous (it might be as slow as one second late due to the sleep timeout) and you would have a script constantly running and checking on the state of all open windows.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Just different Xfwm theme on different application(s). Let's say I want xfce4-terminal to have red borders ("B theme") and the rest would use default theme selected in xfwm4-settings ("A theme") as normal. No matter the current state of that xfce4-terminal window (maximized, inactive etc.).
Not that I need it personally, but I was searching lately if it's possible in Xfce (for fun) and I found some forum threads saying it's not (there was just a solution for different GTK2 theme). Plus, someone just recently asked me this in the comments on xfce-look.org under my Xfwm theme.
Offline
Just different Xfwm theme on different application(s). Let's say I want xfce4-terminal to have red borders ("B theme") and the rest would use default theme selected in xfwm4-settings ("A theme") as normal. No matter the current state of that xfce4-terminal window (maximized, inactive etc.).
Not really. Any method you use would change the window manager theme for all applications displayed, not just for xfce4-terminal.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
[ Generated in 0.014 seconds, 7 queries executed - Memory usage: 549.66 KiB (Peak: 566.94 KiB) ]