config: added option to set session icons (#1189)
This commit is contained in:
parent
46174d1934
commit
1313b899ad
4 changed files with 24 additions and 4 deletions
|
|
@ -604,6 +604,12 @@ default, you must create it manually.
|
|||
"dragThreshold": 30,
|
||||
"enabled": true,
|
||||
"vimKeybinds": false,
|
||||
"icons": {
|
||||
"logout": "logout",
|
||||
"shutdown": "power_settings_new",
|
||||
"hibernate": "downloading",
|
||||
"reboot": "cached"
|
||||
},
|
||||
"commands": {
|
||||
"logout": ["loginctl", "terminate-user", ""],
|
||||
"shutdown": ["systemctl", "poweroff"],
|
||||
|
|
|
|||
|
|
@ -359,6 +359,12 @@ Singleton {
|
|||
enabled: session.enabled,
|
||||
dragThreshold: session.dragThreshold,
|
||||
vimKeybinds: session.vimKeybinds,
|
||||
icons: {
|
||||
logout: session.icons.logout,
|
||||
shutdown: session.icons.shutdown,
|
||||
hibernate: session.icons.hibernate,
|
||||
reboot: session.icons.reboot
|
||||
},
|
||||
commands: {
|
||||
logout: session.commands.logout,
|
||||
shutdown: session.commands.shutdown,
|
||||
|
|
|
|||
|
|
@ -4,10 +4,18 @@ JsonObject {
|
|||
property bool enabled: true
|
||||
property int dragThreshold: 30
|
||||
property bool vimKeybinds: false
|
||||
property Icons icons: Icons {}
|
||||
property Commands commands: Commands {}
|
||||
|
||||
property Sizes sizes: Sizes {}
|
||||
|
||||
component Icons: JsonObject {
|
||||
property string logout: "logout"
|
||||
property string shutdown: "power_settings_new"
|
||||
property string hibernate: "downloading"
|
||||
property string reboot: "cached"
|
||||
}
|
||||
|
||||
component Commands: JsonObject {
|
||||
property list<string> logout: ["loginctl", "terminate-user", ""]
|
||||
property list<string> shutdown: ["systemctl", "poweroff"]
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ Column {
|
|||
SessionButton {
|
||||
id: logout
|
||||
|
||||
icon: "logout"
|
||||
icon: Config.session.icons.logout
|
||||
command: Config.session.commands.logout
|
||||
|
||||
KeyNavigation.down: shutdown
|
||||
|
|
@ -38,7 +38,7 @@ Column {
|
|||
SessionButton {
|
||||
id: shutdown
|
||||
|
||||
icon: "power_settings_new"
|
||||
icon: Config.session.icons.shutdown
|
||||
command: Config.session.commands.shutdown
|
||||
|
||||
KeyNavigation.up: logout
|
||||
|
|
@ -60,7 +60,7 @@ Column {
|
|||
SessionButton {
|
||||
id: hibernate
|
||||
|
||||
icon: "downloading"
|
||||
icon: Config.session.icons.hibernate
|
||||
command: Config.session.commands.hibernate
|
||||
|
||||
KeyNavigation.up: shutdown
|
||||
|
|
@ -70,7 +70,7 @@ Column {
|
|||
SessionButton {
|
||||
id: reboot
|
||||
|
||||
icon: "cached"
|
||||
icon: Config.session.icons.reboot
|
||||
command: Config.session.commands.reboot
|
||||
|
||||
KeyNavigation.up: hibernate
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue