Skip to content

Commit

Permalink
Unneeded complexity
Browse files Browse the repository at this point in the history
 The script to copy the config only needed to copy the config file.
 No need to copy the images or stalonetrayrc file as they can be
 read from their location in default-config.

 Removed the xterm.png icon as it was not part of google's set.
  • Loading branch information
somiaj committed Nov 1, 2016
1 parent 683d522 commit b6c0354
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 58 deletions.
55 changes: 8 additions & 47 deletions default-config/FvwmScript-ConfirmCopyConfig
@@ -1,5 +1,5 @@
WindowTitle {ConfirmCopyConfig}
WindowSize 500 205
WindowSize 500 160
Font "xft:Sans:size=10"
Init
Begin
Expand All @@ -8,17 +8,9 @@ Init
Set $DefaultConf=$DataDir {/default-config/config}
Set $UserConf=$UserDir {/config}
Set $BackupConf=$UserDir {/config-bak}
Set $DefaultTray=$DataDir {/default-config/.stalonetrayrc}
Set $UserTray=$UserDir {/.stalonetrayrc}
Set $BackupTray=$UserDir {/stalonetrayrc-bak}
Set $DefaultImg=$DataDir {/default-config/images}
Set $UserImg=$UserDir {/images}
Set $BackupImg=$UserDir {/images-bak}

ChangeTitle 3 $UserDir
ChangeTitle 5 $BackupConf
ChangeTitle 6 $BackupTray
ChangeTitle 7 $BackupImg

Do {Style ConfirmCopyConfig Layer 6}
End
Expand Down Expand Up @@ -68,7 +60,7 @@ End

Widget 4
Property
Title {Backups of your current configuration will be located at:}
Title {A backup of your current configuration will be located at:}
Size 400 12
Position 15 70
Type ItemDraw
Expand All @@ -95,39 +87,10 @@ Main
End

Widget 6
Property
Title {}
Size 400 17
Position 70 107
Type ItemDraw
Flags NoReliefString Left
Main
Case message of
SingleClic :
Begin
End
End

Widget 7
Property
Title {}
Size 400 17
Position 70 125
Type ItemDraw
Flags NoReliefString Left
Main
Case message of
SingleClic :
Begin
End
End


Widget 8
Property
Title {Click Confirm to continue and restart Fvwm.}
Size 400 15
Position 15 145
Position 15 107
Type ItemDraw
Flags NoReliefString Left
Main
Expand All @@ -138,12 +101,12 @@ Main
End


Widget 9
Widget 7
Property
Title {Confirm}
Colorset 13
Size 60 28
Position 100 170
Position 100 130
Flags NoReliefString
Type PushButton
Value 1
Expand All @@ -152,20 +115,18 @@ Main
SingleClic :
Begin
Do {Test (f } $UserConf {) PipeRead `mv "} $UserConf {" "} $BackupConf {"; echo "Echo Backup: } $BackupConf {"`}
Do {Test (f } $UserTray {) PipeRead `mv "} $UserTray {" "} $BackupTray {"; echo "Echo Backup: } $BackupTray {"`}
Do {Test (f } $UserImg {) PipeRead `mv "} $UserImg {" "} $BackupImg {"; echo "Echo Backup: } $BackupImg {"`}
Do {PipeRead `cp -r "} $DefaultConf {" "} $DefaultTray {" "} $DefaultImg {" "} $UserDir {"; echo "Echo Copied default config to } $UserDir {"`}
Do {PipeRead `cp "} $DefaultConf {" "} $UserDir {"; echo "Echo Copied default config to } $UserDir {"`}
Do {Restart}
Quit
End
End

Widget 10
Widget 8
Property
Title {Cancel}
Colorset 13
Size 60 28
Position 350 170
Position 350 130
Flags NoReliefString
Type PushButton
Value 1
Expand Down
13 changes: 2 additions & 11 deletions default-config/config
Expand Up @@ -224,17 +224,13 @@ Style * BorderWidth 5, HandleWidth 5, MWMButtons, \
Style * Colorset 1, HilightColorset 2
Style * BorderColorset 3, HilightBorderColorset 4

# Set ImagePath
ImagePath $[FVWM_USERDIR]/images:+

# Disable Icons from appearing on desktop.
# Comment this out or use Style * Icon to get the icons back.
Style * !Icon

# Window Specific Styles
Style RightPanel !Title, !Borders, !Handles, Sticky, WindowListSkip, NeverFocus
Style ConfirmQuit !Title, PositionPlacement Center, WindowListSkip, Layer 6
Style XTerm MiniIcon "icons/xterm.png"
Style FvwmIdent WindowListSkip

#######
Expand Down Expand Up @@ -558,10 +554,6 @@ DestroyModuleConfig FvwmScript:*
# FvwmIconMan (list of running windows), and a clock.
#
# Note - To use the system tray you must have "stalonetray" installed.
InfoStoreAdd stalonetrayrc $[FVWM_DATADIR]/default-config/.stalonetrayrc
Test (f $[FVWM_USERDIR]/.stalonetrayrc) \
InfoStoreAdd stalonetrayrc $[FVWM_USERDIR]/.stalonetrayrc

DestroyModuleConfig RightPanel:*
*RightPanel: Geometry 120x$[vp.height]-0+0
*RightPanel: Colorset 10
Expand All @@ -582,16 +574,15 @@ DestroyModuleConfig RightPanel:*
*RightPanel: (5x80, Frame 0)
*RightPanel: (120x5, Frame 0)
Test (x stalonetray) *RightPanel: (120x20, Swallow(NoClose,UseOld) \
stalonetray 'Exec exec stalonetray --config $[infostore.stalonetrayrc]', \
Frame 0)
stalonetray 'Exec exec stalonetray --config \
"$[FVWM_DATADIR]/default-config/.stalonetrayrc"', Frame 0)
Test (x stalonetray) PipeRead 'echo "*RightPanel: (120x$(($[vp.height]-225)), \
Top, Swallow FvwmIconMan \'Module FvwmIconMan\', Frame 0)"'
Test (!x stalonetray) PipeRead 'echo "*RightPanel: (120x$(($[vp.height]-205)),\
Top, Swallow FvwmIconMan \'Module FvwmIconMan\', Frame 0)"'
*RightPanel: (120x45, Swallow DateTime 'Module FvwmScript FvwmScript-DateTime',\
Frame 0)
*RightPanel: (120x5, Frame 0)
InfoStoreRemove stalonetrayrc

# FvwmPager
#
Expand Down
Binary file removed default-config/images/icons/xterm.png
Binary file not shown.

0 comments on commit b6c0354

Please sign in to comment.