forked from andoma/movian
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cmd_main.view
117 lines (90 loc) · 2.71 KB
/
cmd_main.view
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
#import "skin:https://commandmenu.skin"
#import "theme:https://include/separators.view";
widget(container_y, {
.spacing = 20;
.align = center;
// -- clock and date -------------------------------------------------
widget(container_x, {
.align = right;
.spacing = 5;
commandGroup(widget(container_z, {
.width = $ui.size * 4;
widget(image, {
.source = "skin:https://gfx/clock.png";
.hqScaling = true;
});
widget(image, {
.source = "skin:https://gfx/clock-hand-short.png";
.angle = ($global.clock.hour % 12) * 30 +
($global.clock.minute) / 2;
});
widget(image, {
.source = "skin:https://gfx/clock-hand-long.png";
.angle = $global.clock.minute * 6;
});
}));
commandGroup(widget(container_y, {
.width = $ui.size * 4;
widget(label, {
.align = center;
.caption = strftime($global.clock.unixtime, "%B");
});
widget(label, {
.align = center;
.sizeScale = 2;
.caption = strftime($global.clock.unixtime, "%d");
});
}));
});
space(1);
// -- playdeck ------------------------------------------------------
commandGroup(widget(container_x, {
.align = center;
widget(container_y, {
commandMenuLeft(targetedEvent("cmd_deck", Decrease), "System menu", 0.1);
});
space(1);
widget(container_y, {
.spacing = 5;
widget(container_x, {
.spacing = 5;
.align = center;
.homogenous = true;
$view.playcontrollerswidth = getWidth();
commandSkipBackward(event(PreviousTrack),
$global.media.current.canSkipBackward);
commandSeekReverse(event(SeekReverse),
$global.media.current.canSeek);
widget(deck, {
.effect = flipVertical;
.noInitialTransform = true;
.time = 0.2;
commandPause(event(Pause), $global.media.current.canPause);
commandPlay(event(Play), $global.media.current.canPause);
.page = $global.media.current.playstatus == "pause";
});
commandSeekForward(event(SeekForward),
$global.media.current.canSeek);
commandSkipForward(event(NextTrack),
$global.media.current.canSkipForward);
commandStop(event(Stop), $global.media.current.canStop);
commandEject(event(Eject), $global.media.current.canEject);
commandRepeatToggle($global.media.current.repeat,
$global.media.current.canRepeat);
commandRepeatShuffle($global.media.current.shuffle,
$global.media.current.canShuffle);
});
commandSeekSlider(
$global.media.current.currenttime,
$global.media.current.metadata.duration,
$global.media.current.canSeek,
$view.playcontrollerswidth,
!$global.media.current.canSeek
);
});
space(1);
widget(container_y, {
commandMenuRight(targetedEvent("cmd_deck", Increase), "Video", 0.1);
});
}));
});