You are not logged in.

#26 2021-12-19 19:07:33

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,454

Re: Arch Linux Fvwm myExt + Xfce-Fvwm-EXT (respin) CD

rasat wrote:

If it is /home/amurt then its my issue that has to be removed.

Dyslectic read.., yes it's 'amurt' :-)

edit:
You may be interested what I have done to the 'building' ;-)
A picture  speaks a thousand words:

bigsize

fvwm3

Last edited by qinohe (2021-12-19 20:34:49)

Offline

#27 2021-12-20 10:48:24

rasat
Forum Fellow
From: Finland, working in Romania
Registered: 2002-12-27
Posts: 2,279
Website

Re: Arch Linux Fvwm myExt + Xfce-Fvwm-EXT (respin) CD

Great! It's good to see how others are using the configs.

The flux-taskbar looks good. The iconbuttons (simpleButton.sys) need better-looking configs when not using a background panel bar (dash to dock style). And the default controlbuttons (controlPanelB.sys) is better at far right-side (*CPanelButtons: Geometry 315x39-0+4). Also, I found a few bugs. One more upgrade is needed 2.3.4. I hope this will be last before 3.x. smile

qinohe wrote:

Dyslectic read.., yes it's 'amurt' :-)

Oops, in .config/nomac. To avoid setting the language at first load. Fixed by removing content in [GlobalSettings] or replacing nomac with feh.

Last edited by rasat (2021-12-20 11:08:33)


Markku

Offline

#28 2021-12-20 16:29:00

rasat
Forum Fellow
From: Finland, working in Romania
Registered: 2002-12-27
Posts: 2,279
Website

Re: Arch Linux Fvwm myExt + Xfce-Fvwm-EXT (respin) CD

This is a suggested dashToDock.sys config. Added on your screenshot (upper left corner). Color, size, and location for the users to change. Transparent would be great but Fvwm does not do it well.
https://rasatpc.net/screenshot/arch-fvw … dified.png

Last edited by rasat (2021-12-20 16:31:28)


Markku

Offline

#29 2021-12-20 17:58:25

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,454

Re: Arch Linux Fvwm myExt + Xfce-Fvwm-EXT (respin) CD

rasat wrote:

...And the default controlbuttons (controlPanelB.sys) is better at far right-side (*CPanelButtons: Geometry 315x39-0+4). Also, I found a few bugs. One more upgrade is needed 2.3.4. I hope this will be last before 3.x. smile

Your in charge here :-) but I personally like the way these bars look at the moment...

rasat wrote:

This is a suggested dashToDock.sys config. Added on your screenshot (upper left corner). Color, size, and location for the users to change. Transparent would be great but Fvwm does not do it well.
https://rasatpc.net/screenshot/arch-fvw … dified.png

Yes, I noticed the transparency issue already but it's not a real problem to me.
Well, the layout of that picture you show with adaptions is fine, you do notice you take away the 'floating' effect. It's like you have a chair standing in the middle of the room you than place against a wall.
Glad we can change these kind of things our-self, still, I'm curious about 2.3.4, just do it ;-)

Offline

#30 2021-12-20 18:24:00

rasat
Forum Fellow
From: Finland, working in Romania
Registered: 2002-12-27
Posts: 2,279
Website

Re: Arch Linux Fvwm myExt + Xfce-Fvwm-EXT (respin) CD

The advantage with this config, background of each button/area can be easily changed/removed as per liking. Same with Flux-taskbar.

dashToDeck-Fvwm-myExt-2.png

Last edited by rasat (2021-12-20 18:32:15)


Markku

Offline

#31 2021-12-20 23:12:50

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,454

Re: Arch Linux Fvwm myExt + Xfce-Fvwm-EXT (respin) CD

Okay I get the picture, I'll await the update, surprise me  cool

Offline

#32 2021-12-21 17:31:50

rasat
Forum Fellow
From: Finland, working in Romania
Registered: 2002-12-27
Posts: 2,279
Website

Re: Arch Linux Fvwm myExt + Xfce-Fvwm-EXT (respin) CD

qinohe wrote:

I'll await the update, surprise me  cool

big_smile

Merry Xmas qinohe and all Arch users.

Fvwm3-myExt-2.3.4-xmas-th.png

