1 diff -rNaud slim-1.3.0-orig/cfg.cpp slim-1.3.0/cfg.cpp
2 --- slim-1.3.0-orig/cfg.cpp 2007-09-01 23:41:51.000000000 +0200
3 +++ slim-1.3.0/cfg.cpp 2007-09-01 23:42:03.000000000 +0200
5 options.insert(option("sessionstop_cmd",""));
6 options.insert(option("console_cmd","/usr/X11R6/bin/xterm -C -fg white -bg black +sb -g %dx%d+%d+%d -fn %dx%d -T ""Console login"" -e /bin/sh -c ""/bin/cat /etc/issue; exec /bin/login"""));
7 options.insert(option("screenshot_cmd","import -window root /slim.png"));
8 + options.insert(option("f2_cmd",""));
9 + options.insert(option("f3_cmd",""));
10 + options.insert(option("f4_cmd",""));
11 + options.insert(option("f5_cmd",""));
12 + options.insert(option("f6_cmd",""));
13 + options.insert(option("ctrl_f1_cmd",""));
14 + options.insert(option("ctrl_f2_cmd",""));
15 + options.insert(option("ctrl_f3_cmd",""));
16 + options.insert(option("ctrl_f4_cmd",""));
17 + options.insert(option("ctrl_f5_cmd",""));
18 + options.insert(option("ctrl_f6_cmd",""));
19 options.insert(option("welcome_msg","Welcome to %host"));
20 options.insert(option("default_user",""));
21 options.insert(option("current_theme","default"));
22 diff -rNaud slim-1.3.0-orig/panel.cpp slim-1.3.0/panel.cpp
23 --- slim-1.3.0-orig/panel.cpp 2007-09-01 23:41:51.000000000 +0200
24 +++ slim-1.3.0/panel.cpp 2007-09-01 23:42:11.000000000 +0200
26 string formerString = "";
28 XLookupString(&event.xkey, &ascii, 1, &keysym, &compstatus);
31 + // User defined custom keys (Ctrl)
32 + if (reinterpret_cast<XKeyEvent&>(event).state & ControlMask) {
35 + system(cfg->getOption("ctrl_f1_cmd").c_str());
38 + system(cfg->getOption("ctrl_f2_cmd").c_str());
41 + system(cfg->getOption("ctrl_f3_cmd").c_str());
44 + system(cfg->getOption("ctrl_f4_cmd").c_str());
47 + system(cfg->getOption("ctrl_f5_cmd").c_str());
50 + system(cfg->getOption("ctrl_f6_cmd").c_str());
64 + // User defined custom keys
66 + system(cfg->getOption("f2_cmd").c_str());
69 + system(cfg->getOption("f3_cmd").c_str());
72 + system(cfg->getOption("f4_cmd").c_str());
75 + system(cfg->getOption("f5_cmd").c_str());
78 + system(cfg->getOption("f6_cmd").c_str());
81 + // Take a screenshot
83 - // Take a screenshot
84 system(cfg->getOption("screenshot_cmd").c_str());
87 --- slim-1.3.1/slim.conf.old 2009-02-23 20:54:06.000000000 +0800
88 +++ slim-1.3.1/slim.conf 2009-02-23 20:57:30.240104118 +0800
90 # Executed when pressing F11 (requires imagemagick)
91 screenshot_cmd import -window root /slim.png
93 +# Custom commands for F2 to F6 and Ctrl-F1 to Ctrl-F6 keys
99 +# ctrl_f1_cmd some command
100 +# ctrl_f2_cmd some command
101 +# ctrl_f3_cmd some command
102 +# ctrl_f4_cmd some command
103 +# ctrl_f5_cmd some command
104 +# ctrl_f6_cmd some command
106 # welcome message. Available variables: %host, %domain
107 welcome_msg Welcome to %host
108 +#welcome_msg F1-session F2-locale F3-keyboard F4-suspend F5-reboot F6-halt
110 # Session message. Prepended to the session name when pressing F1
111 # session_msg Session: