Here is a little script to change the number of desktops in pekwm on the
fly. AFAIK, it is version-neutral. It requires replaceit as a dependency
(can be downloaded from http://www.pldaniels.com/replaceit/).
It goes in ~/.pekwm and should be named "def-pwm-wkspaces.sh".
Code: Select all
#!/bin/sh
# Nom et emplacement de ce script : ~/.pekwm/def-pwm-wkspaces.sh
# Dépendances : replaceit, pekwm
# (c) Christian L'Écuyer (alias / aka musher0),
# Gatineau (Qc), Canada, 7 juin 2013.
# Tous droits réservés, sauf usage privé et personnel ("ad usum privatum")
# dans le contexte de ToutouLinux. / All rights reserved, except private
# and personnal use ("ad usum privatum") in the context of PuppyLinux.
####
case "$@" in
1)WS="Workspaces =\"1\""
WPR="WorkspacesPerRow =\"1\""
WSN="WorkspaceNames =\"- 1 -\"" ;;
2)WS="Workspaces =\"2\""
WPR="WorkspacesPerRow =\"2\""
WSN="WorkspaceNames =\"- 1 -;- 2 -\"" ;;
3)WS="Workspaces =\"3\""
WPR="WorkspacesPerRow =\"3\""
WSN="WorkspaceNames =\"- 1 -;- 2 -;- 3 -\"" ;;
4)WS="Workspaces =\"4\""
WPR="WorkspacesPerRow =\"4\""
WSN="WorkspaceNames =\"- 1 -;- 2 -;- 3 -;- 4 -\"" ;;
5)WS="Workspaces =\"5\""
WPR="WorkspacesPerRow =\"5\""
WSN="WorkspaceNames =\"- 1 -;- 2 -;- 3 -;- 4 -;- 5 -\"" ;;
6)WS="Workspaces =\"6\""
WPR="WorkspacesPerRow =\"6\""
WSN="WorkspaceNames =\"- 1 -;- 2 -;- 3 -;- 4 -;- 5 -;- 6 -\"" ;;
7)WS="Workspaces =\"7\""
WPR="WorkspacesPerRow =\"7\""
WSN="WorkspaceNames =\"- 1 -;- 2 -;- 3 -;- 4 -;- 5 -;- 6 -;- 7 -\"" ;;
8)WS="Workspaces =\"8\""
WPR="WorkspacesPerRow =\"8\""
WSN="WorkspaceNames =\"- 1 -;- 2 -;- 3 -;- 4 -;- 5 -;- 6 -;- 7 -;- 8 -\"" ;;
9)WS="Workspaces =\"9\""
WPR="WorkspacesPerRow =\"9\""
WSN="WorkspaceNames =\"- 1 -;- 2 -;- 3 -;- 4 -;- 5 -;- 6 -;- 7 -;- 8 -;- 9-\"" ;;
*) exit ;;
esac
R="replaceit --input=/root/.pekwm/config --wholeline"
$R Workspaces " $WS" -"#"
$R WorkspacesPerRow " $WPR"
$R WorkspaceNames " $WSN"
### 30 ###
Code: Select all
Submenu = " Number of desktops" {
# Pour un sous-titre en français, mettez un dièse devant la ligne
# ci-dessus, et enlevez le dièse devant la ligne ci-dessous.
# Submenu = " Nombre de bureaux" {
Entry = " - 1 - " { Actions = "Exec ~/.pekwm/def-pwm-wkspaces.sh 1;Restart" }
Entry = " - 2 - " { Actions = "Exec ~/.pekwm/def-pwm-wkspaces.sh 2;Restart" }
Entry = " - 3 - " { Actions = "Exec ~/.pekwm/def-pwm-wkspaces.sh 3;Restart" }
Entry = " - 4 - " { Actions = "Exec ~/.pekwm/def-pwm-wkspaces.sh 4;Restart" }
Entry = " - 5 - " { Actions = "Exec ~/.pekwm/def-pwm-wkspaces.sh 5;Restart" }
Entry = " - 6 - " { Actions = "Exec ~/.pekwm/def-pwm-wkspaces.sh 6;Restart" }
Entry = " - 7 - " { Actions = "Exec ~/.pekwm/def-pwm-wkspaces.sh 7;Restart" }
Entry = " - 8 - " { Actions = "Exec ~/.pekwm/def-pwm-wkspaces.sh 8;Restart" }
Entry = " - 9 - " { Actions = "Exec ~/.pekwm/def-pwm-wkspaces.sh 9;Restart" }
}
Enjoy.
musher0