Config ../7Modules/dashToDock.sys is now self-explanatory on how to change to horizontal or vertical. And icons 32x32 or 40x40. On the left edge, the dock sits on a thin bar that remains when auto-hide. Download myExt 2.3.4 and iso 1.2.1 from SourceForge.
https://sourceforge.net/projects/fvwm3- … ion/files/

I am closing my workshop for a while to give space for 3.x. invention. smile

Last edited by rasat (2021-12-21 17:36:54)


Markku

Offline

#33 2021-12-21 19:02:00

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,454

Re: Arch Linux Fvwm myExt + Xfce-Fvwm-EXT (respin) CD

rasat wrote:

big_smile

Merry Xmas qinohe and all Arch users.

Config ../7Modules/dashToDock.sys is now self-explanatory on how to change to horizontal or vertical. And icons 32x32 or 40x40. On the left edge, the dock sits on a thin bar that remains when auto-hide. Download myExt 2.3.4 and iso 1.2.1 from SourceForge.
https://sourceforge.net/projects/fvwm3- … ion/files/

I am closing my workshop for a while to give space for 3.x. invention. smile

Merry Xmas to you too rasat. I have already run the ISO and updated my own profile(archiso) and both run fine.
Nice job done ;-) I will see if I can script some part and make it change appearance on a button input F.I. The dash-panel I mean.
Nice hobby for the holidays...

Good luck for the next version, see you when you get there :-)

edit:
The easiest way is to swap 'dashToDock' for 'simpleButton' panel and restart FVWM 'in place'

Add the line to 'StartFuction' in 'FVWM-StartFunction.sys'
+ I Module FvwmCommandS

Add a button to both 'simpleButton' and 'dashToDock' pointing to next script:

#!/bin/sh

sb='Read $\[\FVWM_USERDIR\]\/7Modules/simpleButton.sys'
dd='Read $\[\FVWM_USERDIR\]\/7Modules/dashToDock.sys'

sed -i "s|\#\ ${sb}|${sb}|;tq; s|${sb}|\#\ ${sb}|;:q" /home/"${USER}"/.fvwm/config && FvwmCommand "Restart"
sed -i "s|\#\ ${dd}|${dd}|;tq; s|${dd}|\#\ ${dd}|;:q" /home/"${USER}"/.fvwm/config && FvwmCommand "Restart"

This method works fine, However, I'm creating a similar script not swaping bars but changing the layout of 'dashToDock' from vertical to horizontal and restart FVWM in place

Last edited by qinohe (2021-12-23 15:58:02)

Offline

#34 2021-12-27 19:54:45

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,454

Re: Arch Linux Fvwm myExt + Xfce-Fvwm-EXT (respin) CD

Something I completely forgot to say is that the scripts in '~/fvwm/scripts' are not executable by default, for that profiledef needs to be edited:

["/etc/skel/.fvwm/scripts/"]="0:0:751"

You would have probably figured it out using external programs...


It's possible to change position of the 'apps' bar from North to West.
The bar can also be hidden, both these options are done through a button, one for each option.

It works fine if your resolution doesn't change, so it's nice for 'showcasing', but, unless it works with all resolutions available in 'ButtonScreenPosition.sh' there's not much use for it.

So, I post the scripts but don't know if it's really worth it;-)

For this to work 'Geometry' in script and 'dashToDock.sys' must! be the same OC.
All double lines like 'Geometry' available it the script too should be removed from 'dashToDock.sys'

Also this line needs to be added somewhere in dashToDock.sys:

#orient=vertiz

First script is 'dash-bar.sh' which moves the bar from West to North & vice versa.

#!/bin/sh

# dashToDock Vertical or Horizontal orientation

hg='\*\dashToDock: Geometry 530x39-695+4'
vg='\*\dashToDock: Geometry 56x536+2+192'
sed -i "s/${hg}/${vg}/;tq; s/${vg}/${hg}/;:q" /home/"${USER}"/.fvwm/7Modules/dashToDock.sys

hr='\*\dashToDock: Rows 15'
vr='\*\dashToDock: Rows 1'
sed -i "s/${hr}/${vr}/;tq; s/${vr}/${hr}/;:q" /home/"${USER}"/.fvwm/7Modules/dashToDock.sys

