idk anymore

This commit is contained in:
2025-11-08 21:18:07 +02:00
parent eda5c75a07
commit fb6ffa2e11
22 changed files with 274 additions and 173 deletions

View File

@@ -39,7 +39,7 @@
### Text ###
font = SF Pro Display 11
font = SF Pro Display 11, SFProJPDisplay-Regular 11
line_height = 0
markup = full
@@ -139,6 +139,12 @@
frame_color = "#fab387"
foreground = "#fab387"
[dotfiles_whatsplaying]
appname = "ocbwoy3-whatsplaying"
background = "#1e1e2e"
foreground = "#f38ba8"
frame_color = "#f38ba8"
[dotfiles_screenshot]
summary = "Ekrānuzņēmums"
background = "#1e1e2e"

View File

@@ -33,7 +33,7 @@ exec-once = /usr/libexec/hyprpolkitagent
# Hyprland Splash
# exec-once = "sleep 5 && bun run scripts/bin/betterSplash.ts"
exec-once = sleep 5 && notify-send "Welcome to Hyprland!" "$(hyprctl splash)"
exec-once = sleep 5 && notify-send "Sveicināti Hyprland!" "$(hyprctl splash)"
# exec-once = nix-shell -p mpvpaper --command "mpvpaper -o \"no-audio loop loop-playlist\" HDMI-A-2 \"/home/ocbwoy3/Documents/Boykisser Chipi Chipi Full Animation [3sP6ZvlqJeE].webm\""

View File

