forked from Shinonome/dots-hyprland
not attempt to show translated globalshortcut description cuz they can't be changed
This commit is contained in:
@@ -41,7 +41,7 @@ Singleton {
|
|||||||
|
|
||||||
GlobalShortcut {
|
GlobalShortcut {
|
||||||
name: "workspaceNumber"
|
name: "workspaceNumber"
|
||||||
description: Translation.tr("Hold to show workspace numbers, release to show icons")
|
description: "Hold to show workspace numbers, release to show icons"
|
||||||
|
|
||||||
onPressed: {
|
onPressed: {
|
||||||
workspaceShowNumbersTimer.start()
|
workspaceShowNumbersTimer.start()
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ Scope {
|
|||||||
PanelWindow {
|
PanelWindow {
|
||||||
id: popup
|
id: popup
|
||||||
|
|
||||||
|
exclusiveZone: 0
|
||||||
anchors.top: true
|
anchors.top: true
|
||||||
margins.top: 0
|
margins.top: 0
|
||||||
|
|
||||||
|
|||||||
@@ -586,7 +586,7 @@ Scope {
|
|||||||
|
|
||||||
GlobalShortcut {
|
GlobalShortcut {
|
||||||
name: "barToggle"
|
name: "barToggle"
|
||||||
description: Translation.tr("Toggles bar on press")
|
description: "Toggles bar on press"
|
||||||
|
|
||||||
onPressed: {
|
onPressed: {
|
||||||
GlobalStates.barOpen = !GlobalStates.barOpen;
|
GlobalStates.barOpen = !GlobalStates.barOpen;
|
||||||
@@ -595,7 +595,7 @@ Scope {
|
|||||||
|
|
||||||
GlobalShortcut {
|
GlobalShortcut {
|
||||||
name: "barOpen"
|
name: "barOpen"
|
||||||
description: Translation.tr("Opens bar on press")
|
description: "Opens bar on press"
|
||||||
|
|
||||||
onPressed: {
|
onPressed: {
|
||||||
GlobalStates.barOpen = true;
|
GlobalStates.barOpen = true;
|
||||||
@@ -604,7 +604,7 @@ Scope {
|
|||||||
|
|
||||||
GlobalShortcut {
|
GlobalShortcut {
|
||||||
name: "barClose"
|
name: "barClose"
|
||||||
description: Translation.tr("Closes bar on press")
|
description: "Closes bar on press"
|
||||||
|
|
||||||
onPressed: {
|
onPressed: {
|
||||||
GlobalStates.barOpen = false;
|
GlobalStates.barOpen = false;
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ Scope { // Scope
|
|||||||
|
|
||||||
GlobalShortcut {
|
GlobalShortcut {
|
||||||
name: "cheatsheetToggle"
|
name: "cheatsheetToggle"
|
||||||
description: Translation.tr("Toggles cheatsheet on press")
|
description: "Toggles cheatsheet on press"
|
||||||
|
|
||||||
onPressed: {
|
onPressed: {
|
||||||
cheatsheetLoader.active = !cheatsheetLoader.active;
|
cheatsheetLoader.active = !cheatsheetLoader.active;
|
||||||
@@ -221,7 +221,7 @@ Scope { // Scope
|
|||||||
|
|
||||||
GlobalShortcut {
|
GlobalShortcut {
|
||||||
name: "cheatsheetOpen"
|
name: "cheatsheetOpen"
|
||||||
description: Translation.tr("Opens cheatsheet on press")
|
description: "Opens cheatsheet on press"
|
||||||
|
|
||||||
onPressed: {
|
onPressed: {
|
||||||
cheatsheetLoader.active = true;
|
cheatsheetLoader.active = true;
|
||||||
@@ -230,7 +230,7 @@ Scope { // Scope
|
|||||||
|
|
||||||
GlobalShortcut {
|
GlobalShortcut {
|
||||||
name: "cheatsheetClose"
|
name: "cheatsheetClose"
|
||||||
description: Translation.tr("Closes cheatsheet on press")
|
description: "Closes cheatsheet on press"
|
||||||
|
|
||||||
onPressed: {
|
onPressed: {
|
||||||
cheatsheetLoader.active = false;
|
cheatsheetLoader.active = false;
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ Scope {
|
|||||||
|
|
||||||
GlobalShortcut {
|
GlobalShortcut {
|
||||||
name: "mediaControlsToggle"
|
name: "mediaControlsToggle"
|
||||||
description: Translation.tr("Toggles media controls on press")
|
description: "Toggles media controls on press"
|
||||||
|
|
||||||
onPressed: {
|
onPressed: {
|
||||||
if (!mediaControlsLoader.active && Mpris.players.values.filter(player => isRealPlayer(player)).length === 0) {
|
if (!mediaControlsLoader.active && Mpris.players.values.filter(player => isRealPlayer(player)).length === 0) {
|
||||||
@@ -173,7 +173,7 @@ Scope {
|
|||||||
}
|
}
|
||||||
GlobalShortcut {
|
GlobalShortcut {
|
||||||
name: "mediaControlsOpen"
|
name: "mediaControlsOpen"
|
||||||
description: Translation.tr("Opens media controls on press")
|
description: "Opens media controls on press"
|
||||||
|
|
||||||
onPressed: {
|
onPressed: {
|
||||||
mediaControlsLoader.active = true;
|
mediaControlsLoader.active = true;
|
||||||
@@ -182,7 +182,7 @@ Scope {
|
|||||||
}
|
}
|
||||||
GlobalShortcut {
|
GlobalShortcut {
|
||||||
name: "mediaControlsClose"
|
name: "mediaControlsClose"
|
||||||
description: Translation.tr("Closes media controls on press")
|
description: "Closes media controls on press"
|
||||||
|
|
||||||
onPressed: {
|
onPressed: {
|
||||||
mediaControlsLoader.active = false;
|
mediaControlsLoader.active = false;
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ Scope {
|
|||||||
|
|
||||||
GlobalShortcut {
|
GlobalShortcut {
|
||||||
name: "osdBrightnessTrigger"
|
name: "osdBrightnessTrigger"
|
||||||
description: Translation.tr("Triggers brightness OSD on press")
|
description: "Triggers brightness OSD on press"
|
||||||
|
|
||||||
onPressed: {
|
onPressed: {
|
||||||
root.triggerOsd()
|
root.triggerOsd()
|
||||||
@@ -143,7 +143,7 @@ Scope {
|
|||||||
}
|
}
|
||||||
GlobalShortcut {
|
GlobalShortcut {
|
||||||
name: "osdBrightnessHide"
|
name: "osdBrightnessHide"
|
||||||
description: Translation.tr("Hides brightness OSD on press")
|
description: "Hides brightness OSD on press"
|
||||||
|
|
||||||
onPressed: {
|
onPressed: {
|
||||||
root.showOsdValues = false
|
root.showOsdValues = false
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ Scope {
|
|||||||
}
|
}
|
||||||
GlobalShortcut {
|
GlobalShortcut {
|
||||||
name: "osdVolumeTrigger"
|
name: "osdVolumeTrigger"
|
||||||
description: Translation.tr("Triggers volume OSD on press")
|
description: "Triggers volume OSD on press"
|
||||||
|
|
||||||
onPressed: {
|
onPressed: {
|
||||||
root.triggerOsd()
|
root.triggerOsd()
|
||||||
@@ -194,7 +194,7 @@ Scope {
|
|||||||
}
|
}
|
||||||
GlobalShortcut {
|
GlobalShortcut {
|
||||||
name: "osdVolumeHide"
|
name: "osdVolumeHide"
|
||||||
description: Translation.tr("Hides volume OSD on press")
|
description: "Hides volume OSD on press"
|
||||||
|
|
||||||
onPressed: {
|
onPressed: {
|
||||||
root.showOsdValues = false
|
root.showOsdValues = false
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ Scope { // Scope
|
|||||||
|
|
||||||
GlobalShortcut {
|
GlobalShortcut {
|
||||||
name: "oskToggle"
|
name: "oskToggle"
|
||||||
description: Translation.tr("Toggles on screen keyboard on press")
|
description: "Toggles on screen keyboard on press"
|
||||||
|
|
||||||
onPressed: {
|
onPressed: {
|
||||||
oskLoader.active = !oskLoader.active;
|
oskLoader.active = !oskLoader.active;
|
||||||
@@ -150,7 +150,7 @@ Scope { // Scope
|
|||||||
|
|
||||||
GlobalShortcut {
|
GlobalShortcut {
|
||||||
name: "oskOpen"
|
name: "oskOpen"
|
||||||
description: Translation.tr("Opens on screen keyboard on press")
|
description: "Opens on screen keyboard on press"
|
||||||
|
|
||||||
onPressed: {
|
onPressed: {
|
||||||
oskLoader.active = true;
|
oskLoader.active = true;
|
||||||
@@ -159,7 +159,7 @@ Scope { // Scope
|
|||||||
|
|
||||||
GlobalShortcut {
|
GlobalShortcut {
|
||||||
name: "oskClose"
|
name: "oskClose"
|
||||||
description: Translation.tr("Closes on screen keyboard on press")
|
description: "Closes on screen keyboard on press"
|
||||||
|
|
||||||
onPressed: {
|
onPressed: {
|
||||||
oskLoader.active = false;
|
oskLoader.active = false;
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ Scope {
|
|||||||
|
|
||||||
GlobalShortcut {
|
GlobalShortcut {
|
||||||
name: "overviewToggle"
|
name: "overviewToggle"
|
||||||
description: Translation.tr("Toggles overview on press")
|
description: "Toggles overview on press"
|
||||||
|
|
||||||
onPressed: {
|
onPressed: {
|
||||||
GlobalStates.overviewOpen = !GlobalStates.overviewOpen
|
GlobalStates.overviewOpen = !GlobalStates.overviewOpen
|
||||||
@@ -156,7 +156,7 @@ Scope {
|
|||||||
}
|
}
|
||||||
GlobalShortcut {
|
GlobalShortcut {
|
||||||
name: "overviewClose"
|
name: "overviewClose"
|
||||||
description: Translation.tr("Closes overview")
|
description: "Closes overview"
|
||||||
|
|
||||||
onPressed: {
|
onPressed: {
|
||||||
GlobalStates.overviewOpen = false
|
GlobalStates.overviewOpen = false
|
||||||
@@ -164,7 +164,7 @@ Scope {
|
|||||||
}
|
}
|
||||||
GlobalShortcut {
|
GlobalShortcut {
|
||||||
name: "overviewToggleRelease"
|
name: "overviewToggleRelease"
|
||||||
description: Translation.tr("Toggles overview on release")
|
description: "Toggles overview on release"
|
||||||
|
|
||||||
onPressed: {
|
onPressed: {
|
||||||
GlobalStates.superReleaseMightTrigger = true
|
GlobalStates.superReleaseMightTrigger = true
|
||||||
@@ -180,9 +180,9 @@ Scope {
|
|||||||
}
|
}
|
||||||
GlobalShortcut {
|
GlobalShortcut {
|
||||||
name: "overviewToggleReleaseInterrupt"
|
name: "overviewToggleReleaseInterrupt"
|
||||||
description: Translation.tr("Interrupts possibility of overview being toggled on release. ") +
|
description: "Interrupts possibility of overview being toggled on release. " +
|
||||||
Translation.tr("This is necessary because GlobalShortcut.onReleased in quickshell triggers whether or not you press something else while holding the key. ") +
|
"This is necessary because GlobalShortcut.onReleased in quickshell triggers whether or not you press something else while holding the key. " +
|
||||||
Translation.tr("To make sure this works consistently, use binditn = MODKEYS, catchall in an automatically triggered submap that includes everything.")
|
"To make sure this works consistently, use binditn = MODKEYS, catchall in an automatically triggered submap that includes everything."
|
||||||
|
|
||||||
onPressed: {
|
onPressed: {
|
||||||
GlobalStates.superReleaseMightTrigger = false
|
GlobalStates.superReleaseMightTrigger = false
|
||||||
@@ -190,7 +190,7 @@ Scope {
|
|||||||
}
|
}
|
||||||
GlobalShortcut {
|
GlobalShortcut {
|
||||||
name: "overviewClipboardToggle"
|
name: "overviewClipboardToggle"
|
||||||
description: Translation.tr("Toggle clipboard query on overview widget")
|
description: "Toggle clipboard query on overview widget"
|
||||||
|
|
||||||
onPressed: {
|
onPressed: {
|
||||||
if (GlobalStates.overviewOpen && overviewScope.dontAutoCancelSearch) {
|
if (GlobalStates.overviewOpen && overviewScope.dontAutoCancelSearch) {
|
||||||
@@ -213,7 +213,7 @@ Scope {
|
|||||||
|
|
||||||
GlobalShortcut {
|
GlobalShortcut {
|
||||||
name: "overviewEmojiToggle"
|
name: "overviewEmojiToggle"
|
||||||
description: Translation.tr("Toggle emoji query on overview widget")
|
description: "Toggle emoji query on overview widget"
|
||||||
|
|
||||||
onPressed: {
|
onPressed: {
|
||||||
if (GlobalStates.overviewOpen && overviewScope.dontAutoCancelSearch) {
|
if (GlobalStates.overviewOpen && overviewScope.dontAutoCancelSearch) {
|
||||||
|
|||||||
@@ -210,7 +210,7 @@ Scope {
|
|||||||
|
|
||||||
GlobalShortcut {
|
GlobalShortcut {
|
||||||
name: "sessionToggle"
|
name: "sessionToggle"
|
||||||
description: Translation.tr("Toggles session screen on press")
|
description: "Toggles session screen on press"
|
||||||
|
|
||||||
onPressed: {
|
onPressed: {
|
||||||
sessionLoader.active = !sessionLoader.active;
|
sessionLoader.active = !sessionLoader.active;
|
||||||
@@ -219,7 +219,7 @@ Scope {
|
|||||||
|
|
||||||
GlobalShortcut {
|
GlobalShortcut {
|
||||||
name: "sessionOpen"
|
name: "sessionOpen"
|
||||||
description: Translation.tr("Opens session screen on press")
|
description: "Opens session screen on press"
|
||||||
|
|
||||||
onPressed: {
|
onPressed: {
|
||||||
sessionLoader.active = true;
|
sessionLoader.active = true;
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ Scope { // Scope
|
|||||||
|
|
||||||
GlobalShortcut {
|
GlobalShortcut {
|
||||||
name: "sidebarLeftToggle"
|
name: "sidebarLeftToggle"
|
||||||
description: Translation.tr("Toggles left sidebar on press")
|
description: "Toggles left sidebar on press"
|
||||||
|
|
||||||
onPressed: {
|
onPressed: {
|
||||||
GlobalStates.sidebarLeftOpen = !GlobalStates.sidebarLeftOpen;
|
GlobalStates.sidebarLeftOpen = !GlobalStates.sidebarLeftOpen;
|
||||||
@@ -179,7 +179,7 @@ Scope { // Scope
|
|||||||
|
|
||||||
GlobalShortcut {
|
GlobalShortcut {
|
||||||
name: "sidebarLeftOpen"
|
name: "sidebarLeftOpen"
|
||||||
description: Translation.tr("Opens left sidebar on press")
|
description: "Opens left sidebar on press"
|
||||||
|
|
||||||
onPressed: {
|
onPressed: {
|
||||||
GlobalStates.sidebarLeftOpen = true;
|
GlobalStates.sidebarLeftOpen = true;
|
||||||
@@ -188,7 +188,7 @@ Scope { // Scope
|
|||||||
|
|
||||||
GlobalShortcut {
|
GlobalShortcut {
|
||||||
name: "sidebarLeftClose"
|
name: "sidebarLeftClose"
|
||||||
description: Translation.tr("Closes left sidebar on press")
|
description: "Closes left sidebar on press"
|
||||||
|
|
||||||
onPressed: {
|
onPressed: {
|
||||||
GlobalStates.sidebarLeftOpen = false;
|
GlobalStates.sidebarLeftOpen = false;
|
||||||
@@ -197,7 +197,7 @@ Scope { // Scope
|
|||||||
|
|
||||||
GlobalShortcut {
|
GlobalShortcut {
|
||||||
name: "sidebarLeftToggleDetach"
|
name: "sidebarLeftToggleDetach"
|
||||||
description: Translation.tr("Detach left sidebar into a window/Attach it back")
|
description: "Detach left sidebar into a window/Attach it back"
|
||||||
|
|
||||||
onPressed: {
|
onPressed: {
|
||||||
root.detach = !root.detach;
|
root.detach = !root.detach;
|
||||||
|
|||||||
@@ -224,7 +224,7 @@ Scope {
|
|||||||
|
|
||||||
GlobalShortcut {
|
GlobalShortcut {
|
||||||
name: "sidebarRightToggle"
|
name: "sidebarRightToggle"
|
||||||
description: Translation.tr("Toggles right sidebar on press")
|
description: "Toggles right sidebar on press"
|
||||||
|
|
||||||
onPressed: {
|
onPressed: {
|
||||||
GlobalStates.sidebarRightOpen = !GlobalStates.sidebarRightOpen;
|
GlobalStates.sidebarRightOpen = !GlobalStates.sidebarRightOpen;
|
||||||
@@ -233,7 +233,7 @@ Scope {
|
|||||||
}
|
}
|
||||||
GlobalShortcut {
|
GlobalShortcut {
|
||||||
name: "sidebarRightOpen"
|
name: "sidebarRightOpen"
|
||||||
description: Translation.tr("Opens right sidebar on press")
|
description: "Opens right sidebar on press"
|
||||||
|
|
||||||
onPressed: {
|
onPressed: {
|
||||||
GlobalStates.sidebarRightOpen = true;
|
GlobalStates.sidebarRightOpen = true;
|
||||||
@@ -242,7 +242,7 @@ Scope {
|
|||||||
}
|
}
|
||||||
GlobalShortcut {
|
GlobalShortcut {
|
||||||
name: "sidebarRightClose"
|
name: "sidebarRightClose"
|
||||||
description: Translation.tr("Closes right sidebar on press")
|
description: "Closes right sidebar on press"
|
||||||
|
|
||||||
onPressed: {
|
onPressed: {
|
||||||
GlobalStates.sidebarRightOpen = false;
|
GlobalStates.sidebarRightOpen = false;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import "root:/modules/common"
|
import "root:/modules/common"
|
||||||
import "root:/modules/common/widgets"
|
import "root:/modules/common/widgets"
|
||||||
import "../"
|
import "root:/"
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import Quickshell.Io
|
import Quickshell.Io
|
||||||
import Quickshell
|
import Quickshell
|
||||||
|
|||||||
@@ -141,13 +141,13 @@ Singleton {
|
|||||||
|
|
||||||
GlobalShortcut {
|
GlobalShortcut {
|
||||||
name: "brightnessIncrease"
|
name: "brightnessIncrease"
|
||||||
description: Translation.tr("Increase brightness")
|
description: "Increase brightness"
|
||||||
onPressed: root.increaseBrightness()
|
onPressed: root.increaseBrightness()
|
||||||
}
|
}
|
||||||
|
|
||||||
GlobalShortcut {
|
GlobalShortcut {
|
||||||
name: "brightnessDecrease"
|
name: "brightnessDecrease"
|
||||||
description: Translation.tr("Decrease brightness")
|
description: "Decrease brightness"
|
||||||
onPressed: root.decreaseBrightness()
|
onPressed: root.decreaseBrightness()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user