hc='\*\dashToDock: Columns 15'
vc='\*\dashToDock: Columns 1'
sed -i "s/${hc}/${vc}/;tq; s/${vc}/${hc}/;:q" /home/"${USER}"/.fvwm/7Modules/dashToDock.sys

hb='\*\hideBar: Geometry 530x6-695+0'
vb='\*\hideBar: Geometry 6x536+0+190'
sed -i "s/${hb}/${vb}/;tq; s/${vb}/${hb}/;:q" /home/"${USER}"/.fvwm/7Modules/dashToDock.sys

hp='horiz'
vp='vertiz'
sed -i "s/${hp}/${vp}/;tq; s/${vp}/${hp}/;:q" /home/"${USER}"/.fvwm/7Modules/dashToDock.sys

sed -i 's/up-icon.png/left-icon.png/;tq; s/left-icon.png/up-icon.png/;:q' /home/"${USER}"/.fvwm/7Modules/dashToDock.sys

ho='I autohide dashToDock 1000 N'
vo='I autohide dashToDock 1000 W'
sed -i "s/${ho}/${vo}/;tq; s/${vo}/${ho}/;:q" /home/"${USER}"/.fvwm/1Functions/autoHideList.sys

FvwmCommand "Restart"

The second script 'hide-bar.sh', hides or shows the bar

#!/bin/sh

orient=$(awk '/dashToDock/{print}' ~/.fvwm/1Functions/autoHideList.sys)
cor=$(awk -F'=' '/orient/{print $NF}' ~/.fvwm/7Modules/dashToDock.sys)

# if there is a bar, remove it
# if there is no bar check if it should be placed N(orth) or W(est)
if [ "${orient}" ]; then
    sed -i "/${orient}/d" ~/.fvwm/1Functions/autoHideList.sys
elif [ ! "${orient}" ]; then
    if [ "${cor}" = 'horiz' ]; then
        sed -i "/ExtSwitchButtons/a + I autohide dashToDock 1000 N" ~/.fvwm/1Functions/autoHideList.sys
    elif [ "${cor}" = 'vertiz' ]; then
        sed -i "/ExtSwitchButtons/a + I autohide dashToDock 1000 W" ~/.fvwm/1Functions/autoHideList.sys
    fi
fi

FvwmCommand "Restart"

Offline

#35 2021-12-29 21:35:36

rasat
Forum Fellow
From: Finland, working in Romania
Registered: 2002-12-27
Posts: 2,279
Website

Re: Arch Linux Fvwm myExt + Xfce-Fvwm-EXT (respin) CD

Great, interesting script.

Here is one new feature for myExt ver.3.0 which I have wanted for a long time. The Window List feature is nice but to make it as an "Activity Overview" similar to Gnome and Xfdashboard without featuring as full screen, is much better. Became awesome with the colorset Transparent and ParentalRelativity option showing the screen wallpaper as background for the window list thumbnails.

fvwmOverview-myExt3.0-300x.png

Last edited by rasat (2021-12-29 21:45:51)


Markku

Offline

#36 2021-12-30 12:10:06

rasat
Forum Fellow
From: Finland, working in Romania
Registered: 2002-12-27
Posts: 2,279
Website

Re: Arch Linux Fvwm myExt + Xfce-Fvwm-EXT (respin) CD

qinohe wrote:
res=$(xdpyinfo | awk '/dimensions:/{print $2}')
screenres=('1920x1080 870x36-540-15'
           '1280x720 870x36-205-15'
           '1360x768 870x36-245-15'
           '2560x1440 870x36-845-15'
           '3840x2160 870x36-1485-15')

for screen in "${screenres[@]}"; do
    scr=$(echo "${screen}" | awk -F" " '{print $1}' )
    loc=$(echo "${screen}" | awk -F" " '{print $2}' )

    if [[ "${scr}" == "${res}" ]]; then
        sed -i "/870x36/c\*FluxPanelButtons: Geometry ${loc}/" /home/"$USER"/.fvwm/7Modules/taskButtonsFlux.sys && exit
    fi
done

To use your sample script, I want to include more configs. How do you add more, for example......

1920x1080
sed -i '/450x96/c\*RestShutButtons: Geometry 450x96-740-495' /home/$USER/.fvwm/7Modules/restartShutdown.sys
sed -i '/+90+90/c\*bgWOButton: Geometry 1400x900+90+90' /home/$USER/.fvwm/7Modules/WOverview/bgWOview.sys

