From 7b3884ab1a7c9bf4a3ad7d043466db46ad0e9169 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Fri, 18 Jul 2025 22:54:23 +0700 Subject: [PATCH 1/4] konachan.net instead of konachan.com to prevent captchas (#1664) --- .../quickshell/ii/scripts/colors/random_konachan_wall.sh | 2 +- .config/quickshell/ii/services/Booru.qml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.config/quickshell/ii/scripts/colors/random_konachan_wall.sh b/.config/quickshell/ii/scripts/colors/random_konachan_wall.sh index 079cad96e..29bcdd00d 100755 --- a/.config/quickshell/ii/scripts/colors/random_konachan_wall.sh +++ b/.config/quickshell/ii/scripts/colors/random_konachan_wall.sh @@ -11,7 +11,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" mkdir -p ~/Pictures/Wallpapers page=$((1 + RANDOM % 1000)); -response=$(curl "https://konachan.com/post.json?tags=rating%3Asafe&limit=1&page=$page") +response=$(curl "https:net/post.json?tags=rating%3Asafe&limit=1&page=$page") link=$(echo "$response" | jq '.[0].file_url' -r); ext=$(echo "$link" | awk -F. '{print $NF}') downloadPath="$HOME/Pictures/Wallpapers/konachan_random_image.$ext" diff --git a/.config/quickshell/ii/services/Booru.qml b/.config/quickshell/ii/services/Booru.qml index 38714bc17..e2a9d195d 100644 --- a/.config/quickshell/ii/services/Booru.qml +++ b/.config/quickshell/ii/services/Booru.qml @@ -58,8 +58,8 @@ Singleton { }, "konachan": { "name": "Konachan", - "url": "https://konachan.com", - "api": "https://konachan.com/post.json", + "url": "https://konachan.net", + "api": "https://konachan.net/post.json", "description": Translation.tr("For desktop wallpapers | Good quality"), "mapFunc": (response) => { return response.map(item => { @@ -80,7 +80,7 @@ Singleton { } }) }, - "tagSearchTemplate": "https://konachan.com/tag.json?order=count&name={{query}}*", + "tagSearchTemplate": "https://konachan.net/tag.json?order=count&name={{query}}*", "tagMapFunc": (response) => { return response.map(item => { return { @@ -360,7 +360,7 @@ Singleton { function makeRequest(tags, nsfw=false, limit=20, page=1) { var url = constructRequestUrl(tags, nsfw, limit, page) - // console.log("[Booru] Making request to " + url) + console.log("[Booru] Making request to " + url) const newResponse = root.booruResponseDataComponent.createObject(null, { "provider": currentProvider, From 65e3b6c84c4e3d014abed3c3d4b09736af5f674e Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Fri, 18 Jul 2025 23:03:58 +0700 Subject: [PATCH 2/4] fix typo --- .config/quickshell/ii/scripts/colors/random_konachan_wall.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/quickshell/ii/scripts/colors/random_konachan_wall.sh b/.config/quickshell/ii/scripts/colors/random_konachan_wall.sh index 29bcdd00d..f97182f1b 100755 --- a/.config/quickshell/ii/scripts/colors/random_konachan_wall.sh +++ b/.config/quickshell/ii/scripts/colors/random_konachan_wall.sh @@ -11,7 +11,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" mkdir -p ~/Pictures/Wallpapers page=$((1 + RANDOM % 1000)); -response=$(curl "https:net/post.json?tags=rating%3Asafe&limit=1&page=$page") +response=$(curl "https://konachan.net/post.json?tags=rating%3Asafe&limit=1&page=$page") link=$(echo "$response" | jq '.[0].file_url' -r); ext=$(echo "$link" | awk -F. '{print $NF}') downloadPath="$HOME/Pictures/Wallpapers/konachan_random_image.$ext" From 055da37987cd722deb7b670eeeb42d120f656301 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Fri, 18 Jul 2025 23:13:00 +0700 Subject: [PATCH 3/4] screenshot: fix window regions --- .config/quickshell/ii/screenshot.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/quickshell/ii/screenshot.qml b/.config/quickshell/ii/screenshot.qml index 1fb5290f5..c26840a99 100644 --- a/.config/quickshell/ii/screenshot.qml +++ b/.config/quickshell/ii/screenshot.qml @@ -7,11 +7,11 @@ pragma ComponentBehavior: "Bound" import qs +import qs.services import qs.modules.common import qs.modules.common.widgets import qs.modules.common.functions import QtQuick -import QtQuick.Effects import QtQuick.Controls import QtQuick.Layouts import Quickshell From 19ea9ea3d124387985cfdac801bf4cec8fb470db Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Fri, 18 Jul 2025 23:42:10 +0700 Subject: [PATCH 4/4] kill all apps before shutting down/rebooting/etc --- .config/quickshell/ii/modules/session/Session.qml | 14 ++++++++++---- .config/wlogout/layout | 8 ++++---- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.config/quickshell/ii/modules/session/Session.qml b/.config/quickshell/ii/modules/session/Session.qml index fc22e3303..76ca373fb 100644 --- a/.config/quickshell/ii/modules/session/Session.qml +++ b/.config/quickshell/ii/modules/session/Session.qml @@ -15,6 +15,12 @@ Scope { id: root property var focusedScreen: Quickshell.screens.find(s => s.name === Hyprland.focusedMonitor?.name) + function closeAllWindows() { + HyprlandData.windowList.map(w => w.pid).forEach((pid) => { + Quickshell.execDetached(["kill", pid]); + }); + } + Loader { id: sessionLoader active: false @@ -111,7 +117,7 @@ Scope { id: sessionLogout buttonIcon: "logout" buttonText: Translation.tr("Logout") - onClicked: { Quickshell.execDetached(["pkill", "Hyprland"]); sessionRoot.hide() } + onClicked: { root.closeAllWindows(); Quickshell.execDetached(["pkill", "Hyprland"]); sessionRoot.hide() } onFocusChanged: { if (focus) sessionRoot.subtitle = buttonText } KeyNavigation.left: sessionSleep KeyNavigation.right: sessionTaskManager @@ -140,7 +146,7 @@ Scope { id: sessionShutdown buttonIcon: "power_settings_new" buttonText: Translation.tr("Shutdown") - onClicked: { Quickshell.execDetached(["bash", "-c", `systemctl poweroff || loginctl poweroff`]); sessionRoot.hide() } + onClicked: { root.closeAllWindows(); Quickshell.execDetached(["bash", "-c", `systemctl poweroff || loginctl poweroff`]); sessionRoot.hide() } onFocusChanged: { if (focus) sessionRoot.subtitle = buttonText } KeyNavigation.left: sessionHibernate KeyNavigation.right: sessionReboot @@ -150,7 +156,7 @@ Scope { id: sessionReboot buttonIcon: "restart_alt" buttonText: Translation.tr("Reboot") - onClicked: { Quickshell.execDetached(["bash", "-c", `reboot || loginctl reboot`]); sessionRoot.hide() } + onClicked: { root.closeAllWindows(); Quickshell.execDetached(["bash", "-c", `reboot || loginctl reboot`]); sessionRoot.hide() } onFocusChanged: { if (focus) sessionRoot.subtitle = buttonText } KeyNavigation.left: sessionShutdown KeyNavigation.right: sessionFirmwareReboot @@ -160,7 +166,7 @@ Scope { id: sessionFirmwareReboot buttonIcon: "settings_applications" buttonText: Translation.tr("Reboot to firmware settings") - onClicked: { Quickshell.execDetached(["bash", "-c", `systemctl reboot --firmware-setup || loginctl reboot --firmware-setup`]); sessionRoot.hide() } + onClicked: { root.closeAllWindows(); Quickshell.execDetached(["bash", "-c", `systemctl reboot --firmware-setup || loginctl reboot --firmware-setup`]); sessionRoot.hide() } onFocusChanged: { if (focus) sessionRoot.subtitle = buttonText } KeyNavigation.up: sessionTaskManager KeyNavigation.left: sessionReboot diff --git a/.config/wlogout/layout b/.config/wlogout/layout index c31abd945..03d696b02 100644 --- a/.config/wlogout/layout +++ b/.config/wlogout/layout @@ -7,18 +7,18 @@ { "label" : "hibernate", "action" : "systemctl hibernate || loginctl hibernate", - "text" : "save", + "text" : "downloading", "keybind" : "h" } { "label" : "logout", - "action" : "pkill Hyprland || pkill sway || pkill niri || loginctl terminate-user $USER", + "action" : "hyprctl clients -j | jq -r '.[].pid' | xargs kill; pkill Hyprland || pkill sway || pkill niri || loginctl terminate-user $USER", "text" : "logout", "keybind" : "e" } { "label" : "shutdown", - "action" : "systemctl poweroff || loginctl poweroff", + "action" : "hyprctl clients -j | jq -r '.[].pid' | xargs kill; systemctl poweroff || loginctl poweroff", "text" : "power_settings_new", "keybind" : "s" } @@ -30,7 +30,7 @@ } { "label" : "reboot", - "action" : "systemctl reboot || loginctl reboot", + "action" : "hyprctl clients -j | jq -r '.[].pid' | xargs kill; systemctl reboot || loginctl reboot", "text" : "restart_alt", "keybind" : "r" }