@@ -62,6 +62,9 @@ animations {
animation = specialWorkspace, 1, 6, myBezier, slide
# animation = specialWorkspaceIn, 1, 6, myBezier, slidevert bottom
# animation = specialWorkspaceOut, 1, 6, myBezier, slidevert top
animation = monitorAdded, 1, 30, monitorBez
}
@@ -96,11 +99,6 @@ dwindle {
preserve_split = true # You probably want this
}
# Master layout
master {
new_status = master
}
# Misc Config
misc {
force_default_wallpaper = 2
@@ -110,10 +108,16 @@ misc {
disable_splash_rendering = false
font_family = "SF Pro Display"
render_unfocused_fps = 240
allow_session_lock_restore = 1
}
# Layer Rules
layerrule = animation slide top, waybar
layerrule = abovelock true, waybar
layerrule = abovelock true, notifications
# layerrule = noscreenshare, notifications
layerrule = animation fade, selection
layerrule = animation popin 70%, wofi
layerrule = animation slide right, notifications

View File

@@ -16,6 +16,12 @@ bind = $mainMod, PRINT, exec, bash ~/config/scripts/screenshot-selection.sh
bind = $mainMod SHIFT, PRINT, exec, bash ~/config/scripts/screenshot-fullscreen.sh
bind = $mainMod CTRL SHIFT, PRINT, exec, bash ~/config/scripts/edit-last-screenshot.sh
# Music Get Keybind
# input:repeat_delay = 10
bindel = $mainMod, BACKSLASH, exec, bash ~/config/scripts/whatsplaying.sh
bindrl = $mainMod, BACKSLASH, exec, bash ~/config/scripts/whatsplaying.sh rel
# Global shit
bind = ALT, F9, pass, class:^(com\.obsproject\.Studio)$
@@ -25,7 +31,7 @@ bindl = $mainMod, XF86AudioLowerVolume, exec, playerctl -p chromium,cmus,elisa,c
# Screen locker and logout keybinds
bind = CTRL ALT, DELETE, exec, wlogout
bindl = SUPER SHIFT, L, exec, pkill -USR1 hyprlock || hyprlock
bindl = SUPER SHIFT, L, exec, pkill -9 hyprlock || hyprlock
# Group Stuff, complicated stuff. Enable if you dare!
# bind = SUPER, M, togglegroup

View File

@@ -18,4 +18,12 @@ source = ~/config/.hyprfail.conf
# windowrulev2 = noscreenshare, class:^(equibop)$
# /swedbank|checkout|billing/i
# windowrulev2 = noscreenshare,title:.*([S|s]wedbank|[Cc]heckout|[Bb]illing).*
windowrule = supressevent fullscreen,class:steam_proton,title:(Wine Desktop)
windowrule = supressevent maximize,class:steam_proton,title:(Wine Desktop)
windowrule = supressevent activate,class:steam_proton,title:(Wine Desktop)
windowrule = supressevent activatefocus,class:steam_proton,title:(Wine Desktop)
windowrule = supressevent fullscreenoutput,class:steam_proton,title:(Wine Desktop)
# windowrule = pin,class:steam_proton

View File

@@ -3,149 +3,35 @@ general {
no_fade_in = true
no_fade_out = true
disable_loading_bar = false
hide_cursor = true
hide_cursor = false
ignore_empty_input = true
immediate_render = true
text_trim = true
}
#BACKGROUND
background {
monitor =
# path = ~/wallpaper.png
path = screenshot
blur_passes = 2
contrast = 0.8916
brightness = 0.7172
vibrancy = 0.1696
vibrancy_darkness = 0
path = ~/Pictures/Wallpapers/wall_anime2_4k.png
blur_passes = 1
}
# TIME HR
label {
monitor =
text = cmd[update:100] echo -e "$(date +"%H")"
color = rgba(255, 255, 255, 1)
shadow_pass = 2
shadow_size = 3
shadow_color = rgb(0,0,0)
shadow_boost = 1.2
font_size = 150
# font_family = JetBrains Mono Nerd Font Mono ExtraBold
font_family = Symbols Nerd Font, SF Mono
position = 0, -250
halign = center
valign = top
}
# TIME
label {
monitor =
text = cmd[update:100] echo -e "$(date +"%M")"
# color = 0xff$color0
color = rgba(255, 255, 255, 1)
font_size = 150
# font_family = JetBrains Mono Nerd Font Mono ExtraBold
font_family = Symbols Nerd Font, SF Mono
position = 0, -420
halign = center
valign = top
}
# DATE
label {
monitor =
text = cmd[update:100] echo -e "$(LC_TIME=lv_LV.UTF-8 date +"%A, %Y. gada %-d. %B" | sed 's/./\U&/1')"
color = rgba(255, 255, 255, 1)
font_size = 14
font_family = Symbols Nerd Font, SF Pro Display
position = 0, -130
halign = center
valign = center
}
# Music
image {
monitor =
path =
size = 80 # lesser side if not 1:1 ratio
rounding = 5 # negative values mean circle
border_size = 0
rotate = 0 # degrees, counter-clockwise
reload_time = 2
reload_cmd = bash ~/config/scripts/modules/hyprlock/info.sh --arturl
position = -150, -300
halign = center
valign = center
opacity=0.5
}
# PLAYER TITTLE
label {
monitor =
# text = cmd[update:100] echo "$(playerctl metadata --format "{{ xesam:title }}" 2>/dev/null | cut -c1-25)"
text = cmd[update:100] echo "$(bash ~/config/scripts/modules/hyprlock/info.sh --title)"
color = rgba(255, 255, 255, 0.8)
font_size = 12
font_family = Symbols Nerd Font, SF Pro Display
position = 880, -290
halign = left
valign = center
}
# PLAYER SOURCE
label {
monitor =
# text= cmd[update:100] echo "$(playerctl metadata --format "{{ mpris:trackid }}" 2>/dev/null | grep -Eo "chromium|firefox|spotify")"
text = cmd[update:100] echo "$(bash ~/config/scripts/modules/hyprlock/info.sh --source)"
color = rgba(255, 255, 255, 0.6)
font_size = 10
font_family = Symbols Nerd Font, SF Pro Display
position = -740, -330
halign = right
valign = center
}
# PLAYER ALBUM
label {
monitor =
# text= cmd[update:100] echo "$(~/.config/hypr/bin/album.sh)"
text = cmd[update:100] echo "$(bash ~/config/scripts/modules/hyprlock/info.sh --album)"
color = rgba(255, 255, 255, 1)
font_size = 10
font_family = Symbols Nerd Font, SF Pro Display
position = 880, -330
halign = left
valign = center
}
# PLAYER Artist
label {
monitor =
# text = cmd[update:100] echo "$(playerctl metadata --format "{{ xesam:artist }}" 2>/dev/null | cut -c1-30)"
text = cmd[update:100] echo "$(bash ~/config/scripts/modules/hyprlock/info.sh --artist)"
color = rgba(255, 255, 255, 0.8)
font_size = 10
font_family = Symbols Nerd Font, SF Pro Display
position = 880, -310
halign = left
valign = center
}
# INPUT FIELD
input-field {
monitor =
size = 250, 60
outline_thickness = 0
outer_color = rgba(0, 0, 0, 1)
dots_size = 0.1 # Scale of input-field height, 0.2 - 0.8
dots_spacing = 1 # Scale of dots' absolute size, 0.0 - 1.0
dots_center = true
inner_color = rgba(0, 0, 0, 1)
font_color = rgba(200, 200, 200, 1)
inner_color = rgba(0, 0, 0, 0)
check_color = rgba(0, 0, 0, 0)
fail_color = rgba(0, 0, 0, 0)
font_color = rgb(245, 194, 231)
fade_on_empty = false
font_family = Symbols Nerd Font, SF Pro Display
placeholder_text = <span foreground="##cdd6f4"></span>
placeholder_text = Session locked, enter password to unlock!
hide_input = false
fail_text = <span foreground="##00ff00"> Password hint: Favorite Character (Deltarune, not Regretevator) </span>
fail_text = Password hint: Favorite Character - Deltarune, not Regretevator!
position = 0, -470
halign = center
valign = center

View File

@@ -14,7 +14,7 @@
],
"modules-right": [
// "custom/regretevator_state",
"mpris",
"custom/cider",
"group/traygroup",
"clock"
]

View File

@@ -31,6 +31,18 @@
"max-length": 60
},
"custom/cider": {
"restart-interval": 1,
"return-type": "json",
// "exec": "bun run ~/config/scripts/bin/actWithMusic.ts waybar",
"exec": "~/config/scripts/bin/ocbwoy3-actwithmus waybar",
"on-scroll-up": "playerctl -p chromium,cmus,elisa,cider,spotify,OCbwoy3_s_iPhone volume 0.05+",
"on-scroll-down": "playerctl -p chromium,cmus,elisa,cider,spotify,OCbwoy3_s_iPhone volume 0.05-",
"on-click": "playerctl -p chromium,cmus,elisa,cider,spotify,OCbwoy3_s_iPhone play-pause",
"on-click-right": "playerctl -p chromium,cmus,elisa,cider,spotify,OCbwoy3_s_iPhone next",
"on-click-middle": "playerctl -p chromium,cmus,elisa,cider,spotify,OCbwoy3_s_iPhone previous"
},
"custom/regretevator_state": {
"restart-interval": 1,
"return-type": "json",
@@ -39,6 +51,7 @@
"hyprland/window": {
"format": "{}",
// "tooltip": "{initialClass}",
"rewrite": {
"(Support Hyprland|MainPicker|Hyprland Updated)": "Hyprland",
"DELTARUNE": "Deltarune",
@@ -81,7 +94,8 @@
"clock": {
"timezone": "Europe/Riga",
// "locale": "lv_LV.utf8",
"locale": "lv_LV.UTF-8",
// "locale": "ja_JP.UTF-8",
"format": "{:%H:%M}",
"tooltip-format": "<span color='#ffead3'><b>{:L%Y. gada %B}</b></span><tt><small>{calendar}</small></tt>",
"calendar": {
@@ -139,6 +153,7 @@
"format": "",
"format-disabled": "󰂲",
"format-off": "",
"tooltip-format": "Ierīces pieslēgas Bluetooth: {num_connections}",
"interval": 1,
"on-click": "blueman-manager",
"format-no-controller": ""

View File

@@ -1,5 +1,5 @@
* {
font-family: 'SF Pro Display', 'Symbols Nerd Font';
font-family: 'SF Pro Display', SFProJPDisplay-Regular, 'Symbols Nerd Font';
border: none;
font-size: 15px;
min-height: 10px;
@@ -15,28 +15,28 @@ window#waybar {
padding: 3px 5px 3px 5px;
}
#workspaces, #mpris, #traygroup, #clock, #window, #custom-regretevator_state {
#workspaces, #mpris, #traygroup, #clock, #window, #custom-regretevator_state, #custom-cider {
border-radius: 8px;
padding: 2px 5px 2px 5px;
border: 2px solid #89b4fa;
}
#clock {
font-family: "SF Pro Display";
font-family: "SF Pro Display", SFProJPDisplay-Regular, 'Symbols Nerd Font';
}
#traygroup, #mpris, #window, #workspaces, #custom-regretevator_state {
#traygroup, #mpris, #window, #workspaces, #custom-regretevator_state, #custom-cider {
background-color: #1e1e2e;
padding-left: 5px;
padding-right: 5px;
color: #b4befe;
}
#custom-regretevator_state {
font-family: 'DotfilesFont', 'Symbols Nerd Font', 'Geist';
#custom-regretevator_state, #custom-cider {
font-family: 'DotfilesFont', SFProJPDisplay-Regular, 'Symbols Nerd Font', 'Geist';
}
#mpris, #clock, #window {
#mpris, #clock, #window, #custom-cider {
padding-left: 10px;
padding-right: 10px;
}
@@ -114,6 +114,7 @@ window#waybar {
}
tooltip {
font-family: 'SF Pro Display', SFProJPDisplay-Regular, 'Symbols Nerd Font';
padding: 0px 0px 0px 0px;
margin: 0px 0px 0px 0px;
border-radius: 4px;
@@ -124,6 +125,7 @@ tooltip {
}
tooltip * {
font-family: 'SF Pro Display', SFProJPDisplay-Regular, 'Symbols Nerd Font';
padding: 0px 0px 0px 0px;
margin: 0px 0px 0px 0px;
color: #cdd6f4;

View File

@@ -1,5 +1,5 @@
[wofi]
prompt=Search
prompt=Meklēt...
allow_images=true
allow_markup=true
term=ghostty

2
scripts/bin/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
# compile it yourself
ocbwoy3-actwithmus

View File

@@ -0,0 +1,60 @@
import { $, sleep } from "bun";
import { albumStuffF, fetchAlbumStuff } from "../lib/CiderV2Playing"
import { execFile } from "child_process";
import { rmSync } from "fs";
let x: albumStuffF | any = false;
try {
x = await fetchAlbumStuff() as albumStuffF
} catch { }
function notifyWithImage(song: string, artUrl: string, artist: string, album: string) {
execFile("dunstify", [
"-t", (process.argv[3] === "rel" ? "1" : "2000"),
"-r", "67676767",
"-a", "ocbwoy3-whatsplaying",
"-I", artUrl,
song,
`${artist}<br/>`//${album !== "" ? `<small>${album}</small>` : ""}`
]);
}
console.log(process.argv[3])
function notifyBasic(song: string, artist: string, album: string) {
execFile("dunstify", [
"-t", (process.argv[3] === "rel" ? "1" : "2000"),
"-r", "67676767",
"-a", "ocbwoy3-whatsplaying",
song,
`${artist}`//<br/>${album !== "" ? `<small>${album}</small>` : ""}`
]);
}
if (process.argv[2] === "waybar") {
if (!x) {
process.stdout.write(JSON.stringify({
class: "hidden"
}))
process.exit(0);
}
const y = x as albumStuffF;
process.stdout.write(JSON.stringify({
// text: ` ${y.artist} — ${y.song}`.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;"),
text: `${y.artist}${y.song}`.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;"),
tooltip: `${y.album}`.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;")
}))
}
if (process.argv[2] === "notif") {
const y = x as albumStuffF;
if (!x || !y.artUrl) process.exit(1);
try {
console.log(y.song, y.artUrl, y.artist, y.album);
notifyWithImage(y.song, y.artUrl, y.artist, y.album);
} catch {
notifyBasic(y.song, y.artist, y.album);
try { rmSync(y.artUrl); } catch { }
}
}

View File

@@ -37,26 +37,21 @@ function chooseRandom(array: string[]): string {
return array[index];
}
const splashes = [
"Keep on ricing yo' Hyprland...",
"Contains infinite genders!",
"You are valid!",
"Blogsy is so AWESOME!",
"I love Blogsy!",
"Whats yer favorite type o wood?",
const splashes = [
"大好き<b>ラルセイ</b>",
"ハイパーランド"
];
const debug: boolean = false as false | true;
const debug: boolean = true as false | true;
const welcome = "ハイパーランド へようこそ!" // "Sveicināti Hyprland!"
if (debug === true) {
splashes.forEach(async (a) => {
execSync(`notify-send "Welcome to Hyprland!" "${a}"`);
execSync(`notify-send "${welcome}" "${a}"`);
});
} else {
const randomSplash = chooseRandom(splashes);
execSync(`notify-send "Welcome to Hyprland!" "${randomSplash}"`);
execSync(`notify-send "${welcome}" "${randomSplash}"`);
}

View File

@@ -31,7 +31,7 @@ try {
const url = await UploadToEZ(readFileSync(filePath));
execSync(`echo "${url}" | wl-copy -n`);
execSync(`notify-send "Screenshot" "Uploaded to e-z.host in ${Date.now() - start}ms"`);
execSync(`notify-send "Ekrānuzņēmums" "Attēls augšuplādēts e-z.host ${Date.now() - start}ms"`);
} catch (e_) {
execSync(`notify-send "Error" "${`${e_}`}"`);
}

View File

@@ -1,7 +1,7 @@
hyprctl notify 1 5000 0 " Loading OCbwoy3's Dotfiles"
# Dotfiles
notify-send "Welcome to Hyprland!" "some basic startup code"
notify-send "Sveicināti Hyprland!" "some basic startup code"
notify-send "Hyprland" "Enabled debugging overlay"
notify-send "OCbwoy3's Dotfiles" "Keyboard Layout: English"
notify-send "Screenshot" "Saved and copied to clipboard."

View File

@@ -1,15 +1,130 @@
export type CiderPlaying = {
status: "ok",
import assert from "assert";
import { $, MD5 } from "bun";
import { createWriteStream, existsSync, rmSync, writeFileSync } from "fs";
export type CiderNowPlaying = {
status: string;
info: {
albumName: string,
artistName: string,
name: string
albumName: string;
artistName: string;
artwork: {
bgColor: string;
hasP3: boolean;
height: number;
textColor1: string;
textColor2: string;
textColor3: string;
textColor4: string;
url: string;
width: number;
[key: string]: any; // allow any other properties
};
contentRating: string;
discNumber: number;
durationInMillis: number;
genreNames: string[];
hasLyrics: boolean;
name: string;
playParams: {
catalogId: string;
id: string;
isLibrary: boolean;
kind: string;
reporting: boolean;
reportingId: string;
[key: string]: any;
};
releaseDate: string;
trackNumber: number;
composerName: string;
isrc: string;
previews: any[]; // empty objects or unknown preview data
currentPlaybackTime: number;
remainingTime: number;
inFavorites: boolean;
inLibrary: boolean;
shuffleMode: number;
repeatMode: number;
[key: string]: any;
};
[key: string]: any;
};
// cachedAlbumArt = /tmp/.ocbwoy3-ciderv2lib-md5(isrc+albumName).jpg
export type albumStuffF = {
artist: string,
album: string,
song: string,
artUrl?: string
}
export const albumRewriteRegexes: { a: RegExp, b: string | false }[] = [
{
a: / \(Original( (Video )?Game)? Soundtrack.*\)$/i,
b: ""
},
{
a: / - Single$/i,
b: false
},
{
a: / Soundtrack$/i,
b: ""
},
{
a: /^(DELTARUNE|Deltarune) (chapter|chapters) /i,
b: "Deltarune $2 "
},
{
a: / - EP$/i,
b: ""
},
{
a: /^regretevator$/i,
b: false
},
]
export function doRewritesRn(t: string) {
let m = t;
for (const x of albumRewriteRegexes) {
if (x.a.test(m)) {
if (x.b === false) return "";
m = m.replace(x.a,x.b);
}
}
return m;
}
export async function fetchAlbumStuff(): Promise<albumStuffF> {
const d = await fetch("http://localhost:10767/api/v1/playback/now-playing?token=z");
// console.log(d.status, d.statusText, await d.text())
const { info }: CiderNowPlaying = await d.json();
const special = MD5.hash(info.isrc + info.albumName, "hex");
const path = `/tmp/.ocbwoy3-ciderv2lib-md5-${special}.jpg`
// console.log(existsSync(path), `hyprctl dispatch exec ${`wget -q --unlink -O ${path} ${info.artwork.url}`}`);
if (!existsSync(path)) {
writeFileSync(path, "");
try {
const ct = await fetch(info.artwork.url);
assert(ct.ok);
const data = Buffer.from(await ct.arrayBuffer());
writeFileSync(path, data);
// writeFileSync(path,await ct.body?.pipeTo)
} catch {
rmSync(path)
}
}
return {
artist: info.artistName,
album: doRewritesRn(info.albumName),
song: info.name,
artUrl: existsSync(path) ? path : undefined
}
}
const d = await fetch("http://localhost:10767/api/v1/playback/now-playing?token=z");
// console.log(d.status, d.statusText, await d.text())
const {info}: CiderPlaying = await d.json();
console.log(`${info.artistName} - ${info.name} [${info.albumName}]`);
console.log(info);
// await fetchAlbumStuff();

View File

@@ -2,7 +2,7 @@
GAMES=$(cat ~/config/scripts/lib/games.txt)
SELECTED=$(echo "$GAMES" | cut -d'%' -f1 | wofi --show dmenu -p "Play something...")
SELECTED=$(echo "$GAMES" | cut -d'%' -f1 | wofi --show dmenu -p "Meklēt spēli...")
if [ -n "$SELECTED" ]; then
PLACE_ID=$(echo "$GAMES" | grep "^$SELECTED" | sed 's/.*%%% //')

View File

@@ -2,7 +2,7 @@
GAMES=$(cat ~/config/scripts/lib/gamesRoblox.txt)
SELECTED=$(echo "$GAMES" | cut -d'%' -f1 | wofi --show dmenu -p "Play Roblox...")
SELECTED=$(echo "$GAMES" | cut -d'%' -f1 | wofi --show dmenu -p "Meklēt Roblox spēli...")
if [ -n "$SELECTED" ]; then
PLACE_ID=$(echo "$GAMES" | grep "^$SELECTED" | sed 's/.*%%% //')

View File

@@ -7,5 +7,5 @@ echo "$SS_PATH"
if [[ -n "$SS_PATH" && "$SS_PATH" == /home/ocbwoy3/Pictures/Screenshots/* ]]; then
wl-copy < "$SS_PATH"
notify-send "Screenshot" "Fullscreen copied to clipboard!"
notify-send -i "$SS_PATH" "Ekrānuzņēmums" "nokopēts starpliktuvē!"
fi

View File

@@ -7,5 +7,5 @@ echo "$SS_PATH"
if [[ -n "$SS_PATH" && "$SS_PATH" == /home/ocbwoy3/Pictures/Screenshots/* ]]; then
wl-copy < "$SS_PATH"
notify-send "Screenshot" "Selection copied to clipboard!"
notify-send -i "$SS_PATH" "Ekrānuzņēmums" "nokopēts starpliktuvē!"
fi

View File

@@ -3,4 +3,4 @@ KBLANG=$(hyprctl getoption input:kb_layout | awk 'NR==1{print $2}')
# hyprctl switchxkblayout semico--usb-gaming-keyboard- next
hyprctl switchxkblayout current next
notify-send -u low "Keyboard" "Language changed"
notify-send -u low "Tastatūra" "Valoda mainīta"

2
scripts/whatsplaying.sh Executable file
View File

@@ -0,0 +1,2 @@
# bun run ~/config/scripts/bin/actWithMusic.ts notif $@
exec ~/config/scripts/bin/ocbwoy3-actwithmus notif $@