1280x1024
sed -i '/450x96/c\*RestShutButtons: Geometry 450x96-420-467' /home/$USER/.fvwm/7Modules/restartShutdown.sys
sed -i '/+90+90/c\*bgWOButton: Geometry 900x844+90+90' /home/$USER/.fvwm/7Modules/WOverview/bgWOview.sys

Last edited by rasat (2021-12-30 12:19:04)


Markku

Offline

#37 2021-12-30 20:30:23

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,454

Re: Arch Linux Fvwm myExt + Xfce-Fvwm-EXT (respin) CD

If I understand correct, all the above in one script would be something like this?:-)

Untested!

#!/bin/bash

res=$(xdpyinfo | awk '/dimensions:/{print $2}')

screen_res=('1920x1080 870x36-540-15'
           '1280x720 870x36-205-15'
           '1360x768 870x36-245-15'
           '2560x1440 870x36-845-15'
           '3840x2160 870x36-1485-15')

for screen in "${screen_res[@]}"; do
    scr=$(echo "${screen}" | awk -F" " '{print $1}' )
    loc=$(echo "${screen}" | awk -F" " '{print $2}' )

    if [[ "${scr}" == "${res}" ]]; then
        sed -i "/870x36/c\*FluxPanelButtons: Geometry ${loc}/" /home/"$USER"/.fvwm/7Modules/taskButtonsFlux.sys && break
    fi
done

restartShutdown_res=('1920x1080 450x96-740-495'
                     '1280x1024 450x96-420-467')

for screen in "${restartShutdown_res[@]}"; do
    scr=$(echo "${screen}" | awk -F" " '{print $1}' )
    loc=$(echo "${screen}" | awk -F" " '{print $2}' )

    if [[ "${scr}" == "${res}" ]]; then
        sed -i "/450x96/c\*RestShutButtons: Geometry ${loc}/" /home/"$USER"/.fvwm/7Modules/restartShutdown.sys && break
    fi
done

bgWOview_res=('1920x1080 1400x900+90+90'
              '1280x1024 900x844+90+90')

for screen in "${bgWOview_res[@]}"; do
    scr=$(echo "${screen}" | awk -F" " '{print $1}' )
    loc=$(echo "${screen}" | awk -F" " '{print $2}' )

    if [[ "${scr}" == "${res}" ]]; then
        sed -i "/+90+90/c\*bgWOButton: Geometry ${loc}/" /home/"$USER"/.fvwm/7Modules/WOverview/bgWOview.sys && break
    fi
done

Offline

#38 2021-12-30 20:52:39

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,334

Re: Arch Linux Fvwm myExt + Xfce-Fvwm-EXT (respin) CD

qinohe wrote:

If I understand correct, all the above in one script would be something like this?:-)

Untested!

I can see far too many awk's and sed's in this as well as an unneeded bash, if you know what you're doing you can just write a single, elegant awk script instead......

Which I can't do unfortunately. Now if I can try to get Trilby's attention....


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#39 2021-12-30 21:14:39

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 26,864
Website

Re: Arch Linux Fvwm myExt + Xfce-Fvwm-EXT (respin) CD

Well, my attention is here - but from reading that script I can't for the life of me tell what the end goal is ... there's a lot of effectively "dead code" or something similar in that the first loop loops through all resolutions and does some parsing or calculating, but then appears to only use those results if a condition is met for a specific resolution.  So why do all the other passes through the loop if the resolution is known beforehand?? I need to read through the thread to identify the actual goal of the script(s), unless someone wants to restate it.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#40 2021-12-30 21:37:57

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,454

Re: Arch Linux Fvwm myExt + Xfce-Fvwm-EXT (respin) CD

Slithery wrote:

I can see far too many awk's and sed's in this as well as an unneeded bash, if you know what you're doing you can just write a single, elegant awk script instead......

Which I can't do unfortunately. Now if I can try to get Trilby's attention....

Thanks, I should learn a little more awk, I know, never got around doing it...

edit:shouldn't I need bash for arrays?

Trilby wrote:

