summaryrefslogtreecommitdiff
path: root/kde-kanotix-settings/share/apps/plasma-desktop/updates/02-kanotix-default-setup.js
blob: 127db56f60955815beac77069623aaf4fcb329d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// if desktop is locked, save current state and unlock
var was_locked = false;
if (locked) {
    was_locked = true
    locked = false
}

// remove all panels from desktop
pIds = panelIds;
for (i = 0; i < pIds.length; ++i) {
    p = panelById(pIds[i]);
    p.remove();
}

var activity = new Activity
activity.name = i18n("Desktop");
activity.wallpaperPlugin = "image";
activity.wallpaperMode = "SingleImage";
var wallpaper = "kanotix-starrise";
activity.currentConfigGroup = new Array("Wallpaper", "image");
activity.writeConfig("wallpaper", wallpaper);
activity.writeConfig("userswallpaper", wallpaper);

var folderview = activity.addWidget("folderview");
folderview.writeConfig("url", "desktop:/");
var geometry = screenGeometry(activity.screen).height > 800 ? QRectF(0,0,600,400) : QRectF(0,0,405,200);
folderview.writeConfig("geometry", geometry);

var panel = new Panel
panel.location = 'bottom'
panel.height = screenGeometry(panel.screen).height >= 1024 ? 35 : 27;
launcher = panel.addWidget("launcher");
launcher.globalShortcut = "Alt+F1"
launcher.writeConfig("Share", "false");
launcher.writeConfig("icon", "start-here-kanotix");
launcher.reloadConfig();
panel.addWidget("showdesktop");

dolphinIcon = panel.addWidget("icon");
dolphinIcon.writeConfig("Url", applicationPath("dolphin.desktop"));

webbrowserIcon = panel.addWidget("icon");
webbrowserIcon.writeConfig("Url", applicationPath("x-www-browser.desktop"));

konsoleIcon = panel.addWidget("icon");
konsoleIcon.writeConfig("Url", applicationPath("konsole.desktop"));

panel.addWidget("pager")
panel.addWidget("tasks")

systray = panel.addWidget("systemtray");
systray.writeConfig("alwaysShown", "notifier");
i = 0;
if (hasBattery) {
    systray.currentConfigGroup = new Array("Applets", ++i);
    systray.writeConfig("plugin", "battery");
}
systray.currentConfigGroup = new Array("Applets", ++i);
systray.writeConfig("plugin", "notifier");

systray.currentConfigGroup = new Array("Applets", ++i);
systray.writeConfig("plugin", "org.kde.networkmanagement");

clock = panel.addWidget("digital-clock");
clock.writeConfig("showDate", "true");

// lock again, if it was locked before
if (was_locked) {
    locked = true
}