Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add installer, wallpapers, update config. See Changelog

  • Loading branch information...
commit 5085ffe874e07e0ba5b4163b28340a01adac6ea8 1 parent 99b8d3a
@ThomasFunk ThomasFunk authored
View
5 Changelog
@@ -1,9 +1,12 @@
History:
-06/10/2012 V 0.4.3
+06/12/2012 V 0.4.3
- add About box
- add !Title style for FvwmForm-RunCommand, FvwmForm-About, FvwmForm-Messages
- fix bugs in fvwm-xdg-menu.py
- fix bugs creating .menu
+- fix paths of FvwmScript-PersonalMenu to find it in the module dir
+- add an installer script
+- add new default wallpaper (5:4 & 16:9) to artwork
06/10/2012 V 0.4.2
- update overview and some comments in config
View
6 Changelog_installer
@@ -0,0 +1,6 @@
+History:
+
+06/12/2012 V 0.1.0
+- initial installer:
+ - copy Fvwm-Nightshade to the correct place
+ - check which apps needed for full functionality are installed
View
83 README
@@ -1,8 +1,27 @@
-Welcome to Fvwm Nightshade! This project is a desktop environment based
-on Fvwm. It contains many features of a modern but lightweight desktop.
+ _____________________________
+ / ___________________________/
+ / /_ ___ ______ ___
+ / __/| / / | /| / / __ `__ \ ___
+ / / | |/ /| |/ |/ / / / / / / /__/
+ /_/ |___/ |__/|__/_/ /_/ /_/
+
+ _ ___ __ __ __ __
+ / | / (_)____ _/ /_ / /______/ /_ ____ _____/ /___
+ / |/ / // __ `/ __ \/ __/ ___/ __ \/ __ `/ __ // _ \
+ / /| / // /_/ / / / / /_(__ ) / / / /_/ / /_/ // __/
+ /_/ |_/_/ \__, /_/ /_/\__/____/_/ /_/\__,_/\__,_/ \___/
+ /____/
+
+
+Welcome to Fvwm Nightshade! This project aims to be a lightweight but
+feature rich and good looking configuration of Fvwm. It contains many
+useful things to make work and life easier with a flavour of a modern
+desktop. But it can be configure by your own. It is good documented and
+shows you what is possible with this powerful window manager.
+
Featurelist of Fvwm Nightshade:
------------------------------------
+===============================
- 4 virtual desktop pages (at the moment)
- Taskbar to show running apps per page
- Systray (if stalonetray is installed)
@@ -32,17 +51,20 @@ Featurelist of Fvwm Nightshade:
- Print messages for needed apps for full config functionality in
.xsessions-error
+
Requirements:
--------------
-mandatory: Fvwm >= 2.6.4
-recommended: xterm, stalonetray, xscreensaver, eterm, imagemagick,
-useful: LxApearance, qtconfig, xneurs, ...
-nice to have: Volume Icon, fdpowermon, gnomes network manager,
- bluetooth-applet, pm-utils
+=============
+Required: Fvwm >= 2.6.3, xdg-python, xterm, xclock, xscreensaver,
+ eterm, imagemagick, stalonetray
+
+Recommended: gnomes network manager, Volume Icon
+
+Useful: fdpowermon, bluetooth-applet, pm-utils, LxApearance,
+ qtconfig-qt3, qtconfig-qt4, xneurs
-Default started systray apps, if stalonetray is installed:
-----------------------------------------------------------
+These systray apps started automatically, if stalonetray is installed:
+----------------------------------------------------------------------
- Volume Icon: lightweight volume control
(http://softwarebakery.com/maato/volumeicon.html)
- fdpowermon: simple battery power monitor
@@ -55,7 +77,7 @@ Btw. it doesn't matter if they not installed. Will skip then ;-)
Keybindings:
-------------
+============
Alt+Tab Switching focus between windows
Alt+Print Screenshot of the whole desktop (page)
@@ -105,7 +127,8 @@ Ctrl-Alt+cursor down Move mouse pointer down by 1% of a page
Mouse bindings:
----------------
+===============
+
Mouse:
+------------+
| || || || |
@@ -147,8 +170,8 @@ Mouse on windows decoration:
Titlebar, corners and sides:
Button 1: Drag moves window, maximize on double click
Button 2: Drag moves window, raise or lower with click
-Button 3: WindowOpsTrimmed menu with click, MenuWindowOpsFull menu with
- ALT + click
+Button 3: WindowOpsTrimmed menu with click, MenuWindowOpsFull menu
+ with ALT + click
Button 4/5: Rolling wheel on titlebar up/down shades/unshades
Mouse on window area:
@@ -160,8 +183,8 @@ Mouse on Icons (iconified):
---------------------------
Button 1: Drag moves icon, deiconify with double click, root menu with
ALT + click
-Button 2: Deiconify icon with click, all of the same resource group with
- CTRL + click
+Button 2: Deiconify icon with click, all of the same resource group
+ with CTRL + click
Button 3: WindowOpsTrimmed menu with click
WindowGroupOps menu with CTRL + click
@@ -173,7 +196,27 @@ Button 3: WindowOpsFull menu
Anywhere:
---------
-Button 4/5: Switch to page left/right with ALT + rolling wheel up/down anywhere
-Button 4/5: Switch with active window to page left/right with CTRL + rolling
- wheel up/down anywhere
+Button 4/5: Switch to page left/right with ALT + rolling wheel up/down
+ anywhere
+Button 4/5: Switch with active window to page left/right with CTRL +
+ rolling wheel up/down anywhere
+
+Installation
+============
+Use the install.sh found in the root path of the Fvwm-Nightshade package
+
+
+Bugs and Feature requests
+=========================
+Fvwm-Nightshade is young project. Bugs are possible. We try to avoid
+them but nobody is perfect ... So, if you find one or have ideas, submit
+them under https://github.com/ThomasFunk/Fvwm-Nightshade/issues
+
+
+Enjoy our work and hopefully you love Fvwm-Nightshade as we do ;-)
+
+Team
+====
+Thomas Funk <t.funk@web.de>
+Bernhard Popp <kermit.popp@googlemail.com>
View
BIN  artwork/splash_Nightshade.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  artwork/wp_Nightshade_default_16x9.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  artwork/wp_Nightshade_default_5x4.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
10 config
@@ -143,7 +143,7 @@ ImagePath +:/usr/share/pixmaps:/usr/share/pixmaps/fvwm
#-----------------------------------------------------------------------
# The actual theme. Will be changed dynamically via FuncChangeDecor
#-----------------------------------------------------------------------
-InfoStoreAdd used_theme Ambience
+InfoStoreAdd used_theme Default
#-----------------------------------------------------------------------
# Each Nightshade theme is located in $[FVWM_USERDIR]/themes
@@ -958,7 +958,7 @@ DestroyModuleConfig FvwmAnimate: *
Style FvwmBanner !Title, Sticky, StaysOnTop, WindowListSkip, CirculateSkip
*FvwmBanner: NoDecor
-Test (I $[FVWM_USERDIR]/Nightshade_logo_compl.png) *FvwmBanner: Pixmap $[FVWM_USERDIR]/Nightshade_logo_compl.png
+Test (I $[FVWM_USERDIR]/artwork/splash_Nightshade.png) *FvwmBanner: Pixmap $[FVWM_USERDIR]/artwork/splash_Nightshade.png
*FvwmBanner: Timeout 3
#=======================================================================
@@ -1176,7 +1176,7 @@ AddToFunc StartFunction
+ I Test (Init) Read $[NS_MODULEDIR]/DigitalXclock
+ I TestRc (Match) DigitalXclock H
# create an Applications menu if no exist
-+ I Test (!f $[FVWM_USERDIR]/.menu) PipeRead '$FVWM_USERDIR/fvwm-xdg-menu.py -w -f -s 16 -m FvwmMenu > $FVWM_USERDIR/.menu 2> $FVWM_USERDIR/log.txt &'
++ I Test (!f $[FVWM_USERDIR]/.menu) PipeRead 'fvwm-xdg-menu.py -w -f -s 16 -m FvwmMenu > $FVWM_USERDIR/.menu 2> /dev/null &'
+ I TestRc (!Match) PipeRead 'echo Read .menu; echo SetEnv inProgress 2'
# start programs found in .autostart
#+ I Test (Init) FuncAutoStartPrograms
@@ -1505,7 +1505,7 @@ AddToFunc FuncHibernate
#-----------------------------------------------------------------------
DestroyFunc FuncCreateFvwmMenu
AddToFunc FuncCreateFvwmMenu
-+ I PipeRead '$FVWM_USERDIR/fvwm-xdg-menu.py -w -f -s 16 -m FvwmMenu > $FVWM_USERDIR/.menu 2> /dev/null ; echo SetEnv inProgress 0'
++ I PipeRead 'fvwm-xdg-menu.py -w -f -s 16 -m FvwmMenu > $FVWM_USERDIR/.menu 2> /dev/null ; echo SetEnv inProgress 0'
#=======================================================================
@@ -1791,7 +1791,7 @@ AddToFunc FuncMenuFvwmPersonal
+ I DestroyMenu MenuFvwmPersonal
+ I AddToMenu MenuFvwmPersonal DynamicPopupAction FuncMenuFvwmPersonal
+ I AddToMenu MenuFvwmPersonal "$[gt.&Personal Applications]" Title
-+ I AddToMenu MenuFvwmPersonal "$[gt.Configure Personal Applications]%menu/configuration.xpm%" FvwmScript FvwmScript-PersonalMenu
++ I AddToMenu MenuFvwmPersonal "$[gt.Configure Personal Applications]%menu/configuration.xpm%" FvwmScript $[NS_MODULEDIR]/FvwmScript-PersonalMenu
+ I Test (f $[FVWM_USERDIR]/.personal) PipeRead `sed -e '/^# personal menu/ d;/^ *$/,$ d' $[FVWM_USERDIR]/.personal`
#=======================================================================
View
253 install.sh
@@ -0,0 +1,253 @@
+#!/bin/bash
+#-----------------------------------------------------------------------
+# File: install.sh
+# Version: 0.1.0
+# Licence: GPL 2
+#
+# Description: install script for Fvwm-Nightshade
+#
+# Author: Thomas Funk <t.funk@web.de>
+# Created: 06/10/2012
+# Changed:
+#-----------------------------------------------------------------------
+installer_version=0.1
+nightshade_version=`grep ns_version config |sed q |cut -d" " -f3`
+apps2install=''
+timer=0.3
+
+function clear
+{
+ local CLEAR=''
+
+ type -p clear >/dev/null && CLEAR=$(exec clear)
+ [[ -z $CLEAR ]] && type -p tput >/dev/null && CLEAR=$(exec tput clear)
+ [[ -z $CLEAR ]] && CLEAR=$'\e[H\e[2J'
+
+ echo -en "$CLEAR"
+}
+
+function checkRoot
+{
+if [ "$(whoami)" != "root" ];
+then
+ echo -e "Script must be run with root privilegs! Exiting ...\n"
+ exit
+fi
+}
+
+function search_app
+{
+ package=''
+ if [ "$2" == "" ]
+ then
+ package=$1
+ else
+ package=$2
+ fi
+
+ if [ "$2" == "" ]
+ then
+ printf "search for %-30s" $1
+ else
+ printf "search for %-30s" $2
+ fi
+
+ sleep $timer
+
+ if [ `which $1` ]
+ then
+ echo -e "found"
+ else
+ echo -e "not found"
+ if [ "$apps2install" == '' ]
+ then
+ apps2install=$package
+ else
+ apps2install = ${apps2install}' '${package}
+ fi
+ fi
+
+}
+
+function search_fvwm
+{
+ fvwm=`which fvwm`
+
+ if [ "$fvwm" == "" ]
+ then
+ search_app fvwm
+ else
+ version=`$fvwm -V |cut -d" " -f2 |sed q`
+ major1=`echo $version |cut -d"." -f1`
+ major2=`echo $version |cut -d"." -f2`
+ minor=`echo $version |cut -d"." -f2`
+ wrong=0
+ if [ $major1 -gt 1 ]
+ then
+ if [ $major2 -gt 5 ]
+ then
+ if [ $minor -gt 2 ]
+ then
+ wrong=1
+ fi
+ fi
+ fi
+
+ string='Fvwm_>=_2.6.3'
+ echo -n "search for Fvwm >= 2.6.3 "
+ sleep $timer
+ if [ $wrong -eq 0 ]
+ then
+ echo -e "not found"
+ else
+ echo -e "found"
+ fi
+ fi
+}
+
+function search_py_module
+{
+ module_found=`python -c "import $1" 2>/dev/null && echo "1"`
+ printf "search for %-30s" $2
+ sleep $timer
+ if [ "$module_found" == "" ]
+ then
+ echo -e "not found"
+ else
+ echo -e "found"
+ fi
+}
+
+########################################################################
+# M A I N
+########################################################################
+
+clear
+echo ''
+echo ' _____________________________ '
+echo ' / ___________________________/ '
+echo ' / /_ ___ ______ ___'
+echo ' / __/| / / | /| / / __ `__ \ ___'
+echo ' / / | |/ /| |/ |/ / / / / / / /__/'
+echo ' /_/ |___/ |__/|__/_/ /_/ /_/ '
+echo ''
+echo ' _ ___ __ __ __ __ '
+echo ' / | / (_)____ _/ /_ / /______/ /_ ____ _____/ /___ '
+echo ' / |/ / // __ `/ __ \/ __/ ___/ __ \/ __ `/ __ // _ \'
+echo ' / /| / // /_/ / / / / /_(__ ) / / / /_/ / /_/ // __/'
+echo ' /_/ |_/_/ \__, /_/ /_/\__/____/_/ /_/\__,_/\__,_/ \___/ '
+echo ' /____/ '
+echo ''
+echo " Install script for Fvwm-Nightshade V $nightshade_version"
+echo ''
+echo '------------------------------------------------------------------'
+echo ''
+echo ""
+
+#=======================================================================
+# Installing Nightshade
+#=======================================================================
+testdir=/home/tf/sourcen/git/temp
+
+echo "FIRST step: installing Fvwm-Nightshade"
+echo "--------------------------------------"
+sleep 1
+
+# rename .fvwm if exist
+if [ -d ${testdir}/.fvwm ]
+then
+ echo -n "rename ${testdir}/.fvwm/ ... "
+ mv ${testdir}/.fvwm ${testdir}/fvwm_orig_`date +%Y%m%d%H%M`
+ sleep $timer
+ echo -e "done."
+fi
+
+# create new fvwm home
+echo -n "create new fvwm home ... "
+mkdir ${testdir}/.fvwm
+sleep $timer
+echo -e "done."
+
+# copy all to the right place
+echo -n "copy Nightshade files to ${testdir}/.fvwm/ ... "
+cp -r * ${testdir}/.fvwm/
+
+# delete all Changelog files and install.sh
+cd ${testdir}/.fvwm/
+for file in `find . -name Changelog_*`
+do
+ rm $file
+done
+rm install.sh
+rm ToDo
+cd - > /dev/null
+
+# create wallpaper dir and move wallpapers
+mkdir ${testdir}/.fvwm/wallpapers
+mv ${testdir}/.fvwm/artwork/wp_* ${testdir}/.fvwm/wallpapers/
+
+sleep $timer
+echo -e "done.\n"
+
+#=======================================================================
+# Search for applications needed for full functionality
+#=======================================================================
+
+echo -e "\nSECOND step: checking programs which should be installed"
+echo "----------------------------------------------------------"
+sleep 1
+
+echo -e "\nRequired:"
+echo "---------"
+sleep 1
+# fvwm
+search_fvwm
+# python module xdg
+search_py_module xdg python-xdg
+# xterm
+search_app xterm
+# xclock
+search_app xclock
+# xscreensaver-command
+search_app xscreensaver-command xscreensaver
+# Esetroot
+search_app Esetroot eterm
+# import
+search_app import imagemagick
+# stalonetray
+search_app stalonetray
+
+echo -e "\nRecommended:"
+echo "--------------------"
+sleep 1
+# volumeicon
+search_app volumeicon
+# nm-applet
+search_app nm-applet network-manager-gnome
+
+echo -e "\nOptional but useful:"
+echo "--------------------"
+sleep 1
+# fdpowermon
+search_app fdpowermon
+# bluetooth-applet
+search_app bluetooth-applet gnome-bluetooth
+# pm-is-supported
+search_app pm-is-supported pm-utils
+# lxappearance
+search_app lxappearance
+# qtconfig-qt3
+search_app qtconfig-qt3 qtconfig-qt3
+# qt4-qtconfig
+search_app qtconfig-qt4 qtconfig-qt4
+
+echo -e "\nTHIRD step: What YOU should do:"
+echo "-------------------------------"
+sleep 1
+echo "-> Please install the \"not found\" packages before starting Fvwm-Nightshade."
+echo "-> Also add \"$HOME/.fvwm/bin\" to your PATH variable.\n"
+echo -e "\nThanks for installing Fvwm-Nightshade :-)\n"
+exit 0
+
+
+
View
20 modules/Changelog_FvwmScript-PersonalMenu
@@ -0,0 +1,20 @@
+History:
+
+2012/05/14 V 1.0.4
+- Fix bug that app list command string is empty at start
+
+2012/05/14 V 1.0.3
+- Fix bug again that app list is empty at start
+
+2012/05/14 V 1.0.2
+- Fix bug that Popup menus listed in the app list
+- Fix bug that empty menus listed in the menu list
+- Fix bug that menus which has the same name get wrong app entries
+- Fix bug that app list is empty at start
+
+2012/05/02 V 1.0.1
+- Fix bug when name with '/' will removed
+
+2012/04/29 V 1.0
+- FvwmScript to create personal menus. It reads the $FVWM_USERDIR/.menu
+ created by fvwm-menu-desktop and saves the favorites in $FVWM_USERDIR/.personal
View
443 modules/FvwmScript-PersonalMenu
@@ -0,0 +1,443 @@
+########################################################################
+# File: FvwmScript-PersonalMenu
+# Version: 1.0.4
+# Licence: GPL 2
+#
+# Description: creates and edit a personal menu file
+# $FVWM_USERDIR/.personal
+#
+# Author: Thomas Funk <t.funk@web.de>
+# Created: 04/29/2012
+# Changed: 05/14/2012
+########################################################################
+
+#-----------------------------------------------------------------------
+# Version 1.0.4, Copyright 2012, Thomas Funk
+#-----------------------------------------------------------------------
+
+
+WindowTitle {FvwmScript-PersonalMenu}
+WindowSize 560 250
+WindowPosition 0 170
+
+
+# ----- Initialize -----------------------------------------------------
+
+Init
+Begin
+ Set $personal_changed = 0
+ Set $save_chosen = 0
+ Set $close_click = 0
+
+ # check, whether personal file exist
+ Set $found_file = (GetOutput {if [ -e $FVWM_USERDIR/.personal ]; then echo 1; else echo 0; fi} 1 -1)
+
+ If $found_file == {1} Then
+ Begin
+ # get personal apps
+ Set $cmd1 = {sed -e '/^# personal menu/ d;/^ *$/,$ d' $FVWM_USERDIR/.personal}
+ Set $cmd2 = { |cut -d'"' -f2 |tr '\n' '|' |sed 's/.$//'}
+ Set $cmd3 = { |tr '\n' '|' |sed 's/AddToMenu MenuFvwmPersonal/\+/g;s/.$//'}
+ Set $cmd = $cmd1 $cmd2
+ #Do {echo personal_app_list cmd: }$cmd
+ Set $personal_app_list = (GetOutput $cmd 1 -1)
+ #Do {echo personal_app_list: }$personal_app_list
+
+ Set $cmd = $cmd1 $cmd3
+ #Do {echo personal_app_list_strs cmd: }$cmd
+ Set $personal_app_list_strs = (GetOutput $cmd 1 -1)
+ #Do {echo personal_app_list_strs: }$personal_app_list_strs
+ If $personal_app_list <> {} Then
+ Begin
+ ChangeTitle 9 $personal_app_list
+ End
+ End
+
+ # get menu list
+ Set $cmd = {sed -e 's/^AddToMenu //p' -n $FVWM_USERDIR/.menu |sed -e 's/\"//g' |cut -d' ' -f1 |sort |sed -e 's/FvwmMenu-//g;/^\s*$/d' |tr '\n' ' '}
+ Set $menu_list = (GetOutput $cmd 1 -1)
+ Set $index = 0
+ Set $notdone = 1
+ Set $new_menu = {}
+ While $notdone == 1 Do
+ Begin
+ Set $index = (Add $index 1)
+ Set $cmd = {echo }$menu_list
+ Set $menu_entry = (GetOutput $cmd 1 $index)
+ If $menu_entry <> {} Then
+ Begin
+ # do only menus in list which have entries
+ Set $cmd = {sed -e '/AddToMenu/ d;/Popup/ d;1,/}$menu_entry{\"/ d;/^ *$/,$ d' $FVWM_USERDIR/.menu |wc -l}
+ Set $lines = (GetOutput $cmd 1 -1)
+ If $lines <> {0} Then
+ Begin
+ Set $new_menu = $new_menu $menu_entry { }
+ End
+ End
+ Else
+ Begin
+ Set $notdone = 0
+ End
+ End
+ # get 1st menu entry
+ Set $cmd = {echo }$new_menu
+ Set $menu_entry = (GetOutput $cmd 1 1)
+ # change '-' to '/', ' ' to '|' and delete last '|'
+ Set $cmd = {echo '}$new_menu{' |sed -e 's/ /|/g;s/-/\//g;s/.$//'}
+ Set $menu_list = (GetOutput $cmd 1 -1)
+ ChangeTitle 1 $menu_list
+
+ # initialize app list
+ Set $cmd1 = {sed -e '/AddToMenu/ d;/Popup/ d;1,/}$menu_entry{\"/ d;/^ *$/,$ d' $FVWM_USERDIR/.menu}
+ Set $cmd2 = { |cut -d'"' -f2 |tr '\n' '|' |sed 's/.$//'}
+ Set $cmd3 = { |tr '\n' '|' |sed 's/.$//'}
+ Set $cmd = $cmd1 $cmd2
+ #Do {echo menu_app_list cmd: }$cmd
+ Set $menu_app_list = (GetOutput $cmd 1 -1)
+ #Do {echo menu_app_list: }$menu_app_list
+ Set $cmd = $cmd1 $cmd3
+ #Do {echo menu_app_list_strs cmd: }$cmd
+ Set $menu_app_list_strs = (GetOutput $cmd 1 -1)
+ #Do {echo menu_app_list_strs: }$menu_app_list_strs
+ ChangeTitle 3 $menu_app_list
+End
+
+
+# ----- Widgets --------------------------------------------------------
+
+# Popup menu "Menu entries"
+# -------------------------
+Widget 1
+Property
+ Position 10 10
+ Type PopupMenu
+ Title {FvwmMenu |||}
+ Font "xft:Arial:pixelsize=12"
+ Flags NoReliefString
+ ForeColor {black}
+ BackColor {white}
+ ShadowColor {DarkGray}
+ HilightColor {gray}
+Main
+Case message of
+ SingleClic :
+ Begin
+ Set $close_click = 0
+ ChangeFont 10 {xft:Arial:pixelsize=12}
+ ChangeTitle 10 {}
+ Set $index = (GetValue 1)
+ Set $cmd = {exec echo '}$menu_list{' |cut -d'|' -f}$index{ |sed -e 's/\//-/g'}
+ Set $menu_entry = (GetOutput $cmd 1 -1)
+ #Do {echo }$menu_entry
+
+ #Set $menu_chosen = 0
+ Set $cmd1 = {sed -e '1,/}$menu_entry{\"/ d;/AddToMenu/ d;/Popup/ d;/^ *$/,$ d' $FVWM_USERDIR/.menu}
+ Set $cmd2 = { |cut -d'"' -f2 |tr '\n' '|' |sed 's/.$//'}
+ Set $cmd3 = { |tr '\n' '|' |sed 's/.$//'}
+ Set $cmd = $cmd1 $cmd2
+ Set $menu_app_list = (GetOutput $cmd 1 -1)
+ Set $cmd = $cmd1 $cmd3
+ Set $menu_app_list_strs = (GetOutput $cmd 1 -1)
+ #Do {echo menu_app_list: }$menu_app_list
+ #Do {echo menu_app_list_strs: }$menu_app_list_strs
+ ChangeTitle 3 $menu_app_list
+ End
+End
+
+# Label "Menu applications"
+# -------------------------
+Widget 2
+Property
+ Type ItemDraw
+ Position 10 40
+ Title {Menu applications}
+ Font "xft:Arial:pixelsize=12:bold"
+ Flags NoReliefString
+End
+
+# List Menu App list
+Widget 3
+Property
+ Size 200 150
+ Position 10 60
+ Type List
+ Title {}
+ Font "xft:Arial:pixelsize=12"
+ Flags NoReliefString
+ BackColor {white}
+ HilightColor {light gray}
+Main
+Case message of
+ SingleClic :
+ Begin
+ Set $index = (GetValue 3)
+ #Do {echo index: }$index
+ Set $close_click = 0
+ ChangeFont 10 {xft:Arial:pixelsize=12}
+ ChangeTitle 10 {}
+
+ Set $cmd = {exec echo '}$menu_app_list{' |cut -d'|' -f}$index
+ Set $chosen_menu_app = (GetOutput $cmd 1 -1)
+ #Do {echo chosen_menu_app: }$chosen_menu_app
+
+ Set $cmd = {exec echo '}$menu_app_list_strs{' |cut -d'|' -f}$index
+ #Do {echo chosen_menu_app_str cmd: }$cmd
+ Set $chosen_menu_app_str = (GetOutput $cmd 1 -1)
+ #Do {echo chosen_menu_app_str: }$chosen_menu_app_str
+ End
+End
+
+# Button "add >"
+# --------------
+Widget 4
+Property
+ Size 80 25
+ Position 240 70
+ Type PushButton
+ Title {Add >}
+ Font "xft:Arial:pixelsize=12"
+ Flags NoReliefString
+ ForeColor {black}
+ BackColor {white}
+ ShadowColor {DarkGray}
+Main
+ Case message of
+ SingleClic :
+ Begin
+ Set $close_click = 0
+ ChangeFont 10 {xft:Arial:pixelsize=12}
+ ChangeTitle 10 {}
+ If $personal_app_list == {} Then
+ Begin
+ Set $personal_app_list = $chosen_menu_app
+ Set $personal_app_list_strs = $chosen_menu_app_str
+ End
+ Else
+ Begin
+ Set $personal_app_list = $personal_app_list {|} $chosen_menu_app
+ Set $personal_app_list_strs = $personal_app_list_strs{|}$chosen_menu_app_str
+ End
+ #Do {echo add personal_app_list: }$personal_app_list
+ #Do {echo add personal_app_list_strs: }$personal_app_list_strs
+ ChangeTitle 9 $personal_app_list
+ Set $personal_changed = 1
+
+ Set $msg = {Added '}$chosen_menu_app{' to menu}
+ ChangeTitle 10 $msg
+ ChangeTitle 8 {Personal applications*}
+ End
+End
+
+# Button "< Remove"
+# -----------------
+Widget 5
+Property
+ Size 80 25
+ Position 240 100
+ Type PushButton
+ Title {< Remove}
+ Font "xft:Arial:pixelsize=12"
+ Flags NoReliefString
+ ForeColor {black}
+ BackColor {white}
+ ShadowColor {DarkGray}
+Main
+ Case message of
+ SingleClic :
+ Begin
+ Set $close_click = 0
+ ChangeFont 10 {xft:Arial:pixelsize=12}
+ ChangeTitle 10 {}
+ Set $cmd = {exec echo '}$chosen_personal_app_str{' |sed -e 's/\+/\[\\+\]/g;s/\"/\\\"/g;s/\//\\\//g'}
+ Set $chosen_personal_app_str = (GetOutput $cmd 1 -1)
+ If $index == {1} Then
+ Begin
+ #Do {echo personal_app_list: }$personal_app_list
+ Set $cmd = {exec echo '}$personal_app_list{' |grep -c "|"}
+ #Do {echo app_count cmd: }$cmd
+ Set $app_count = (GetOutput $cmd 1 -1)
+ #Do {echo app_count: }$app_count
+ If $app_count == {0} Then
+ Begin
+ #Do {echo bla}
+ Set $personal_app_list = {}
+ Set $personal_app_list_strs = {}
+ End
+ Else
+ Begin
+ #Do {echo blub}
+ Set $cmd = {exec echo '}$chosen_personal_app{' |sed -e 's/\+/\[\\+\]/g;s/\"/\\\"/g;s/\//\\\//g'}
+ Set $chosen_personal_app = (GetOutput $cmd 1 -1)
+ Set $cmd = {exec echo '}$personal_app_list{' | sed -e 's/}$chosen_personal_app{|//'}
+ Set $personal_app_list = (GetOutput $cmd 1 -1)
+ Set $cmd = {exec echo '}$personal_app_list_strs{' | sed -e 's/}$chosen_personal_app_str{|//'}
+ #Do {echo remove cmd: }$cmd
+ Set $personal_app_list_strs = (GetOutput $cmd 1 -1)
+ #Do {echo personal_app_list_strs after remove: }$personal_app_list_strs
+ End
+ End
+ Else
+ Begin
+ #Do {echo blubber}
+ Set $cmd = {exec echo '}$chosen_personal_app{' |sed -e 's/\+/\[\\+\]/g;s/\"/\\\"/g;s/\//\\\//g'}
+ Set $chosen_personal_app = (GetOutput $cmd 1 -1)
+ Set $cmd = {exec echo '}$personal_app_list{' | sed -e 's/|}$chosen_personal_app{//'}
+ #Do {echo remove cmd: }$cmd
+ Set $personal_app_list = (GetOutput $cmd 1 -1)
+ #Do {echo personal_app_list after remove: }$personal_app_list
+
+ #Do {echo changed chosen_personal_app_str: }$chosen_personal_app_str
+ Set $cmd = {exec echo '}$personal_app_list_strs{' | sed -e "s/|}$chosen_personal_app_str{//"}
+ #Do {echo remove personal_app_list_strs cmd: }$cmd
+ Set $personal_app_list_strs = (GetOutput $cmd 1 -1)
+ #Do {echo personal_app_list_strs after remove: }$personal_app_list_strs
+ End
+ #Do {echo remove personal_app_list: }$personal_app_list
+ #Do {echo remove personal_app_list_strs: }$personal_app_list_strs
+
+ ChangeTitle 9 $personal_app_list
+ Set $personal_changed = 1
+
+ Set $msg = {Removed '}$chosen_personal_app{' from menu}
+ ChangeTitle 10 $msg
+ ChangeTitle 8 {Personal applications*}
+ End
+End
+
+# Button "Save"
+# -------------
+Widget 6
+Property
+ Size 80 25
+ Position 240 140
+ Type PushButton
+ Title {Save}
+ Font "xft:Arial:pixelsize=12"
+ Flags NoReliefString
+ ForeColor {black}
+ BackColor {white}
+ ShadowColor {DarkGray}
+Main
+ Case message of
+ SingleClic :
+ Begin
+ Set $close_click = 0
+ ChangeFont 10 {xft:Arial:pixelsize=12}
+ ChangeTitle 10 {}
+ Set $cmd = {exec echo '}$personal_app_list_strs{' |sed -e 's/\+/AddToMenu MenuFvwmPersonal/g;s/\"/\\\"/g;s/\//\\\//g;s/|/\\n/g'}
+ #Do {echo save_str cmd: }$cmd
+ Set $save_str = (GetOutput $cmd 1 -1)
+ #Do {echo save_str: }$save_str
+
+ If $found_file == {1} Then
+ Begin
+ # delete all app entries
+ Do {exec sed -i '/AddToMenu/d' $FVWM_USERDIR/.personal}
+ End
+ Else
+ Begin
+ #Create file
+ Do {exec echo "# personal menu" > $FVWM_USERDIR/.personal}
+ End
+
+ # add new app list
+ Set $cmd = {sed -i '/# personal menu/ a\}$save_str{' $FVWM_USERDIR/.personal}
+ Do {exec sleep 1}
+ #Do {echo save cmd: }$cmd
+ Do {exec }$cmd
+ Set $personal_changed = 0
+
+ ChangeTitle 10 {Personal menu saved}
+ ChangeTitle 8 {Personal applications}
+ End
+End
+
+# Button "Cancel"
+# ---------------
+Widget 7
+Property
+ Size 80 25
+ Position 240 170
+ Type PushButton
+ Title {Cancel/Quit}
+ Font "xft:Arial:pixelsize=12"
+ Flags NoReliefString
+ ForeColor {black}
+ BackColor {white}
+ ShadowColor {DarkGray}
+Main
+ Case message of
+ SingleClic :
+ Begin
+ If $personal_changed == {1} Then
+ Begin
+ If $close_click == {0} Then
+ Begin
+ ChangeFont 10 {xft:Arial:pixelsize=12:bold}
+ ChangeTitle 10 {!!! Changed menu not saved !!! Next click will quit.}
+ Set $close_click = 1
+ End
+ Else
+ Begin
+ Quit
+ End
+ End
+ Else
+ Begin
+ Quit
+ End
+ End
+End
+
+# Label "Personal applications"
+# -----------------------------
+Widget 8
+Property
+ Type ItemDraw
+ Position 350 40
+ Title {Personal applications }
+ Font "xft:Arial:pixelsize=12:bold"
+ Flags NoReliefString
+End
+
+# List Personal App list
+Widget 9
+Property
+ Size 200 150
+ Position 350 60
+ Type List
+ Title {}
+ Font "xft:Arial:pixelsize=12"
+ Flags NoReliefString
+ BackColor {white}
+ HilightColor {light gray}
+Main
+Case message of
+ SingleClic :
+ Begin
+ ChangeFont 10 {xft:Arial:pixelsize=12}
+ ChangeTitle 10 {}
+ Set $index = (GetValue 9)
+ #Do {echo index: }$index
+
+ Set $cmd = {exec echo '}$personal_app_list{' |cut -d'|' -f}$index
+ Set $chosen_personal_app = (GetOutput $cmd 1 -1)
+ #Do {echo chosen_personal_app: }$chosen_personal_app
+
+ Set $cmd = {exec echo '}$personal_app_list_strs{' |cut -d'|' -f}$index
+ Set $chosen_personal_app_str = (GetOutput $cmd 1 -1)
+ #Do {echo chosen_personal_app_str: }$chosen_personal_app_str
+ End
+End
+
+# Label "Statusbar"
+# -----------------
+Widget 10
+Property
+ Type ItemDraw
+ Position 10 220
+ Size 550 20
+ Title {}
+ Font "xft:Arial:pixelsize=12"
+ Flags NoReliefString
+End
Please sign in to comment.
Something went wrong with that request. Please try again.