@@ -21,9 +21,7 @@ PanelWindow {
2121 right: true
2222 }
2323
24- margins .top : Common .Appearance .sizes .barHeight + Common .Appearance .spacing .small
2524 margins .bottom : Common .Appearance .spacing .small
26- margins .right : Common .Appearance .spacing .small
2725
2826 implicitWidth: Common .Appearance .sizes .sidebarWidth
2927 color: " transparent"
@@ -34,64 +32,9 @@ PanelWindow {
3432 WlrLayershell .layer : WlrLayer .Overlay
3533 WlrLayershell .namespace : " sidebar"
3634
37- // Get title based on current view
38- property string viewTitle: {
39- switch (Root .GlobalStates .sidebarRightView ) {
40- case " network" : return " [ Network ]"
41- case " bluetooth" : return " [ Bluetooth ]"
42- case " audio" : return " [ Audio ]"
43- case " calendar" : return " [ Calendar ]"
44- case " notifications" : return " [ Notifications ]"
45- case " power" : return " [ Power ]"
46- case " weather" : return " [ Weather ]"
47- default : return " [ Settings ]"
48- }
49- }
50-
51- // Get keyboard hints based on current view
52- property var viewHints: {
53- switch (Root .GlobalStates .sidebarRightView ) {
54- case " network" :
55- return [
56- { key: " Esc" , action: " close" },
57- { key: " j/k" , action: " navigate" },
58- { key: " Enter" , action: " connect" }
59- ]
60- case " bluetooth" :
61- return [
62- { key: " Esc" , action: " close" },
63- { key: " j/k" , action: " navigate" },
64- { key: " Enter" , action: " pair" }
65- ]
66- case " audio" :
67- return [
68- { key: " Esc" , action: " close" },
69- { key: " m" , action: " mute" },
70- { key: " +/-" , action: " volume" }
71- ]
72- case " notifications" :
73- return [
74- { key: " Esc" , action: " close" },
75- { key: " d" , action: " dismiss" },
76- { key: " D" , action: " clear all" }
77- ]
78- case " power" :
79- return [
80- { key: " Esc" , action: " close" },
81- { key: " s" , action: " suspend" },
82- { key: " r" , action: " reboot" },
83- { key: " p" , action: " poweroff" }
84- ]
85- default :
86- return [{ key: " Esc" , action: " close" }]
87- }
88- }
89-
9035 // TUI Panel container
9136 Common .TuiPanel {
9237 anchors .fill : parent
93- title: root .viewTitle
94- keyHints: root .viewHints
9538
9639 // Network View
9740 Loader {
0 commit comments