forked from Shinonome/dots-hyprland
changes from main
This commit is contained in:
@@ -66,16 +66,9 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
|
||||||
target: Config
|
|
||||||
function onReadyChanged() {
|
|
||||||
categoryFileView.path = Directories.generatedWallpaperCategoryPath
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
FileView {
|
FileView {
|
||||||
id: categoryFileView
|
id: categoryFileView
|
||||||
path: ""
|
path: Config.ready ? Directories.generatedWallpaperCategoryPath : ""
|
||||||
watchChanges: true
|
watchChanges: true
|
||||||
onFileChanged: reload()
|
onFileChanged: reload()
|
||||||
onLoaded: {
|
onLoaded: {
|
||||||
@@ -85,7 +78,7 @@ Item {
|
|||||||
|
|
||||||
property bool useSineCookie: Config.options.background.widgets.clock.cookie.useSineCookie
|
property bool useSineCookie: Config.options.background.widgets.clock.cookie.useSineCookie
|
||||||
StyledDropShadow {
|
StyledDropShadow {
|
||||||
target: useSineCookie ? sineCookieLoader : roundedPolygonCookieLoader
|
target: root.useSineCookie ? sineCookieLoader : roundedPolygonCookieLoader
|
||||||
|
|
||||||
RotationAnimation on rotation {
|
RotationAnimation on rotation {
|
||||||
running: Config.options.background.widgets.clock.cookie.constantlyRotate
|
running: Config.options.background.widgets.clock.cookie.constantlyRotate
|
||||||
@@ -100,7 +93,7 @@ Item {
|
|||||||
id: sineCookieLoader
|
id: sineCookieLoader
|
||||||
z: 0
|
z: 0
|
||||||
visible: false // The DropShadow already draws it
|
visible: false // The DropShadow already draws it
|
||||||
active: useSineCookie
|
active: root.useSineCookie
|
||||||
sourceComponent: SineCookie {
|
sourceComponent: SineCookie {
|
||||||
implicitSize: root.implicitSize
|
implicitSize: root.implicitSize
|
||||||
sides: Config.options.background.widgets.clock.cookie.sides
|
sides: Config.options.background.widgets.clock.cookie.sides
|
||||||
@@ -111,7 +104,7 @@ Item {
|
|||||||
id: roundedPolygonCookieLoader
|
id: roundedPolygonCookieLoader
|
||||||
z: 0
|
z: 0
|
||||||
visible: false // The DropShadow already draws it
|
visible: false // The DropShadow already draws it
|
||||||
active: !useSineCookie
|
active: !root.useSineCookie
|
||||||
sourceComponent: MaterialCookie {
|
sourceComponent: MaterialCookie {
|
||||||
implicitSize: root.implicitSize
|
implicitSize: root.implicitSize
|
||||||
sides: Config.options.background.widgets.clock.cookie.sides
|
sides: Config.options.background.widgets.clock.cookie.sides
|
||||||
|
|||||||
@@ -95,6 +95,25 @@ Item { // Wrapper
|
|||||||
root.focusFirstItem();
|
root.focusFirstItem();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Ctrl+N / Ctrl+P navigation
|
||||||
|
if (event.modifiers & Qt.ControlModifier) {
|
||||||
|
if (event.key === Qt.Key_N) {
|
||||||
|
if (appResults.visible && appResults.count > 0) {
|
||||||
|
// Wrap around the list rather than the default arrow key behaviour
|
||||||
|
appResults.currentIndex = (appResults.currentIndex + 1) % appResults.count;
|
||||||
|
event.accepted = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else if (event.key === Qt.Key_P) {
|
||||||
|
if (appResults.visible && appResults.count > 0) {
|
||||||
|
// Wrap around too
|
||||||
|
appResults.currentIndex = (appResults.count + appResults.currentIndex - 1) % appResults.count;
|
||||||
|
event.accepted = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledRectangularShadow {
|
StyledRectangularShadow {
|
||||||
|
|||||||
@@ -246,8 +246,8 @@ ContentPage {
|
|||||||
value: Config.options.background.widgets.clock.digital.font.size
|
value: Config.options.background.widgets.clock.digital.font.size
|
||||||
usePercentTooltip: false
|
usePercentTooltip: false
|
||||||
buttonIcon: "format_size"
|
buttonIcon: "format_size"
|
||||||
from: 70
|
from: 50
|
||||||
to: 150
|
to: 700
|
||||||
stopIndicatorValues: [90]
|
stopIndicatorValues: [90]
|
||||||
onValueChanged: {
|
onValueChanged: {
|
||||||
Config.options.background.widgets.clock.digital.font.size = value;
|
Config.options.background.widgets.clock.digital.font.size = value;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ fi
|
|||||||
|
|
||||||
# Variables
|
# Variables
|
||||||
SOURCE_IMG_PATH="$1"
|
SOURCE_IMG_PATH="$1"
|
||||||
MODEL="${2:-${GEMINI_WALLPAPER_MODEL:-gemini-2.0-flash}}" # We use the flash variant so it's fast
|
MODEL="${2:-${GEMINI_WALLPAPER_MODEL:-gemini-2.5-flash}}" # We use the flash variant so it's fast
|
||||||
WALLPAPER_NAME="$(basename "$SOURCE_IMG_PATH")"
|
WALLPAPER_NAME="$(basename "$SOURCE_IMG_PATH")"
|
||||||
PROMPT="${3:-${GEMINI_WALLPAPER_PROMPT:-Categorize the wallpaper. Its file name is $WALLPAPER_NAME}}"
|
PROMPT="${3:-${GEMINI_WALLPAPER_PROMPT:-Categorize the wallpaper. Its file name is $WALLPAPER_NAME}}"
|
||||||
RESIZED_IMG_PATH="/tmp/quickshell/ai/wallpaper.jpg"
|
RESIZED_IMG_PATH="/tmp/quickshell/ai/wallpaper.jpg"
|
||||||
|
|||||||
@@ -155,6 +155,12 @@ set_thumbnail_path() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
categorize_wallpaper() {
|
||||||
|
img_cat=$("$SCRIPT_DIR/../ai/gemini-categorize-wallpaper.sh" "$1")
|
||||||
|
# notify-send "Wallpaper category" "$img_cat"
|
||||||
|
echo "$img_cat" > "$STATE_DIR/user/generated/wallpaper/category.txt"
|
||||||
|
}
|
||||||
|
|
||||||
switch() {
|
switch() {
|
||||||
imgpath="$1"
|
imgpath="$1"
|
||||||
mode_flag="$2"
|
mode_flag="$2"
|
||||||
@@ -163,9 +169,9 @@ switch() {
|
|||||||
color="$5"
|
color="$5"
|
||||||
|
|
||||||
# Start Gemini auto-categorization if enabled
|
# Start Gemini auto-categorization if enabled
|
||||||
aiStylingEnabled=$(jq -r '.background.clock.cookie.aiStyling' "$SHELL_CONFIG_FILE")
|
aiStylingEnabled=$(jq -r '.background.widgets.clock.cookie.aiStyling' "$SHELL_CONFIG_FILE")
|
||||||
if [[ "$aiStylingEnabled" == "true" ]]; then
|
if [[ "$aiStylingEnabled" == "true" ]]; then
|
||||||
"$SCRIPT_DIR/../ai/gemini-categorize-wallpaper.sh" "$imgpath" > "$STATE_DIR/user/generated/wallpaper/category.txt" &
|
categorize_wallpaper "$imgpath" &
|
||||||
fi
|
fi
|
||||||
|
|
||||||
read scale screenx screeny screensizey < <(hyprctl monitors -j | jq '.[] | select(.focused) | .scale, .x, .y, .height' | xargs)
|
read scale screenx screeny screensizey < <(hyprctl monitors -j | jq '.[] | select(.focused) | .scale, .x, .y, .height' | xargs)
|
||||||
|
|||||||
@@ -25,22 +25,16 @@ Singleton {
|
|||||||
|
|
||||||
property var activeTrack;
|
property var activeTrack;
|
||||||
|
|
||||||
property bool hasPlasmaIntegration: false
|
readonly property bool hasActivePlasmaIntegration: Mpris.players.values.some(
|
||||||
Process {
|
p => p.dbusName?.startsWith('org.mpris.MediaPlayer2.plasma-browser-integration')
|
||||||
id: plasmaIntegrationAvailabilityCheckProc
|
)
|
||||||
running: true
|
|
||||||
command: ["bash", "-c", "command -v plasma-browser-integration-host"]
|
|
||||||
onExited: (exitCode, exitStatus) => {
|
|
||||||
root.hasPlasmaIntegration = (exitCode === 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function isRealPlayer(player) {
|
function isRealPlayer(player) {
|
||||||
if (!Config.options.media.filterDuplicatePlayers) {
|
if (!Config.options.media.filterDuplicatePlayers) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
// Remove unecessary native buses from browsers if there's plasma integration
|
// Remove native browser buses only if plasma-browser-integration is actually active on D-Bus
|
||||||
!(hasPlasmaIntegration && player.dbusName.startsWith('org.mpris.MediaPlayer2.firefox')) && !(hasPlasmaIntegration && player.dbusName.startsWith('org.mpris.MediaPlayer2.chromium')) &&
|
!(hasActivePlasmaIntegration && player.dbusName.startsWith('org.mpris.MediaPlayer2.firefox')) && !(hasActivePlasmaIntegration && player.dbusName.startsWith('org.mpris.MediaPlayer2.chromium')) &&
|
||||||
// playerctld just copies other buses and we don't need duplicates
|
// playerctld just copies other buses and we don't need duplicates
|
||||||
!player.dbusName?.startsWith('org.mpris.MediaPlayer2.playerctld') &&
|
!player.dbusName?.startsWith('org.mpris.MediaPlayer2.playerctld') &&
|
||||||
// Non-instance mpd bus
|
// Non-instance mpd bus
|
||||||
|
|||||||
Reference in New Issue
Block a user