diff --git a/config/dunst/dunstrc b/config/dunst/dunstrc
index f6c088c..8b60aae 100644
--- a/config/dunst/dunstrc
+++ b/config/dunst/dunstrc
@@ -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"
diff --git a/config/hypr/config/autoexec.conf b/config/hypr/config/autoexec.conf
index 6456318..2a454db 100644
--- a/config/hypr/config/autoexec.conf
+++ b/config/hypr/config/autoexec.conf
@@ -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\""
diff --git a/config/hypr/config/display.conf b/config/hypr/config/display.conf
index 31c5e21..0928956 100644
--- a/config/hypr/config/display.conf
+++ b/config/hypr/config/display.conf
@@ -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
diff --git a/config/hypr/config/keybindings/other.conf b/config/hypr/config/keybindings/other.conf
index 4b4b26f..082aa4e 100644
--- a/config/hypr/config/keybindings/other.conf
+++ b/config/hypr/config/keybindings/other.conf
@@ -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
diff --git a/config/hypr/config/permissions.conf b/config/hypr/config/permissions.conf
index 6afc629..2187be7 100644
--- a/config/hypr/config/permissions.conf
+++ b/config/hypr/config/permissions.conf
@@ -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
diff --git a/config/hypr/hyprlock.conf b/config/hypr/hyprlock.conf
index 1553a35..689370a 100644
--- a/config/hypr/hyprlock.conf
+++ b/config/hypr/hyprlock.conf
@@ -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 =
+ placeholder_text = Session locked, enter password to unlock!
hide_input = false
- fail_text = Password hint: Favorite Character (Deltarune, not Regretevator)
+ fail_text = Password hint: Favorite Character - Deltarune, not Regretevator!
position = 0, -470
halign = center
valign = center
diff --git a/config/waybar/config b/config/waybar/config
index c1874dc..90b18b0 100644
--- a/config/waybar/config
+++ b/config/waybar/config
@@ -14,7 +14,7 @@
],
"modules-right": [
// "custom/regretevator_state",
- "mpris",
+ "custom/cider",
"group/traygroup",
"clock"
]
diff --git a/config/waybar/modules.json b/config/waybar/modules.json
index db97259..cd860b2 100644
--- a/config/waybar/modules.json
+++ b/config/waybar/modules.json
@@ -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": "{:L%Y. gada %B}{calendar}",
"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": ""
diff --git a/config/waybar/style.css b/config/waybar/style.css
index 4535d05..8393cbc 100644
--- a/config/waybar/style.css
+++ b/config/waybar/style.css
@@ -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;
diff --git a/config/wofi/config b/config/wofi/config
index afa739b..ff2e2d6 100644
--- a/config/wofi/config
+++ b/config/wofi/config
@@ -1,5 +1,5 @@
[wofi]
-prompt=Search
+prompt=Meklēt...
allow_images=true
allow_markup=true
term=ghostty
diff --git a/scripts/bin/.gitignore b/scripts/bin/.gitignore
new file mode 100644
index 0000000..f5aad32
--- /dev/null
+++ b/scripts/bin/.gitignore
@@ -0,0 +1,2 @@
+# compile it yourself
+ocbwoy3-actwithmus
diff --git a/scripts/bin/actWithMusic.ts b/scripts/bin/actWithMusic.ts
new file mode 100644
index 0000000..ac43220
--- /dev/null
+++ b/scripts/bin/actWithMusic.ts
@@ -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}
`//${album !== "" ? `${album}` : ""}`
+ ]);
+}
+
+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}`//
${album !== "" ? `${album}` : ""}`
+ ]);
+}
+
+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("&", "&").replaceAll("<", "<").replaceAll(">", ">"),
+ text: ` ${y.artist} — ${y.song}`.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">"),
+ tooltip: `${y.album}`.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">")
+ }))
+}
+
+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 { }
+ }
+}
diff --git a/scripts/bin/betterSplash.ts b/scripts/bin/betterSplash.ts
index 264e9de..87b6332 100644
--- a/scripts/bin/betterSplash.ts
+++ b/scripts/bin/betterSplash.ts
@@ -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!",
- "What’s yer favorite type o’ wood?",
+const splashes = [
+ "大好きラルセイ",
+ "ハイパーランド"
];
-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}"`);
}
diff --git a/scripts/bin/r2Upload.ts b/scripts/bin/r2Upload.ts
index a41895e..9953e3f 100644
--- a/scripts/bin/r2Upload.ts
+++ b/scripts/bin/r2Upload.ts
@@ -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_}`}"`);
}
diff --git a/scripts/dev/notif-test.sh b/scripts/dev/notif-test.sh
index 0aa7e87..be4cc7f 100755
--- a/scripts/dev/notif-test.sh
+++ b/scripts/dev/notif-test.sh
@@ -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."
diff --git a/scripts/lib/CiderV2Playing.ts b/scripts/lib/CiderV2Playing.ts
index 6da74df..d4c9b8d 100644
--- a/scripts/lib/CiderV2Playing.ts
+++ b/scripts/lib/CiderV2Playing.ts
@@ -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 {
+ 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();
diff --git a/scripts/open-game.sh b/scripts/open-game.sh
index 96bd2ac..ab464c0 100755
--- a/scripts/open-game.sh
+++ b/scripts/open-game.sh
@@ -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/.*%%% //')
diff --git a/scripts/open-roblox-game.sh b/scripts/open-roblox-game.sh
index 7f4dda2..1f11d44 100755
--- a/scripts/open-roblox-game.sh
+++ b/scripts/open-roblox-game.sh
@@ -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/.*%%% //')
diff --git a/scripts/screenshot-fullscreen.sh b/scripts/screenshot-fullscreen.sh
index d117283..0893a84 100755
--- a/scripts/screenshot-fullscreen.sh
+++ b/scripts/screenshot-fullscreen.sh
@@ -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
diff --git a/scripts/screenshot-selection.sh b/scripts/screenshot-selection.sh
index a578207..103e675 100755
--- a/scripts/screenshot-selection.sh
+++ b/scripts/screenshot-selection.sh
@@ -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
diff --git a/scripts/toggle-language.sh b/scripts/toggle-language.sh
index 78985ef..579b57f 100755
--- a/scripts/toggle-language.sh
+++ b/scripts/toggle-language.sh
@@ -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"
diff --git a/scripts/whatsplaying.sh b/scripts/whatsplaying.sh
new file mode 100755
index 0000000..ac50f59
--- /dev/null
+++ b/scripts/whatsplaying.sh
@@ -0,0 +1,2 @@
+# bun run ~/config/scripts/bin/actWithMusic.ts notif $@
+exec ~/config/scripts/bin/ocbwoy3-actwithmus notif $@