Репозитории ALT
S: | 3.4.2-alt1 |
5.1: | 1.2.38pre1-alt1 |
4.1: | 1.2.35-alt2.1 |
4.0: | 1.2.32-alt2.1 |
3.0: | 1.2.23-alt1 |
+backports: | 1.2.30-alt1.M30.1 |
Группа :: Графические оболочки/Icewm
Пакет: icewm
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: icewm-alt-scripts.patch
Скачать
Скачать
icewm/CHANGES | 2 ++
icewm/doc/icewm.sgml | 34 +++++++++++++++++++++++-----------
icewm/src/wmapp.cc | 8 ++++++++
3 files changed, 33 insertions(+), 11 deletions(-)
diff --git a/icewm/CHANGES b/icewm/CHANGES
index a2db695..8aee934 100644
--- a/icewm/CHANGES
+++ b/icewm/CHANGES
@@ -92,6 +92,8 @@
1.2.28pre2: 2006-08-31
- fix smart placement
- warning fixes
+ - added "restart" script that is executed each time icewm is restarted
+ (Manuel Carrasco)
1.2.28pre1: 2006-08-24
- start menu pixmap now named: taskbar/start.xpm
diff --git a/icewm/doc/icewm.sgml b/icewm/doc/icewm.sgml
index 79aa88f..5002d9e 100644
--- a/icewm/doc/icewm.sgml
+++ b/icewm/doc/icewm.sgml
@@ -138,23 +138,35 @@ check it's manpage for the correct place to start the window manager
<sect1>Startup and shutdown scripts<p>
-After initialization IceWM-Session will search the resource path (<ref id="lib">)
-for a startup script. If this file is found to exist and to be executeable
-IceWM-Session will run the script. On startup IceWM-Session will search for a script
-called "startup". And during the termination of icewm, the
-"shutdown" script is executed.
+After initialization IceWM-Session will search the script called "startup".
+If this file exists and is executable, IceWM-Session will run the script. <p>
+When icewm is restarted or the theme is changed, icewm will run a script called "restart". <p>
+During the termination of icewm, IceWM-Session will run the "shutdown" script. <p>
-Additionally the flag "--with-gnome" is passed if a GNOME session
-manager is detected.
+These scripts are searched in the resource path (<ref id="lib">) and they must to have the proper execution permissions.<p>
Example (startup):
<verb>
-#!/bin/bash
+#!/bin/sh
+# Launch the screensaver
+xscreensaver &
+# Gnome applications need this to correctly display fonts
+[ -x /usr/libexec/gnome-settings-daemon ] && /usr/libexec/gnome-settings-daemon &
+</verb>
-[ -x ~/.icewm/restart ] && source ~/.icewm/restart
+Example (restart):
+<verb>
+#!/bin/sh
+# Send the HUP signal to icewmtray so it reloads the new theme configuration
+killall -HUP icewmtray
+# Reload icewm background configuration
+icewmbg -r
+</verb>
-gnome-terminal --geometry 80x25+217+235 &
-xscreensaver &
+Example (shutdown):
+<verb>
+#!/bin/sh
+[ -x /usr/libexec/gnome-settings-daemon ] && killall -TERM gnome-settings-daemon
</verb>
<bf/Hint: /
diff --git a/icewm/src/wmapp.cc b/icewm/src/wmapp.cc
index d23086f..d4dc269 100644
--- a/icewm/src/wmapp.cc
+++ b/icewm/src/wmapp.cc
@@ -1609,6 +1609,14 @@ int main(int argc, char **argv) {
themeName = newstr(overrideTheme);
#endif
YWMApp app(&argc, &argv);
+ // when icewm is restarted, it runs a $HOME/.icewm/restart script.
+ // This is usefull to send a HUP signal to icewmtray or other programs
+ if (restart) {
+ char *scriptFile = app.findConfigFile("restart", X_OK);
+ const char *args[] = { scriptFile, 0, 0 };
+ app.runProgram(scriptFile, args);
+ delete[] scriptFile;
+ }
#ifdef CONFIG_GUIEVENTS
app.signalGuiEvent(geStartup);