From e818d171b4ca3f12c5661ad4ea5a1b7456c3dd9d Mon Sep 17 00:00:00 2001 From: Hannes Date: Fri, 3 Jul 2026 21:36:23 +0200 Subject: [PATCH] first commit --- config | 34 ++++++++++++++++++++++++ scripts/launch_app.sh | 52 ++++++++++++++++++++++++++++++++++++ style.css | 62 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 148 insertions(+) create mode 100755 config create mode 100755 scripts/launch_app.sh create mode 100755 style.css diff --git a/config b/config new file mode 100755 index 0000000..29f2c08 --- /dev/null +++ b/config @@ -0,0 +1,34 @@ +// _ _ _ _____ _____ _ +// | | | | | __|_| +// | | | | | | __| | +// |_____|_____|__| |_| CONFIG +// +// by Bina + + +mode=drun +allow_images=true +image_size=30 +prompt= search +columns=1 +width=480 +height=330 +no_actions=true +monitor=$(hyprctl monitors -j | jq -r '.[] | select(.focused) | .name') +location=center +colors=colors +filter_rate=100 +allow_markup=true +halign=fill +orientation=vertical +content_halign=fill +matching=contains +insensitive=true +term=kitty +parse_search=true +allow_markup=true +single_click=false +line_wrap=char +key_down=Tab +key_expand=Right +key_forward=Down diff --git a/scripts/launch_app.sh b/scripts/launch_app.sh new file mode 100755 index 0000000..1992c89 --- /dev/null +++ b/scripts/launch_app.sh @@ -0,0 +1,52 @@ +nano #!/bin/bash + +LOGFILE="/tmp/launch_app_debug.log" +echo "------ $(date) ------" >> "$LOGFILE" + +# Get cursor position +read -r CURSOR_X CURSOR_Y <<< $(hyprctl cursorpos | awk '{gsub(/[^0-9 ]/, "", $0); print $1, $2}') +echo "Cursor Position: X=$CURSOR_X, Y=$CURSOR_Y" >> "$LOGFILE" + +# Detect monitor under cursor +monitor=$(hyprctl monitors -j | jq -r \ + --arg x "$CURSOR_X" --arg y "$CURSOR_Y" ' + .[] | select( + (.x <= ($x|tonumber) and ($x|tonumber) < (.x + .width)) and + (.y <= ($y|tonumber) and ($y|tonumber) < (.y + .height)) + ) | .name') + +if [ -z "$monitor" ]; then + echo "Could not detect monitor. Defaulting." >> "$LOGFILE" + monitor="unknown" + fi + + echo "Detected Monitor: $monitor" >> "$LOGFILE" + + # Assign DPI scaling based on monitor + case "$monitor" in +"HDMI-A-1" | "DP-2") +GDK_SCALE=2 +GDK_DPI_SCALE=0.5 +QT_SCALE_FACTOR=2 +;; +"DP-3" | "DP-1") +GDK_SCALE=1 +GDK_DPI_SCALE=1 +QT_SCALE_FACTOR=1 +;; +*) +echo "Monitor $monitor not matched to known profiles." >> "$LOGFILE" +GDK_SCALE=1 +GDK_DPI_SCALE=1 +QT_SCALE_FACTOR=1 +;; +esac + +echo "ENV: GDK_SCALE=$GDK_SCALE, GDK_DPI_SCALE=$GDK_DPI_SCALE, QT_SCALE_FACTOR=$QT_SCALE_FACTOR" >> "$LOGFILE" + +export GDK_SCALE +export GDK_DPI_SCALE +export QT_SCALE_FACTOR + +echo "Executing: $@" >> "$LOGFILE" +exec "$@" diff --git a/style.css b/style.css new file mode 100755 index 0000000..e4ae5bd --- /dev/null +++ b/style.css @@ -0,0 +1,62 @@ +*{ + border: none; + box-shadow: none; + outline: none; +} + +window { + font-size: 14px; + font-family: "JetBrains Mono"; + background-color: #191114; + border-radius: 8px; + opacity: 0.90; +} + +#outer-box { + margin: 10px 10px 20px 10px; + background-color: #191114; + opacity: 0.90; +} + +#inner-box { + margin: 10px; + background-color: #191114; + opacity: 0.90; +} + +#entry { + padding: 5px 10px; + border-radius: 20px; +} + +#entry #text { + padding: 0px 0px 0px 10px; + font-weight: normal; + color: #e1bdc9; +} + +#entry:selected { + background-color: #6e334d; +} + +#entry:selected #text { + padding: 0px 0px 0px 10px; + font-weight: normal; + color: #ffb0ce; +} + +#input { + background: transparent; + margin: 0px 5px 0px 20px; + color: #ffb0ce; + padding: 5px; +} + +#image { + margin-left: 20px; + margin-right: 20px; +} + +#scroll { + margin: 0px; +} \ No newline at end of file