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,112 @@
{
"layer": "top",
"position": "top",
"margin-top": 12,
"margin-left": 15,
"margin-right": 15,
"spacing": 12,
"modules-left": ["clock#date", "hyprland/workspaces", "custom/settings", "custom/configs", "custom/discord"],
"modules-right": ["custom/keyboard", "wireplumber", "network", "custom/gpu", "cpu", "memory", "battery", "custom/power"],
"modules-center": ["clock#time"],
"custom/gpu": {
"exec": "cat /sys/class/drm/card*/device/gpu_busy_percent 2>/dev/null | head -1",
"format-icons": ["<span color='#BCB9EB'>󰘚</span>"],
"format": "{}% {icon}",
"interval": 8
},
"custom/keyboard": {
"signal": 8,
"format-icons": ["<span color='#BCB9EB'>⌨</span>"],
"format": "{} {icon}",
"exec": "~/.config/waybar/scripts/fcitx5-status.sh"
},
"custom/configs": {
"format-icons": ["<span color='#BCB9EB'>󰈙</span>"],
"format": "{icon}",
"tooltip": true,
"tooltip-format": "Config list",
"on-click": "~/.local/bin/rofi-config-manager.sh"
},
"custom/settings": {
"format-icons": ["<span color='#BCB9EB'></span>"],
"format": "{icon}",
"tooltip": true,
"tooltip-format": "Control panel",
"on-click": "~/.local/bin/rofi-settings-manager.sh"
},
"custom/discord": {
"format-icons": ["<span color='#BCB9EB'></span>"],
"format": "{icon}",
"tooltip": false,
"on-click": "discord --enable-features=UseOzonePlatform --ozone-platform=wayland"
},
"hyprland/workspaces": {
"format": "{icon}",
"format-icons": {
"active": "",
"default": "",
"urgent": ""
},
"on-click": "activate"
},
"cpu": {
"format-icons": ["<span color='#BCB9EB'></span>"],
"format": "{usage}% {icon}",
"tooltip": false
},
"memory": {
"format-icons": ["<span color='#BCB9EB'></span>"],
"format": "{}% {icon}"
},
"clock#date": {
"format": "{:%m/%d}"
},
"clock#time": {
"format": "{:%H:%M}"
},
"custom/power": {
"format-icons": ["<span color='#C97F87'></span>"],
"format": "{icon}",
"tooltip": false,
"on-click": "~/.local/bin/rofi-power-manager.sh"
},
"network": {
"max-length": 10,
"format-wifi": "{essid} <span color='#BCB9EB'></span>",
"format-ethernet": "{ipaddr}/{cidr} ",
"tooltip-format": "{ifname} via {gwaddr} ",
"format-linked": "{ifname} (No IP) ",
"format-disconnected": "Disconnected ⚠",
"on-click": "ghostty -e nmtui & disown"
// "format-alt": "{ifname}: {ipaddr}/{cidr}",
},
"wireplumber": {
"format": "{volume}% <span color='#BCB9EB'>{icon}</span>",
"format-icons": {
"default": [
"",
"",
""
]
},
"format-muted": "<span color='#BCB9EB'></span>",
"on-click": "pavucontrol"
},
"battery": {
"states": {
// "good": 95,
"warning": 30,
"critical": 15
},
"format": "{capacity}% {icon}",
"format-full": "{capacity}% {icon}",
"format-charging": "{capacity}% 󰂄",
"format-alt": "{time} {icon}",
"format-icons": ["<span color='#BCB9EB'></span>", "<span color='#BCB9EB'></span>", "<span color='#BCB9EB'></span>", "<span color='#BCB9EB'></span>", "<span color='#BCB9EB'></span>"]
// "format-good": "", // An empty format will hide the module
// "format-full": "",
// "format-plugged": "{capacity}% ",
}
}

View File

@@ -0,0 +1,27 @@
#!/bin/bash
current_im=$(fcitx5-remote -n 2>/dev/null)
if [[ "$current_im" == "anthy" ]]; then
CURRENT_STATUS="JP"
else
CURRENT_STATUS="EN"
fi
dbus-monitor --session "type='signal',interface='org.fcitx.Fcitx.InputContext1',member='CurrentIM'" 2>/dev/null | \
while IFS= read -r line; do
if [[ "$line" == *"member=CurrentIM"* ]]; then
# Read the next line which contains the input method string
read -r im_line
if [[ "$im_line" == *"Anthy"* ]]; then
NEW_STATUS="JP"
else
NEW_STATUS="EN"
fi
# Only refresh if status actually changed
if [[ "$NEW_STATUS" != "$CURRENT_STATUS" ]]; then
sleep 0.1
pkill -RTMIN+8 waybar
CURRENT_STATUS="$NEW_STATUS"
fi
fi
done

View File

@@ -0,0 +1,25 @@
#!/bin/bash
# Get current fcitx5 input method
IM=$(fcitx5-remote -n 2>/dev/null)
# Check if fcitx5 is running
if [ -z "$IM" ]; then
echo "EN"
exit 0
fi
case "$IM" in
"keyboard-us")
echo "EN"
;;
"anthy")
echo "JP"
;;
"mozc-jp")
echo "JP"
;;
*)
# Fallback - show first 2 characters of input method name
echo "${IM:0:2}" | tr '[:lower:]' '[:upper:]'
;;
esac

95
hyprland/waybar/style.css Normal file
View File

@@ -0,0 +1,95 @@
* {
border: none;
border-radius: 0;
font-family: "Geist", sans-serif;
font-size: 12px;
min-height: 0;
}
window#waybar {
border-radius: 10px;
background-color: rgba(18, 18, 36, 0.35);
border: 1px solid rgb(213, 174, 214);
transition-property: background-color;
transition-duration: 0.5s;
}
.modules-left {
padding-left: 18px;
}
.modules-right {
padding-right: 18px;
}
#clock,
#workspaces,
#network,
#pulseaudio,
#cpu,
#custom-power,
#custom-discord,
#memory,
#battery,
#battery.charging,
#battery.plugged {
background: transparent;
color: #e6d4e6;
padding: 8px 0px;
}
#clock {
color: #C9C5BB;
}
#clock.time {
font-family: "Octal", monospace;
font-weight:400;
letter-spacing: 1px;
font-size: 14px;
}
#custom-power {
padding-right: 1px;
}
#workspaces button {
background: transparent;
color: #9EA0AD;
padding: 0 4px;
}
#workspaces button:hover {
box-shadow: none;
}
#workspaces button.active {
color: #f3e2a9;
background: transparent;
font-weight: bold;
}
#workspaces button.urgent {
color: #e39696;
}
#battery.charging {
animation: battery-charging 2s steps(5) infinite;
color: #a6e3a1; /* Green charging color */
}
#battery.charging {
animation: color-shift 8s ease-in-out infinite;
}
@keyframes color-shift {
0% {
color: #a6e3a1;
}
25% {
color: #74c7ec;
}
50% {
color: #cba6f7;
}
75% {
color: #74c7ec;
}
100% {
color: #a6e3a1;
}
}