mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 14:59:27 -05:00
wallpaper selector: allow making system picker the default
This commit is contained in:
@@ -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")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user