forked from Shinonome/dots-hyprland
add random osu seasonal wallpaper button
This commit is contained in:
@@ -14,12 +14,13 @@ ContentPage {
|
||||
forceWidth: true
|
||||
|
||||
Process {
|
||||
id: konachanWallProc
|
||||
id: randomWallProc
|
||||
property string status: ""
|
||||
command: ["bash", "-c", FileUtils.trimFileProtocol(`${Directories.scriptPath}/colors/random_konachan_wall.sh`)]
|
||||
property string scriptPath: `${Directories.scriptPath}/colors/random/random_konachan_wall.sh`
|
||||
command: ["bash", "-c", FileUtils.trimFileProtocol(randomWallProc.scriptPath)]
|
||||
stdout: SplitParser {
|
||||
onRead: data => {
|
||||
konachanWallProc.status = data.trim();
|
||||
randomWallProc.status = data.trim();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -90,19 +91,35 @@ ContentPage {
|
||||
|
||||
ColumnLayout {
|
||||
RippleButtonWithIcon {
|
||||
id: rndWallBtn
|
||||
enabled: !randomWallProc.running
|
||||
visible: Config.options.policies.weeb === 1
|
||||
Layout.fillWidth: true
|
||||
buttonRadius: Appearance.rounding.small
|
||||
materialIcon: "ifl"
|
||||
mainText: konachanWallProc.running ? Translation.tr("Be patient...") : Translation.tr("Random: Konachan")
|
||||
mainText: randomWallProc.running ? Translation.tr("Be patient...") : Translation.tr("Random: Konachan")
|
||||
onClicked: {
|
||||
konachanWallProc.running = true;
|
||||
randomWallProc.scriptPath = `${Directories.scriptPath}/colors/random/random_konachan_wall.sh`;
|
||||
randomWallProc.running = true;
|
||||
}
|
||||
StyledToolTip {
|
||||
text: Translation.tr("Random SFW Anime wallpaper from Konachan\nImage is saved to ~/Pictures/Wallpapers")
|
||||
}
|
||||
}
|
||||
RippleButtonWithIcon {
|
||||
enabled: !randomWallProc.running
|
||||
visible: Config.options.policies.weeb === 1
|
||||
Layout.fillWidth: true
|
||||
buttonRadius: Appearance.rounding.small
|
||||
materialIcon: "ifl"
|
||||
mainText: randomWallProc.running ? Translation.tr("Be patient...") : Translation.tr("Random: osu! seasonal")
|
||||
onClicked: {
|
||||
randomWallProc.scriptPath = `${Directories.scriptPath}/colors/random/random_osu_wall.sh`;
|
||||
randomWallProc.running = true;
|
||||
}
|
||||
StyledToolTip {
|
||||
text: Translation.tr("Random osu! seasonal background\nImage is saved to ~/Pictures/Wallpapers")
|
||||
}
|
||||
}
|
||||
RippleButtonWithIcon {
|
||||
Layout.fillWidth: true
|
||||
materialIcon: "wallpaper"
|
||||
@@ -154,17 +171,6 @@ ContentPage {
|
||||
dark: true
|
||||
}
|
||||
}
|
||||
|
||||
ConfigSwitch {
|
||||
text: Translation.tr("Transparency")
|
||||
checked: Config.options.appearance.transparency.enable
|
||||
onCheckedChanged: {
|
||||
Config.options.appearance.transparency.enable = checked;
|
||||
}
|
||||
StyledToolTip {
|
||||
text: Translation.tr("Might look ass. Unsupported.")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -213,6 +219,17 @@ ContentPage {
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
ConfigSwitch {
|
||||
text: Translation.tr("Transparency")
|
||||
checked: Config.options.appearance.transparency.enable
|
||||
onCheckedChanged: {
|
||||
Config.options.appearance.transparency.enable = checked;
|
||||
}
|
||||
StyledToolTip {
|
||||
text: Translation.tr("Might look ass. Unsupported.")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ContentSection {
|
||||
|
||||
Reference in New Issue
Block a user