Well, my attention is here - but from reading that script I can't for the life of me tell what the end goal is ... there's a lot of effectively "dead code" or something similar in that the first loop loops through all resolutions and does some parsing or calculating, but then appears to only use those results if a condition is met for a specific resolution.  So why do all the other passes through the loop if the resolution is known beforehand?? I need to read through the thread to identify the actual goal of the script(s), unless someone wants to restate it.

Thanks, well, the script swaps locations 'X Y ' axis and if the value changes to another resolution, swap the variables, that's basically it.

Last edited by qinohe (2021-12-30 21:39:33)

Offline

#41 2021-12-30 21:46:47

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 26,864
Website

Re: Arch Linux Fvwm myExt + Xfce-Fvwm-EXT (respin) CD

Well, that's a completely nonsensical description of that script.  It clearly does nothing of that sort.

In any case, I believe this accomplishes the same goal.  This separates data from code, so the data can be readily updated without digging through obscure loops and sed statements.  It also uses some variables ... though a few of them are horribly named as I don't even know what 'a' 'b' and 'c' represent: they should get real names.  There are also x's in the data table that need to be filled in ... the scripts above adjusted for many more resolutions in one loop than it did in the others: what should be the setting for the RestShutButton and bgWOButton things for the other resolutions?

Most importantly, where do these values come from?  If they can be calculated based on the resolution, they should be calculated rather than using a hard-coded data table with a few select resolutions provided.  But anywhoo ...

#!/bin/sh

## RESOLUTION  PANEL  RESTART   BGWO
#: 3840x2160   1485   x         x
#: 2560x1440   845    x         x
#: 1920x1080   540    740-495   1400x900
#: 1360x768    245    x         900x844
#: 1280x720    201    420-467   x

res=$(xdpyinfo | awk '/dimensions:/{print $2}')
path="/home/$USER/.fvwm/"

grep -Fm 1 "#: $res" "$0" | (
	read ignored a b c
	sed -i "/870x36/c\*FluxPanelButtons: Geometry $a-15/" "$path/taskButtonsFlux.sys"
	sed -i "/450x96/c\*RestShutButtons: Geometry $b/" "$path/7Modules/restartShutdown.sys"
	sed -i "/+90+90/c\*bgWOButton: Geometry $c+90+90/" "$path/7Modules/WOverview/bgWOview.sys"
)

The three sed lines are still pretty ugly, but as I have no idea what the original files look like I'm not going to mess with them.

The lesson of this script is effectively just the rule of representation.  Though you can feel free to ignore that blog author's final conclusion in support of OOP.  My shell script is definitely not OOP.  Well structured data and object oriented programming are completely orthogonal ideas.  There are good and bad examples of data structures both in and out of OOP.  OOP only forces one to add structure ... this rarely results in better structure.

EDIT: and here's a slightly simplified version if and only if this is the only thing in the script and you are free to abuse the argv array:

#!/bin/sh

## RESOLUTION  PANEL  RESTART   BGWO
#: 3840x2160   1485   x         x
#: 2560x1440   845    x         x
#: 1920x1080   540    740-495   1400x900
#: 1360x768    245    x         900x844
#: 1280x720    201    420-467   x

res=$(xdpyinfo | awk '/dimensions:/{print $2}')
path="/home/$USER/.fvwm/"

set -- $(grep -Fm 1 "#: $res" "$0")

sed -i "/870x36/c\*FluxPanelButtons: Geometry $3-15/" "$path/taskButtonsFlux.sys"
sed -i "/450x96/c\*RestShutButtons: Geometry $4/" "$path/7Modules/restartShutdown.sys"
sed -i "/+90+90/c\*bgWOButton: Geometry $5+90+90/" "$path/7Modules/WOverview/bgWOview.sys"

Last edited by Trilby (2022-01-01 22:02:24)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#42 2021-12-31 21:11:26

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,454

Re: Arch Linux Fvwm myExt + Xfce-Fvwm-EXT (respin) CD

Okay, I have read your argument about my code and read the pages you linked to.
I do my best, try to understand everything, but this was what I could come up with ATM.
I also promise you it would do the job it needs to do....
About me being nonsensical, maybe ;-) I didn't choose the right words but it is about doing what I said it should.

First, it's not my project , rasat is creating this WM.
I don't know if there is an online repo, github FI.
For exact answer and what exactly he is planing to do with the script... I don't know!, ask rasat.
Here's an example of the file 'restartShutdown.sys'

