From 6fafc566ae7ad1b04e5ee57629d568bf7831d0f6 Mon Sep 17 00:00:00 2001 From: OCbwoy3 Date: Wed, 12 Mar 2025 21:25:53 +0200 Subject: [PATCH] majorly enhance my stuff --- .gitignore | 1 + bun.lockb | Bin 0 -> 16016 bytes config/gtk-3.0/settings.ini | 2 +- config/hypr/config/keybindings/other.conf | 19 ++---- config/hypr/config/variables.conf | 6 +- config/qt5ct/qt5ct.conf | 8 +-- hosts/default/configuration.nix | 1 - package.json | 18 +++++ scripts/bin/handleScreenshot.ts | 79 ++++++++++++++++++++++ scripts/dev/notif-test.sh | 14 ++++ scripts/roblox-fullscreen.sh | 23 +++++++ scripts/screenshot-fullscreen.sh | 11 +++ scripts/screenshot-selection.sh | 11 +++ scripts/toggle-language.sh | 17 +++++ tsconfig.json | 27 ++++++++ 15 files changed, 216 insertions(+), 21 deletions(-) create mode 100755 bun.lockb create mode 100644 package.json create mode 100644 scripts/bin/handleScreenshot.ts create mode 100644 scripts/dev/notif-test.sh create mode 100644 scripts/roblox-fullscreen.sh create mode 100644 scripts/screenshot-fullscreen.sh create mode 100755 scripts/screenshot-selection.sh create mode 100644 scripts/toggle-language.sh create mode 100644 tsconfig.json diff --git a/.gitignore b/.gitignore index b4f0da4..22996b1 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ # hardware-configuration.nix +node_modules \ No newline at end of file diff --git a/bun.lockb b/bun.lockb new file mode 100755 index 0000000000000000000000000000000000000000..096a3774a3f052f09cb49c7518bffd891adec861 GIT binary patch literal 16016 zcmY#Z)GsYA(of3F(@)JSQ%EY!<4P*c)6L0G&Q8nBN!3luFUn0U(JeFJVq#!mc)9gR z-?h%tlcCHmoS7S)emY#6SZ(BIUc2U5QrhIuMS2W&3}B!ECK(tw(C7vjAEp4z7i3^) zD9%VMDqvt>aA9I#P-0+cP+?+VP+(waU}a)pkY`|Mc+SYcAjiPaa1u(dVPs&CWngHS zz{tQL!@$r`0;QuE85pD(7#f@y85krO7#g%085qPF7#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@FKDts<(17A#zZM zV3&j&isnd&R){RR&(I9U>t3*r@K_C&2b+K=Z6Jjz%xKYVCl=*`jW#7EQRbCaU`_KV;z)%jv56g~A2lS9L`gOi8aLpm zhlc>NAju{|Vgx-IgGzm{7@6jwIuK$9Sd3)z5ETa8zX&0cO@js%a)cm+NHz`P5M;yP zA|#sy2_s~);38z2g_=n~F$&5Yh$aAWsTk5EK!iQGg@EKDht%A>#DYxyqSCyQ%-mFb zhN7y}*M;fPHPi$3KTFc9@aP7&t@U;F!L+WCo`s$vfh>;H#L?H)N8;%k=^5x5gLH$M zc+h5JRxuvSA!_nAQdNmO)lRxW(YcDTJMzpI4SzRD#EP z6m@VTq58nS0fz-dSzaRESU@O(8wAp!3+`Hg97xa|5Vym1L%6zzdX|tNDbCC-$Vt^L zF3+s0%E6Z&P!)m#7e%M8fu50`5y(ZE#kz?_MTwP}#Tj@UhonkhS09N7N~{or@aTrO zrNRD!Hnw#k<02q8;L(cQBnSBdv>g{@Cn%NSPt#DH*zJal;}BFFyred?KmR*VP9p)-^KH0|lW0$U&ufDVfQc zx?nr-xCvRAzOFtpR~OPL1Q~|M0H`y{i}iK&%ZqivolkHR6_nXweKReset with hyprctl reload." && hyprctl keyword debug:overlay 1 +bind = $mainMod SHIFT, M, exec, bun run $HOME/config/scripts/bin/r2UploadScreenshot.ts +bind = $mainMod, F1, exec, bash $HOME/config/scripts/roblox-fullscreen.sh +bind = $mainMod, F2, exec, bash -c "xdg-open roblox://" +bind = $mainMod, F5, exec, notify-send -u critical "Hyprland" "Enabled debug overlay" && hyprctl keyword debug:overlay 1 # bind = $mainMod SHIFT, F3, exec, bash -c "NIXPKGS_ALLOW_UNFREE=1 nix-shell -p osu-lazer-bin --command osu\!" bind = $mainMod SHIFT, F, fullscreen, 1 -bind = $mainMod, SPACE, exec, bash $HOME/dotfiles/scripts/toggle_language.sh +bind = $mainMod, SPACE, exec, bash $HOME/config/scripts/toggle-language.sh # VM Passtrough bind = $mainMod, Insert, submap, passthru diff --git a/config/hypr/config/variables.conf b/config/hypr/config/variables.conf index 472bee7..7048674 100644 --- a/config/hypr/config/variables.conf +++ b/config/hypr/config/variables.conf @@ -16,11 +16,11 @@ env = GTK_THEME,catppuccin-mocha-blue-standard+default # Cursor -exec = hyprctl setcursor HyprCatppuccinMochaMauve 24 +exec = hyprctl setcursor catppuccin-mocha-blue-cursors 24 -env = HYPRCURSOR_THEME,HyprCatppuccinMochaMauve +env = HYPRCURSOR_THEME,catppuccin-mocha-blue-cursors env = HYPRCURSOR_SIZE,24 -env = XCURSOR_THEME,HyprCatppuccinMochaMauve +env = XCURSOR_THEME,catppuccin-mocha-blue-cursors env = XCURSOR_SIZE,24 # Toolkit Env diff --git a/config/qt5ct/qt5ct.conf b/config/qt5ct/qt5ct.conf index 6e32365..555505b 100644 --- a/config/qt5ct/qt5ct.conf +++ b/config/qt5ct/qt5ct.conf @@ -6,7 +6,7 @@ standard_dialogs=xdgdesktopportal style=Lightly [Fonts] -fixed="Sans Serif,9,-1,5,50,0,0,0,0,0" +fixed="Geist Mono,9,-1,5,50,0,0,0,0,0" general="Sans Serif,9,-1,5,50,0,0,0,0,0" [Interface] @@ -15,8 +15,8 @@ buttonbox_layout=0 cursor_flash_time=1000 dialog_buttons_have_icons=1 double_click_interval=400 -gui_effects=@Invalid() -keyboard_scheme=2 +gui_effects=General, AnimateMenu, AnimateCombo, AnimateTooltip, AnimateToolBox +keyboard_scheme=1 menus_have_icons=true show_shortcuts_in_context_menus=true stylesheets=@Invalid() @@ -25,7 +25,7 @@ underline_shortcut=1 wheel_scroll_lines=3 [SettingsWindow] -geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\0\0\0\x3\xa2\0\0\x3\xf0\0\0\0\0\0\0\0\0\0\0\a\x7f\0\0\x4\x37\0\0\0\0\x2\0\0\0\a\x80\0\0\0\0\0\0\0\0\0\0\x3\xa2\0\0\x3\xf0) +geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\0\0\0\x3\xa5\0\0\x2\xfb\0\0\0\0\0\0\0\0\0\0\x2\xde\0\0\x2\xfb\0\0\0\0\x2\0\0\0\a\x80\0\0\0\0\0\0\0\0\0\0\x3\xa5\0\0\x2\xfb) [Troubleshooting] force_raster_widgets=1 diff --git a/hosts/default/configuration.nix b/hosts/default/configuration.nix index e5c6a30..8218034 100644 --- a/hosts/default/configuration.nix +++ b/hosts/default/configuration.nix @@ -251,7 +251,6 @@ { id = "aflpfginfpjhanhkmdpohpggpolfopmb"; } # SkyLink { id = "agjnjboanicjcpenljmaaigopkgdnihi"; } # PreMiD { id = "ijcpiojgefnkmcadacmacogglhjdjphj"; } # Shinigami Eyes - { id = "bmoehnfdgafmljnmbidgjhgfaegkfddk"; } # Bluesky for Everyone { id = "hbkpclpemjeibhioopcebchdmohaieln"; } # BTRoblox { id = "lnjaiaapbakfhlbjenjkhffcdpoompki"; } # Catppuccin gh file explorer icons { id = "ejcfepkfckglbgocfkanmcdngdijcgld"; } # ChatGPT diff --git a/package.json b/package.json new file mode 100644 index 0000000..338b408 --- /dev/null +++ b/package.json @@ -0,0 +1,18 @@ +{ + "name": "ocbwoy3s-dotfiles", + "module": "index.ts", + "type": "module", + "private": true, + "devDependencies": { + "@types/bun": "latest" + }, + "peerDependencies": { + "typescript": "^5" + }, + "dependencies": { + "@types/commander": "^2.12.5", + "@types/sharp": "^0.32.0", + "commander": "^13.1.0", + "sharp": "^0.33.5" + } +} \ No newline at end of file diff --git a/scripts/bin/handleScreenshot.ts b/scripts/bin/handleScreenshot.ts new file mode 100644 index 0000000..f474c80 --- /dev/null +++ b/scripts/bin/handleScreenshot.ts @@ -0,0 +1,79 @@ +import { $ } from "bun"; +import { Command } from "commander"; +import sharp from "sharp"; +import { writeFileSync } from "fs"; + +const program = new Command("handle-screenshot"); + +const SCREENSHOT_PATH = `/home/ocbwoy3/Pictures/Screenshots`; + +async function transformImage(b: Buffer): Promise { + const image = sharp(b).ensureAlpha(); + + const { width, height } = await image.metadata(); + + // console.log(width, height); + + const mask = Buffer.from( + ` + + ` + ); + + const maskedImage = image.composite([ + { + input: mask, + gravity: "center", + blend: "dest-in" + }, + ]).extend({ + top: 16, + bottom: 16, + left: 16, + right: 16 + }).ensureAlpha(); + + return await maskedImage.png().toBuffer(); +} + +(() => { + + program.command("selection").description("Takes a screenshot from selection").action(async () => { + const selection = await $`slurp -w 0 -d -b "#cdd6f444"`.nothrow().quiet(); + if (selection.exitCode !== 0 || selection.stdout.toString().includes("cancel")) { + console.log("/tmp/woah"); + process.exit(0); + }; + const _BUF = await $`grim -t png -l 0 -g ${selection.stdout.toString().trim()} -`.arrayBuffer(); + const BUF = Buffer.from(_BUF); + + const _d = new Date(); + const FILENAME = `${SCREENSHOT_PATH}/${_d.toISOString()}-${_d.getTime()}.png` + + const cb = await transformImage(BUF); + writeFileSync(FILENAME,cb); + console.log(FILENAME); + }); + +})(); + +(() => { + + program.command("fullscreen").description("Takes a fullsceen screenshot").action(async () => { + const selection = await $`hyprctl monitors | awk '/Monitor/{monitor=$2} /focused: yes/{print monitor; exit}'`.nothrow().text(); + + const _BUF = await $`grim -t png -l 0 -o ${selection.trim()} -`.arrayBuffer(); + const BUF = Buffer.from(_BUF); + + const _d = new Date(); + const FILENAME = `${SCREENSHOT_PATH}/${_d.toISOString()}-${_d.getTime()}.png` + + console.log(FILENAME) + const cb = await transformImage(BUF); + writeFileSync(FILENAME,cb); + }); + +})(); + + +program.parse(process.argv); diff --git a/scripts/dev/notif-test.sh b/scripts/dev/notif-test.sh new file mode 100644 index 0000000..d70a779 --- /dev/null +++ b/scripts/dev/notif-test.sh @@ -0,0 +1,14 @@ +hyprctl notify 1 5000 0 " Loading OCbwoy3's Dotfiles" + +# Dotfiles +notify-send "Welcome to 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." + +notify-send "Regretevator" "Do I see Regretevator?" +notify-send "Regretevator" "Floor 729" +notify-send "Regretevator" "Floor 729 - 49/50" + +notify-send -i /tmp/.tuxstrap.png "Roblox" "Regretevator [ELEVATOR SIMULATOR]\n(UDMUX Protected)" +notify-send -i /tmp/pest.png -a "regretevator-npc-chat" "Pest" "いいえ! これは許されません! パンタロンのコンパートメント を空にしましょう。" \ No newline at end of file diff --git a/scripts/roblox-fullscreen.sh b/scripts/roblox-fullscreen.sh new file mode 100644 index 0000000..8d6819c --- /dev/null +++ b/scripts/roblox-fullscreen.sh @@ -0,0 +1,23 @@ +# run roblox in fullscreen with mouse sensitivity of the os default and not some value set by roblox + +#!/usr/bin/env sh +HYPRGAMEMODE=$(hyprctl getoption animations:enabled | awk 'NR==1{print $2}') +if [ "$HYPRGAMEMODE" = 1 ] ; then + hyprctl --batch "\ + keyword animations:enabled 0;\ + keyword decoration:drop_shadow 0;\ + keyword decoration:blur:enabled 0;\ + keyword general:gaps_in 0;\ + keyword general:gaps_out 0;\ + keyword general:border_size 0;\ + keyword decoration:rounding 0;\ + keyword decoration:active_opacity 1;\ + keyword decoration:inactive_opacity 1;\ + keyword decoration:fullscreen_opacity 1;" + notify-send -t 5000 -u critical "OCbwoy3's Dotfiles" "Enabled game mode" + pkill -9 waybar + exit +fi +bash ~/config/scripts/hot-reload.sh +# hyprctl reload +notify-send -t 5000 -u critical "OCbwoy3's Dotfiles" "Disabled game mode" \ No newline at end of file diff --git a/scripts/screenshot-fullscreen.sh b/scripts/screenshot-fullscreen.sh new file mode 100644 index 0000000..36558b5 --- /dev/null +++ b/scripts/screenshot-fullscreen.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +# do NOT use $PATH for this!! +SS_PATH=$(timeout 30s bun run ~/config/scripts/bin/handleScreenshot.ts fullscreen) + +echo "$SS_PATH" + +if [[ -n "$SS_PATH" && "$SS_PATH" == /home/ocbwoy3/Pictures/Screenshots/* ]]; then + wl-copy < "$SS_PATH" + notify-send "Screenshot" "Successfully captured screenshot to clipboard" +fi diff --git a/scripts/screenshot-selection.sh b/scripts/screenshot-selection.sh new file mode 100755 index 0000000..a3563dc --- /dev/null +++ b/scripts/screenshot-selection.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +# do NOT use $PATH for this!! +SS_PATH=$(timeout 30s bun run ~/config/scripts/bin/handleScreenshot.ts selection) + +echo "$SS_PATH" + +if [[ -n "$SS_PATH" && "$SS_PATH" == /home/ocbwoy3/Pictures/Screenshots/* ]]; then + wl-copy < "$SS_PATH" + notify-send "Screenshot" "Successfully captured screenshot to clipboard" +fi diff --git a/scripts/toggle-language.sh b/scripts/toggle-language.sh new file mode 100644 index 0000000..b2f4a4a --- /dev/null +++ b/scripts/toggle-language.sh @@ -0,0 +1,17 @@ +KBLANG=$(hyprctl getoption input:kb_layout | awk 'NR==1{print $2}') +if [ "$KBLANG" = "us" ] ; then + hyprctl --batch "\ + keyword input:kb_layout lv;\ + keyword input:kb_variant apostrophe;" + # keyword input:kb_options compose:apostrophe;" + notify-send -u low "OCbwoy3's Dotfiles" "Keyboard Layout: Latvian" + exit +elif [ "$KBLANG" = "lv" ] ; then + # hyprctl --batch "\ + # keyword input:kb_layout us;\ + # keyword input:kb_variant;" + # i have no fucking idea how to unset input:kb_variant with hyprctl + hyprctl reload + notify-send -u low "OCbwoy3's Dotfiles" "Keyboard Layout: English" + exit +fi \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..f922565 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + // Enable latest features + "lib": ["ESNext", "DOM"], + "target": "ESNext", + "module": "ESNext", + "moduleDetection": "force", + "jsx": "react-jsx", + "allowJs": true, + + // Bundler mode + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "verbatimModuleSyntax": false, + "noEmit": true, + + // Best practices + "strict": true, + "skipLibCheck": true, + "noFallthroughCasesInSwitch": true, + + // Some stricter flags (disabled by default) + "noUnusedLocals": false, + "noUnusedParameters": false, + "noPropertyAccessFromIndexSignature": false + } +}