migration

This commit is contained in:
kokopi-dev
2025-10-28 16:23:11 +09:00
commit 2f27c335cf
116 changed files with 8221 additions and 0 deletions

View File

@@ -0,0 +1,87 @@
#!/bin/bash
# run init setup.sh to symlink scripts
THEME_FILE=~/.config/rofi/settings-manager/settings-manager.rasi
get_current_monitor() {
# Use Hyprland's native cursor position
local pos=$(hyprctl cursorpos 2>/dev/null)
if [ -z "$pos" ]; then
echo "Error: Could not get cursor position from Hyprland" >&2
return 1
fi
# Strip whitespace and extract coordinates
local x=$(echo "$pos" | cut -d',' -f1 | tr -d ' ')
local y=$(echo "$pos" | cut -d',' -f2 | tr -d ' ')
hyprctl monitors -j | jq -r --arg x "$x" --arg y "$y" '
.[] | select(
.x <= ($x | tonumber) and
.y <= ($y | tonumber) and
(.x + .width) >= ($x | tonumber) and
(.y + .height) >= ($y | tonumber)
) | .name'
}
# Store the monitor at the start
if [ -z "$ROFI_MONITOR" ]; then
export ROFI_MONITOR=$(get_current_monitor)
fi
post_rofi() {
local image_dir="$HOME/.config/rofi/images/sg"
local current_image=$(grep "background-image: url" "$THEME_FILE" | cut -d'"' -f2)
local new_image=$(find "$image_dir" -type f | sort -R | head -n 1 | sed "s|^$HOME|~|")
while true; do
if [[ "$new_image" != "$current_image" ]]; then
sed -i 's|url("[^"]*"|url("'"$new_image"'"|' "$THEME_FILE"
break
fi
new_image=$(find "$image_dir" -type f | sort -R | head -n 1 | sed "s|^$HOME|~|")
done
}
MONITOR_RELOAD="󰑓 Refresh"
MONITOR_SETTINGS="󰍹 Settings"
MONITOR_BACK=" Back"
MONITOR=" Monitor"
SOUND=" Sound"
BLUETOOTH="󰂯 Bluetooth"
NETWORK="󰲝 Network"
NIGHTLIGHT=" Night Light"
if [[ "$1" == "monitor" ]]; then
chosen=$(echo -e "$MONITOR_RELOAD\n$MONITOR_SETTINGS\n$MONITOR_BACK" | rofi -mesg "󰍹 Monitor" -dmenu -p "Action:" -config ~/.config/rofi/settings-manager/settings-manager.rasi -monitor "$ROFI_MONITOR")
else
chosen=$(echo -e "$MONITOR\n$SOUND\n$BLUETOOTH\n$NETWORK\n$NIGHTLIGHT" | rofi -mesg " Settings" -dmenu -p "Action:" -config ~/.config/rofi/settings-manager/settings-manager.rasi -monitor "$ROFI_MONITOR")
fi
case $chosen in
"$MONITOR_BACK")
bash ~/.config/rofi/settings-manager/rofi-settings-manager.sh
;;
"$MONITOR")
bash ~/.config/rofi/settings-manager/rofi-settings-manager.sh "monitor"
;;
"$MONITOR_RELOAD")
bash ~/.config/hypr/reload-monitors.sh
;;
"$MONITOR_SETTINGS")
ghostty -e hyprmon
;;
"$SOUND")
pavucontrol
;;
"$BLUETOOTH")
blueman-manager
;;
"$NETWORK")
ghostty -e nmtui
;;
"$NIGHTLIGHT")
ghostty -e ~/.config/wlsunset/run-wlsunset.sh
;;
esac
post_rofi &

View File

@@ -0,0 +1,129 @@
configuration {
font: "Geist 12";
hover-select: true;
me-select-entry: "MousePrimary";
me-accept-entry: "!MousePrimary";
click-to-exit: true;
}
@theme "~/.config/rofi/theme.rasi"
// Main //
window {
width: 26em;
height: 15.8em;
fullscreen: false;
enabled: true;
cursor: "default";
spacing: 0em;
opacity: 0;
background-color: transparent;
extend: false;
}
mainbox {
enabled: true;
spacing: 0em;
orientation: vertical;
children: [ "message", "mainContent" ];
border-color: @primary-opa;
border: 1px;
border-radius: 1em;
background-color: transparent;
}
// decorative text at top
message {
enabled: true;
background-color: @base-200;
text-color: @primary;
border: none;
}
textbox {
padding: 12px 1em 12px 0px;
font: "Octal Light 18";
horizontal-align: 0.0;
vertical-align: 0.5;
}
mainContent {
padding: 1em 0;
orientation: horizontal;
children: [ "listview", "imageBoxOverlay" ];
background-color: @base-200-opa;
}
imageBoxOverlay {
children: ["imageBox"];
margin: 0em 1em 0em 0em;
border-radius: 1em;
padding: 0.4em;
background-image: linear-gradient(135deg,#B575E6,#EBD488,#9084E8);
}
imageBox {
enabled: true;
background-image: url("~/.config/rofi/images/sg/15.jpg", width);
border-radius: 1em;
}
// Lists //
listview {
enabled: true;
spacing: 0.6em;
padding: 0em 1em;
columns: 1;
lines: 3;
cycle: true;
dynamic: true;
scrollbar: false;
layout: vertical;
reverse: false;
expand: true;
fixed-height: true;
fixed-columns: true;
cursor: "default";
background-color: transparent;
}
// Elements //
element {
enabled: true;
spacing: 1em;
padding: 0.4em 0em 0.4em 2.9em;
cursor: pointer;
background-color: transparent;
text-color: #E6D5E6;
}
element selected.normal {
border-radius: 0.5em;
background-image: linear-gradient(135deg,#d5aed666,#7866C44d,#7A7FDE66);
text-color: @secondary;
border-color: @primary-opa;
border: 1px;
}
element-icon {
size: 1.5em;
cursor: inherit;
background-color: transparent;
text-color: inherit;
}
element-text {
vertical-align: 0.5;
horizontal-align: 0.0;
cursor: inherit;
background-color: transparent;
text-color: inherit;
highlight: bold;
}
// Error message //
error-message {
text-color: #cdd6f4ff;
background-color: #11111be6;
text-transform: capitalize;
children: [ "textbox" ];
}
textbox {
text-color: inherit;
background-color: inherit;
vertical-align: 0.5;
horizontal-align: 0.5;
}