## 7Modules: restartShutdown.sys
## By rasat 5 Feb 2021
#

Colorset 202 VGradient 50 #f5f6f7 #b6b6b6
Colorset 201 HGradient 50 #646464 #b6b6b6

SetEnv logo-image $[HOME]/.fvwm/images
Module FvwmButtons RestShutButtons

DestroyModuleConfig RestShutButtons: *
*RestShutButtons: Geometry 450x96-740-495
#*RestShutButtons: PressColorset 5
*RestShutButtons: Fore #2b4e5e
*RestShutButtons: Back #88b2b1
*RestShutButtons: Frame 1
*RestShutButtons: Rows 2
#*RestShutButtons: BoxSize smart
*RestShutButtons: Font "xft:Sans:size=14:antialias=True"
*RestShutButtons: Padding 2 2

*RestShutButtons: (Icon "$[logo-image]/fvwm-logo-small.png", Colorset 20)
*RestShutButtons: (3x1, Title "Power Off", Colorset 202, Font "xft:Sans:size=16:antialias=True")

*RestShutButtons: (4x1,Container(Rows 1,Frame 1))
*RestShutButtons: (Title Cancel, Action(Mouse 1) KillModule FvwmButtons RestShutButtons)
*RestShutButtons: (Title Logout, Action(Mouse 1) Quit)
*RestShutButtons: (Title Resart, Action(Mouse 1) Exec systemctl reboot)
*RestShutButtons: (Title "Power Off", Action(Mouse 1) Exec systemctl poweroff)

Offline

#43 2022-01-01 10:17:31

rasat
Forum Fellow
From: Finland, working in Romania
Registered: 2002-12-27
Posts: 2,279
Website

Re: Arch Linux Fvwm myExt + Xfce-Fvwm-EXT (respin) CD

First, Happy New Year to everybody!

Trilby wrote:

I need to read through the thread to identify the actual goal of the script(s), unless someone wants to restate it.

To adjust listed configs, such as the RestartShutdown button and Fluxbox-looking Taskbar with the change of screen resolutions. First, I presented a script for one config and later he suggested making it more readable.
https://bbs.archlinux.org/viewtopic.php … 8#p2009328

I didn't test it but liked the idea of listing the resolutions separately. Next question, to have a script to include more configs. This makes my script (though it works) very long. Other users will not like it. To keep it simple (maybe later fully automated) the config's geometry is pre-calculated as default or calculated manually by the user if they want to change the size of the taskbar or button.

One solution is to list the geometry as per the different resolutions in one place, such as FluxTaskBar to be centered in the middle-bottom of screen and RestartShutdown button in the middle of screen. And then the script does the job accordingly.

1920x1080
*FluxPanelButtons: Geometry 870x36-540-15
*RestShutButtons: Geometry 450x96-735-492

1360x768
*FluxPanelButtons: Geometry 870x36-245-15
*RestShutButtons: Geometry 450x96-455-336

Last edited by rasat (2022-01-01 18:28:40)


Markku

Offline

#44 2022-01-01 13:02:17

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 26,864
Website

Re: Arch Linux Fvwm myExt + Xfce-Fvwm-EXT (respin) CD

Yeah, I had figured that out - which is how I offered my version which does the same with no need for loops or chained awk/sed commands.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#45 2022-01-01 18:23:33

rasat
Forum Fellow
From: Finland, working in Romania
Registered: 2002-12-27
Posts: 2,279
Website

Re: Arch Linux Fvwm myExt + Xfce-Fvwm-EXT (respin) CD

Not to take other users' credit as I wrote earlier. smile The first workable script was made by qinohe, not me. As I wrote it works well but becomes long with 8 resolutions and now there are five configs. This required a readable script as he suggested.

Thanks, Trilby your script is interesting. Got the idea. I have to think a bit about how five and more configs will be added.

Last edited by rasat (2022-01-01 18:25:08)


Markku

Offline

#46 2022-01-01 18:29:17

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 26,864
Website

Re: Arch Linux Fvwm myExt + Xfce-Fvwm-EXT (respin) CD

