mirror of
https://github.com/danbulant/dots-hyprland
synced 2026-05-19 04:08:48 +00:00
wallpaper selector: allow making system picker the default
This commit is contained in:
parent
d3a1bd52c7
commit
074f8ed902
3 changed files with 21 additions and 6 deletions
|
|
@ -338,7 +338,11 @@ Singleton {
|
|||
property int longBreak: 900
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
property JsonObject wallpaperSelector: JsonObject {
|
||||
property bool useSystemFileDialog: false
|
||||
}
|
||||
|
||||
property JsonObject windows: JsonObject {
|
||||
property bool showTitlebar: true // Client-side decoration for shell apps
|
||||
property bool centerTitle: true
|
||||
|
|
|
|||
|
|
@ -57,19 +57,25 @@ Scope {
|
|||
}
|
||||
}
|
||||
|
||||
function toggleWallpaperSelector() {
|
||||
if (Config.options.wallpaperSelector.useSystemFileDialog) {
|
||||
Wallpapers.openFallbackPicker(Appearance.m3colors.darkmode);
|
||||
return;
|
||||
}
|
||||
GlobalStates.wallpaperSelectorOpen = !GlobalStates.wallpaperSelectorOpen
|
||||
}
|
||||
|
||||
IpcHandler {
|
||||
target: "wallpaperSelector"
|
||||
|
||||
function toggle(): void {
|
||||
GlobalStates.wallpaperSelectorOpen = !GlobalStates.wallpaperSelectorOpen
|
||||
root.toggleWallpaperSelector();
|
||||
}
|
||||
}
|
||||
|
||||
GlobalShortcut {
|
||||
name: "wallpaperSelectorToggle"
|
||||
description: "Toggle wallpaper selector"
|
||||
onPressed: {
|
||||
GlobalStates.wallpaperSelectorOpen = !GlobalStates.wallpaperSelectorOpen;
|
||||
}
|
||||
onPressed: root.toggleWallpaperSelector();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -316,12 +316,17 @@ MouseArea {
|
|||
Wallpapers.openFallbackPicker(root.useDarkMode);
|
||||
GlobalStates.wallpaperSelectorOpen = false;
|
||||
}
|
||||
altAction: () => {
|
||||
Wallpapers.openFallbackPicker(root.useDarkMode);
|
||||
GlobalStates.wallpaperSelectorOpen = false;
|
||||
Config.options.wallpaperSelector.useSystemFileDialog = true
|
||||
}
|
||||
contentItem: MaterialSymbol {
|
||||
text: "open_in_new"
|
||||
iconSize: Appearance.font.pixelSize.larger
|
||||
}
|
||||
StyledToolTip {
|
||||
content: Translation.tr("Use the system file picker instead")
|
||||
content: Translation.tr("Use the system file picker instead\nRight-click to make this the default behavior")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue