I’m attempting to store some of my dotfiles in a git repo so that I can keep them synced between my laptop and home computer. To allow the one fvwm config to work with two different computers/monitors I wrote the below piperead.
I’m struggling to make the Piperead with the if command work. When I run the if command in a terminal it echos the correct thing but when in the piperead it doesn’t seem to work as the “FvwmIconMan FvwmIconTaskbar” module isn’t swallowed/started.
[code]DestroyModuleConfig FvwmButtons: ButtTaskbar
Piperead ‘echo *ButtTaskbar: Geometry $[vp.width]x22+0-0’
*ButtTaskbar: Font None
*ButtTaskbar: Colorset 10
*ButtTaskbar: Rows 1
Piperead ‘echo *ButtTaskbar: Columns $$(($[vp.width]))’
*ButtTaskbar: Padding 0 0
*ButtTaskbar: Frame 0
*ButtTaskbar: (19x1, Icon icon-opera.svg:16x16, PressIcon icon-opera-pressed.svg:16x16, Padding 0 0, Action (Mouse 1) FuncButtOpera, Action (Mouse 3) Menu OperaWindowOps Rectangle +$left+$top 0 -100m)
Piperead ‘if [ $HOSTNAME = Willie ]; then echo *ButtTaskbar: (1656x1, Left, Swallow “IconTaskbar” “FvwmIconMan IconTaskbar”); else echo *ButtTaskbar: (1018x1, Left, Swallow “IconTaskbar” “FvwmIconMan IconTaskbar”); fi’
#*ButtTaskbar: (1018x1, Left, Swallow “IconTaskbar” “FvwmIconMan IconTaskbar -g -30000-30000”)
#*ButtTaskbar: (1656x1, Left, Swallow “IconTaskbar” “FvwmIconMan IconTaskbar -g -30000-30000”)
*ButtTaskbar: (10x1)
*ButtTaskbar: (40x1, Swallow “stalonetray” “Exec stalonetray -t -c $XDG_CONFIG_HOME/.stalonetrayrc”)
*ButtTaskbar: (20x1, Center, Icon drive-removable-media-3.svg:16x16, Action (Mouse 1) “Menu FvwmMenuUdisks Rectangle +$left+$top 0 -100m”)
*ButtTaskbar: (20x1, Center, Padding 0 3, Swallow “FvwmScript-Playback” “Module FvwmScript FvwmScript-Playback”)
*ButtTaskbar: (20x1, Center, Padding 0 3, Swallow “FvwmScript-Gmail” “Module FvwmScript FvwmScript-Gmail”)
*ButtTaskbar: (22x1, Center, Padding 0 3, Swallow “FvwmScript-Wifi” “Module FvwmScript FvwmScript-Wifi”)
*ButtTaskbar: (105x1, Right, Swallow “FvwmScript-Clock” “FvwmScript FvwmScript-Clock -g -30000-30000”)
*ButtTaskbar: (8x1, Action (Mouse 3) Menu MenuRoot, Action (Mouse 1) FuncShowDesktop)[/code]
Maybe there’s a more dynamic way of allowing the button that is supposed to swallow the FvwmIconMan fit to the appropriate width of different resolution monitors?