Just add more columns to the data table and additional lines to the existing three sed commands.  But do give the variables meaningful names other than the current 'a', 'b', 'c' - these could / should relate to the column names of the table.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#47 2022-01-01 21:31:58

rasat
Forum Fellow
From: Finland, working in Romania
Registered: 2002-12-27
Posts: 2,279
Website

Re: Arch Linux Fvwm myExt + Xfce-Fvwm-EXT (respin) CD

Cannot get "set" string to work. It adds the screen resolution in geometry.

set -- $(grep -Fm 1 "#: $res" "$0")

RESULT: *FluxPanelButtons: Geometry 1020x36-1920x1080-18

CORRECT: *FluxPanelButtons: Geometry 1020x36-450-18

Correct qinohe script:

if [ "${res}" = '1920x1080' ]; then
   sed -i '/1020x36/c\*FluxPanelButtons: Geometry1020x36-450-18' /home/$USER/.fvwm/7Modules/taskButtonsFlux.sys

This is the modified script.

#!/bin/sh

## RESOLUTION  PANEL  RESTART    BGWO       MENU
#: 3840x2160   1410   1695-1032  1700x1400  2375
#: 2560x1440   770    1055-672   1500x1200  1735
#: 1920x1200   450    735-552    1400x1060  1450
#: 1920x1080   450    735-492    1400x940   1450
#: 1600x900    290    575-402    1180x720   1255
#: 1360x768    170    455-336    1020x588   1135
#: 1280x1024   130    415-464    900x844    1095
#: 1280x720    130    415-312    900x540    1095

res=$(xdpyinfo | awk '/dimensions:/{print $2}')
path="/home/$USER/.fvwm"

set -- $(grep -Fm 1 "#: $res" "$0")

sed -i "/1020x36/c\*FluxPanelButtons: Geometry 1020x36-$3-18" "$path/7Modules/taskButtonsFlux.sys"
sed -i "/450x96/c\*RestShutButtons: Geometry 450x96-$4" "$path/7Modules/restartShutdown.sys"
sed -i "/+80+70/c\*bgWOButton: Geometry $5+80+70" "$path/7Modules/WOverview/bgWOview.sys"

sed -i "/Rectangle/c\*FluxPanelButtons: (70x1, Icon $[tpc-image]/Fvwm-58x20.png, Colorset 363, ActionOnPress, \
  Action(Mouse 1) Menu MenuStart Rectangle -$6-42 0 -111m)" "$path/7Modules/taskButtonsFlux.sys"

EDIT [SOLVED]

Changed $2 to $3 and so on.

Last edited by rasat (2022-01-02 09:43:45)


Markku

Offline

#48 2022-01-01 22:03:39

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 26,864
Website

Re: Arch Linux Fvwm myExt + Xfce-Fvwm-EXT (respin) CD

I see you caught it before I posted - but yes, my "set --" version used the wrong positional parameter numbers (off by one).  I've edited my previous post.  You could also add a "shift 2" after the "set" to discard the first two parameters which are irrelevant (they are "#:" and the resolution).

If all the files to be modified are in the "7Modules" directory, then that could also be added to the $path variable to simplify a bit further.  And it might be better to call that variable configdir or something of the sort.

Last edited by Trilby (2022-01-01 22:05:59)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#49 2022-01-01 22:16:11

rasat
Forum Fellow
From: Finland, working in Romania
Registered: 2002-12-27
Posts: 2,279
Website

Re: Arch Linux Fvwm myExt + Xfce-Fvwm-EXT (respin) CD

We are editing at the same time. smile

Thanks, for the script.

Last edited by rasat (2022-01-01 22:26:59)


Markku

Offline

#50 2022-01-07 20:57:19

rasat
Forum Fellow
From: Finland, working in Romania
Registered: 2002-12-27
Posts: 2,279
Website

Re: Arch Linux Fvwm myExt + Xfce-Fvwm-EXT (respin) CD

@qinohe, here is something you may like......to combine myExt with NsCDE. It is Fvwm with great tools for customization and apps management. All managed with scripts. I did a test, it works well. Fast and good response with a DE feeling. The colors and look are easy to change. Read on Fvwm Forum.

Forum:
https://fvwmforums.org/t/nscde-releases … ts/2782/50

Last edited by rasat (2022-01-07 21:00:25)


Markku

Offline

Board footer

Powered by FluxBB