diff --git a/asset/fonts/nonnix/8bitOperatorPlus-Bold.ttf b/asset/fonts/nonnix/8bitOperatorPlus-Bold.ttf new file mode 100644 index 0000000..b03d8e4 Binary files /dev/null and b/asset/fonts/nonnix/8bitOperatorPlus-Bold.ttf differ diff --git a/asset/fonts/nonnix/8bitOperatorPlus-Regular.ttf b/asset/fonts/nonnix/8bitOperatorPlus-Regular.ttf new file mode 100644 index 0000000..0291529 Binary files /dev/null and b/asset/fonts/nonnix/8bitOperatorPlus-Regular.ttf differ diff --git a/asset/fonts/nonnix/8bitOperatorPlus8-Bold.ttf b/asset/fonts/nonnix/8bitOperatorPlus8-Bold.ttf new file mode 100644 index 0000000..c37bc4f Binary files /dev/null and b/asset/fonts/nonnix/8bitOperatorPlus8-Bold.ttf differ diff --git a/asset/fonts/nonnix/8bitOperatorPlus8-Regular.ttf b/asset/fonts/nonnix/8bitOperatorPlus8-Regular.ttf new file mode 100644 index 0000000..29cb839 Binary files /dev/null and b/asset/fonts/nonnix/8bitOperatorPlus8-Regular.ttf differ diff --git a/asset/fonts/nonnix/8bitOperatorPlusSC-Bold.ttf b/asset/fonts/nonnix/8bitOperatorPlusSC-Bold.ttf new file mode 100644 index 0000000..510e2c9 Binary files /dev/null and b/asset/fonts/nonnix/8bitOperatorPlusSC-Bold.ttf differ diff --git a/asset/fonts/nonnix/8bitOperatorPlusSC-Regular.ttf b/asset/fonts/nonnix/8bitOperatorPlusSC-Regular.ttf new file mode 100644 index 0000000..93a36aa Binary files /dev/null and b/asset/fonts/nonnix/8bitOperatorPlusSC-Regular.ttf differ diff --git a/asset/fonts/nonnix/8bitoperator_jve-readme.txt b/asset/fonts/nonnix/8bitoperator_jve-readme.txt new file mode 100644 index 0000000..895db94 --- /dev/null +++ b/asset/fonts/nonnix/8bitoperator_jve-readme.txt @@ -0,0 +1,40 @@ +Congratulations, you have successfully downloaded font file! + +This font is provided to you by Fonts2u.com – the largest online +repository of free fonts for Windows and Mac. + + + +How to install this font on your computer? + +For Windows 7 / Vista users: + +- Right-click the font file(s) and choose "Install". + +For users of the previous Windows versions: + +- Copy the included file(s) into a default Windows font folder + (usually C:\WINDOWS\FONTS or C:\WINNT\FONTS) + +For Mac users: + +Mac OS X 10.3 or above (including the FontBook) + +- Double-click the font file and hit "Install font" button at + the bottom of the preview. + +Mac OS X + +- Either copy the font file(s) to /Library/Fonts (for all users), + or to /Users/Your_username/Library/Fonts (for you only). + +Mac OS 9 or earlier + +- You have to convert the font file(s) you have downloaded. + Drag the font suitcases into the System folder. The system + will propose you to add them to the Fonts folder. + +For Linux users: + +- Copy the font file(s) to /USR/SHARE/FONTS + diff --git a/asset/fonts/nonnix/8bitoperator_jve.ttf b/asset/fonts/nonnix/8bitoperator_jve.ttf new file mode 100644 index 0000000..111b7de Binary files /dev/null and b/asset/fonts/nonnix/8bitoperator_jve.ttf differ diff --git a/asset/fonts/nonnix/SIL Open Font License.txt b/asset/fonts/nonnix/SIL Open Font License.txt new file mode 100644 index 0000000..3a2564e --- /dev/null +++ b/asset/fonts/nonnix/SIL Open Font License.txt @@ -0,0 +1,43 @@ +Copyright (c) 2009 - 2014 Grand Chaos Productions (http://grandchaos9000.deviantart.com), with Reserved Font Name 8-bit Operator+. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others. + +The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the copyright statement(s). + +"Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. + +"Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. + +5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/asset/fonts/nonnix/determination-mono-license.txt b/asset/fonts/nonnix/determination-mono-license.txt new file mode 100644 index 0000000..5878e19 --- /dev/null +++ b/asset/fonts/nonnix/determination-mono-license.txt @@ -0,0 +1,12 @@ +The FontStruction “Determination Mono” +(https://fontstruct.com/fontstructions/show/1349263) by MVBit is licensed under +a Creative Commons Attribution Share Alike license +(http://creativecommons.org/licenses/by-sa/3.0/). +“Determination Mono” was originally cloned (copied) from the FontStruction +“Determination” (https://fontstruct.com/fontstructions/show/1327343) by +MVBit , which is licensed under a Creative Commons Attribution Share Alike +license (http://creativecommons.org/licenses/by-sa/3.0/). +“Determination” was in turn cloned (copied) from the FontStruction +“Determination” (https://fontstruct.com/fontstructions/show/1212496) by Ryan +B, which is licensed under a Creative Commons Attribution Share Alike license +(http://creativecommons.org/licenses/by-sa/3.0/). \ No newline at end of file diff --git a/asset/fonts/nonnix/determination-mono-readme.txt b/asset/fonts/nonnix/determination-mono-readme.txt new file mode 100644 index 0000000..1e41c5a --- /dev/null +++ b/asset/fonts/nonnix/determination-mono-readme.txt @@ -0,0 +1,26 @@ +The font file in this archive was created using Fontstruct the free, online +font-building tool. +This font was created by MVBit *. +This font has a homepage where this archive and other versions may be found: +https://fontstruct.com/fontstructions/show/1349263 + +*NOTE: “Determination Mono” was originally cloned (copied) from the +FontStruction “Determination” +(https://fontstruct.com/fontstructions/show/1327343) by MVBit , which is +licensed under a Creative Commons Attribution Share Alike license +(http://creativecommons.org/licenses/by-sa/3.0/). +“Determination” was in turn cloned (copied) from the FontStruction +“Determination” (https://fontstruct.com/fontstructions/show/1212496) by Ryan +B, which is licensed under a Creative Commons Attribution Share Alike license +(http://creativecommons.org/licenses/by-sa/3.0/). + +Try Fontstruct at https://fontstruct.com +It’s easy and it’s fun. + +Fontstruct is copyright ©2016-2025 Rob Meek + +LEGAL NOTICE: +In using this font you must comply with the licensing terms described in the +file “license.txt” included with this archive. +If you redistribute the font file in this archive, it must be accompanied by all +the other files from this archive, including this one. diff --git a/asset/fonts/nonnix/determination-mono.ttf b/asset/fonts/nonnix/determination-mono.ttf new file mode 100644 index 0000000..d076e5a Binary files /dev/null and b/asset/fonts/nonnix/determination-mono.ttf differ diff --git a/config/hypr/config/display.conf b/config/hypr/config/display.conf index 979d230..50aad41 100644 --- a/config/hypr/config/display.conf +++ b/config/hypr/config/display.conf @@ -177,15 +177,6 @@ misc { # LAYER RULES ############################################# -layerrule { - name = waybar - match:namespace = waybar - animation = slide top - above_lock = 2 - order = -20 - no_screen_share = off -} - layerrule { name = notifications match:namespace = notifications @@ -225,7 +216,7 @@ windowrule { windowrule = match:class steam_proton|org\.vinegarhq\.Sober, allows_input on -env = QT_QPA_PLATFORMTHEME,qt6ct +env = QT_QPA_PLATFORMTHEME,qtct env = QT_STYLE_OVERRIDE,Darkly env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1 diff --git a/config/hypr/config/keybindings/other.conf b/config/hypr/config/keybindings/other.conf index e26f529..233346a 100644 --- a/config/hypr/config/keybindings/other.conf +++ b/config/hypr/config/keybindings/other.conf @@ -12,8 +12,9 @@ bind = $mainMod SHIFT, B, exec, bash /etc/nixos/scripts/hot-reload.sh bind = $mainMod SHIFT, RETURN, exec, bash /etc/nixos/scripts/select-wallpaper.sh # Screenshot keybinds -bindu = $mainMod SHIFT, PRINT, exec, bash /etc/nixos/scripts/screenshot-fullscreen.sh -bind = $mainMod CTRL SHIFT, PRINT, exec, bash /etc/nixos/scripts/edit-last-screenshot.sh +bindu = , PRINT, exec, bash -lc 'QT_QPA_PLATFORM=wayland flameshot gui' +bindu = $mainMod SHIFT, PRINT, exec, bash -lc 'QT_QPA_PLATFORM=wayland flameshot full --path ~/Pictures/Screenshots' +bind = $mainMod CTRL SHIFT, PRINT, exec, bash -lc 'QT_QPA_PLATFORM=wayland flameshot launcher' # Music Get Keybind diff --git a/config/hypr/hyprland.conf b/config/hypr/hyprland.conf index b29a4f9..9c0037a 100644 --- a/config/hypr/hyprland.conf +++ b/config/hypr/hyprland.conf @@ -1,10 +1,3 @@ -exec-once = /nix/store/5gln2rkcjx93cr5x0rr3wqrxjdmshd2f-dbus-1.16.2/bin/dbus-update-activation-environment --systemd DISPLAY HYPRLAND_INSTANCE_SIGNATURE WAYLAND_DISPLAY XDG_CURRENT_DESKTOP XDG_SESSION_TYPE && systemctl --user stop hyprland-session.target && systemctl --user start hyprland-session.target -source=/nix/store/mjbgcv2gizslspivcnr7bpqi7igrs75z-catppuccin-hyprland-0-unstable-2024-06-19/mocha.conf -source=/nix/store/24vli1vbac3n0lrf5bz3dh4m57zg9dls-hyprland-blue-accent.conf -# https://wiki.hyprland.org/Configuring/Configuring-Hyprland/ - -exec-once = hyprctl notify 1 5000 0 " Hyprland!!" - exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP exec-once = dbus-update-activation-environment DISPLAY WAYLAND_DISPLAY diff --git a/hosts/default/configuration.nix b/hosts/default/configuration.nix index 3516a2d..09d9c14 100644 --- a/hosts/default/configuration.nix +++ b/hosts/default/configuration.nix @@ -216,6 +216,53 @@ in { enable = true; platformTheme.name = "qtct"; style.name = "Darkly"; + qt5ctSettings = { + Appearance = { + color_scheme_path = "${pkgs.catppuccin-qt5ct}/share/qt5ct/colors/catppuccin-mocha-blue.conf"; + custom_palette = true; + icon_theme = "Arashi"; + standard_dialogs = "default"; + style = "Darkly"; + }; + }; + qt6ctSettings = { + Appearance = { + color_scheme_path = "${pkgs.catppuccin-qt5ct}/share/qt6ct/colors/catppuccin-mocha-blue.conf"; + custom_palette = true; + icon_theme = "Arashi"; + standard_dialogs = "default"; + style = "Darkly"; + }; + }; + }; + + xdg.mimeApps = { + enable = true; + defaultApplications = { + "default-web-browser" = [ "zen-beta.desktop" ]; + "text/html" = [ "zen-beta.desktop" ]; + "x-scheme-handler/http" = [ "zen-beta.desktop" ]; + "x-scheme-handler/https" = [ "zen-beta.desktop" ]; + + "inode/directory" = [ "org.kde.dolphin.desktop" ]; + + "image/png" = [ "org.kde.gwenview.desktop" ]; + "image/jpeg" = [ "org.kde.gwenview.desktop" ]; + "image/gif" = [ "org.kde.gwenview.desktop" ]; + "image/webp" = [ "org.kde.gwenview.desktop" ]; + "image/svg+xml" = [ "org.kde.gwenview.desktop" ]; + "image/avif" = [ "org.kde.gwenview.desktop" ]; + + "video/mp4" = [ "mpv.desktop" ]; + "video/webm" = [ "mpv.desktop" ]; + "video/x-matroska" = [ "mpv.desktop" ]; + "audio/flac" = [ "mpv.desktop" ]; + "audio/mpeg" = [ "mpv.desktop" ]; + "audio/ogg" = [ "mpv.desktop" ]; + "audio/wav" = [ "mpv.desktop" ]; + + "application/pdf" = [ "org.kde.gwenview.desktop" ]; + }; }; programs.zen-browser = { @@ -227,6 +274,20 @@ in { }; }; + services.flameshot = { + enable = true; + settings = { + General = { + disabledTrayIcon = true; + showStartupLaunchMessage = false; + savePath = "/home/kris/Pictures/Screenshots"; + savePathFixed = true; + useGrimAdapter = true; + disabledGrimWarning = true; + }; + }; + }; + wayland.windowManager.hyprland = { enable = true; package = null; @@ -257,24 +318,6 @@ in { source = ../../config/hypr/xdph.conf; }; - home.file.".config/qt5ct/qt5ct.conf".text = '' - [Appearance] - color_scheme_path=${pkgs.catppuccin-qt5ct}/share/qt5ct/colors/catppuccin-mocha-blue.conf - custom_palette=true - icon_theme=Arashi - standard_dialogs=default - style=Darkly - ''; - - home.file.".config/qt6ct/qt6ct.conf".text = '' - [Appearance] - color_scheme_path=${pkgs.catppuccin-qt5ct}/share/qt6ct/colors/catppuccin-mocha-blue.conf - custom_palette=true - icon_theme=Arashi - standard_dialogs=default - style=Darkly - ''; - home.file.".local/share/fonts/DotfilesFont.otf" = { source = ../../config/dotfile_deps/DotfilesFont.otf; }; diff --git a/hosts/default/other/activate.nix b/hosts/default/other/activate.nix index 221d0a0..85be14d 100644 --- a/hosts/default/other/activate.nix +++ b/hosts/default/other/activate.nix @@ -3,9 +3,9 @@ { environment.systemPackages = [ - (pkgs.callPackage ./../packages/ocbwoy3-icons/default.nix {}) + (pkgs.callPackage ./../packages/kris-icons/default.nix {}) (pkgs.callPackage ./../packages/arashi-icons.nix {}) - (pkgs.callPackage ./../packages/ralsei-cursors/default.nix {}) # ralsei cursors ported to linux + (pkgs.callPackage ./../packages/ralsei-cursors/default.nix {}) ]; system.nixos = { diff --git a/hosts/default/packages.nix b/hosts/default/packages.nix index e909431..1b7d6ab 100644 --- a/hosts/default/packages.nix +++ b/hosts/default/packages.nix @@ -11,6 +11,7 @@ nerd-fonts.monaspace nerd-fonts.symbols-only minecraftia + (callPackage ./packages/nonnix-fonts.nix { }) ]; environment.sessionVariables.LD_LIBRARY_PATH = "${pkgs.gcc15}/lib"; @@ -67,6 +68,7 @@ libimobiledevice direnv kdePackages.dolphin + kdePackages.gwenview kdePackages.kleopatra kdePackages.kservice qpwgraph @@ -89,8 +91,7 @@ deno hyprpaper swww - swappy - slurp + flameshot grim wayland-utils wl-clipboard diff --git a/hosts/default/packages/ocbwoy3-icons/default.nix b/hosts/default/packages/kris-icons/default.nix similarity index 89% rename from hosts/default/packages/ocbwoy3-icons/default.nix rename to hosts/default/packages/kris-icons/default.nix index 8c6a7f6..ae3a9b4 100644 --- a/hosts/default/packages/ocbwoy3-icons/default.nix +++ b/hosts/default/packages/kris-icons/default.nix @@ -1,7 +1,7 @@ { lib, stdenv }: stdenv.mkDerivation rec { - pname = "ocbwoy3-nixos-icons"; + pname = "kris-nixos-icons"; version = "1.0.0"; src = ./.; @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { ''; meta = with lib; { - description = "OCbwoy3's Custom Icons for NixOS"; + description = "Kris's Custom Icons for NixOS"; homepage = "https://tangled.sh/@kris.darkworld.download/nix?ref=main"; license = licenses.mit; maintainers = with maintainers; [ ]; diff --git a/hosts/default/packages/ocbwoy3-icons/games/cs2.png b/hosts/default/packages/kris-icons/games/cs2.png similarity index 100% rename from hosts/default/packages/ocbwoy3-icons/games/cs2.png rename to hosts/default/packages/kris-icons/games/cs2.png diff --git a/hosts/default/packages/ocbwoy3-icons/games/deltarune.png b/hosts/default/packages/kris-icons/games/deltarune.png similarity index 100% rename from hosts/default/packages/ocbwoy3-icons/games/deltarune.png rename to hosts/default/packages/kris-icons/games/deltarune.png diff --git a/hosts/default/packages/nonnix-fonts.nix b/hosts/default/packages/nonnix-fonts.nix new file mode 100644 index 0000000..69a312b --- /dev/null +++ b/hosts/default/packages/nonnix-fonts.nix @@ -0,0 +1,14 @@ +{ stdenvNoCC }: + +stdenvNoCC.mkDerivation { + pname = "kris-nonnix-fonts"; + version = "1"; + + src = ../../../asset/fonts/nonnix; + + installPhase = '' + runHook preInstall + install -Dm644 *.ttf -t "$out/share/fonts/truetype" + runHook postInstall + ''; +} diff --git a/scripts/bin/handleScreenshot.ts b/scripts/bin/handleScreenshot.ts deleted file mode 100755 index 2653acb..0000000 --- a/scripts/bin/handleScreenshot.ts +++ /dev/null @@ -1,180 +0,0 @@ -import { $ } from "bun"; -import { Command } from "commander"; -// import sharp from "sharp"; -import { writeFileSync } from "fs"; -import { getRegretevatorState } from "../lib/RegretevatorUtil"; - -/* - - yeucc i swear to fucking god... - - {"text":"ý 999","tooltip":"Regretevator: Floor streak 999"} - - NOTE: ý turns into the regretevator icon when using DotfilesFont - - ==== - - [BloxstrapRPC] {"command":"SetRichPresence","data":{"details":"REGRETEVATOR","smallImage":{"hoverText":"The Axolotl Sun","assetId":14648053922},"state":"","largeImage":{"hoverText":"THE REGRET ELEVATOR"}}} - - InGame | details === "REGRETEVATOR"; smallImage?.hoverText === "The Axolotl Sun"; - - ==== - - [BloxstrapRPC] {"command":"SetRichPresence","data":{"state":"Lounging in the lobby","timeStart":0,"timeEnd":0}} - - InGame[Lobby] | state === "Lounging in the lobby"; - - ==== - - [BloxstrapRPC] {"command":"SetRichPresence","data":{"state":"Currently spectating ELEVATOR_CAM"}} - - InGame[Spectating] | state matches regex /$Currently spectating (.*)$/, if so, SpectateName=$1; - - ==== - - [BloxstrapRPC] {"command":"SetRichPresence","data":{"details":"Going up!","state":"Floor streak 348","timeStart":1749325817,"timeEnd":1749325839}} - - InGame[GoingUp] | details === "Going up!"; state matches regex /^Floor streak ([0-9]+)$/, if so, FloorStreak=$1; - - ==== - - [BloxstrapRPC] {"command":"SetRichPresence","data":{"details":"At Funny Maze","state":"Floor streak 348","timeStart":0,"timeEnd":0}} - - InGame[AtFloor] | details match regex /^At (.+)$/, if so, FloorName=$1; state matches regex /^Floor streak ([0-9]+)$/, if so, FloorStreak=$1; - - ==== - - TODO: Bring back `features/RegretevatorWaybar.ts` to TuxStrap - -*/ - -const windowClassFriendyName: { [windowClass: string]: string } = { - steam_app_1671210: "Deltarune", - "deltarune.exe": "Deltarune", // <-- proton-cachyos - steam_app_1690940: "Deltarune", // <-- demo - - "org.vinegarhq.Sober": "Roblox", -}; - -async function getWMClass(): Promise { - const windowClass = await $`hyprctl activewindow -j`.json(); - return windowClass.initialClass; -} - -async function getFilename(wmClass?: string): Promise { - const _d = new Date(); - let ic = - (wmClass && windowClassFriendyName[wmClass]) || wmClass || "Hyprland"; - const isRoblox = wmClass === "org.vinegarhq.Sober"; - if (isRoblox) { - ic = "Roblox"; - } - const regretevatorState = isRoblox ? getRegretevatorState() : null; - if (!!regretevatorState) { - ic = "Regretevator"; - } - // console.log(isRoblox, regretevatorState) - return `${ic}-${_d.getTime()}${ - !regretevatorState - ? "" - : `-regretevator${ - regretevatorState.state === "INGAME" - ? `-${regretevatorState.floor}` - : "" - }` - }`; -} - -const program = new Command("handle-screenshot"); - -const SCREENSHOT_PATH = `/home/kris/Pictures/Screenshots`; - -// useless -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()) as Buffer; - */ - return b; -} - -(() => { - program - .command("selection") - .description("Takes a screenshot from selection") - .action(async () => { - const _C = await getWMClass(); - 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 -c -t png -l 0 -g ${selection.stdout - .toString() - .trim()} -`.arrayBuffer(); - let BUF = Buffer.from(_BUF) as Buffer; - - const FILENAME = `${SCREENSHOT_PATH}/${await getFilename(_C)}.png`; - - // BUF = await transformImage(BUF); - writeFileSync(FILENAME, BUF); - 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 _C = await getWMClass(); - const _BUF = - await $`grim -c -t png -l 0 -o ${selection.trim()} -`.arrayBuffer(); - let BUF = Buffer.from(_BUF) as Buffer; - - const FILENAME = `${SCREENSHOT_PATH}/${await getFilename(_C)}.png`; - - // BUF = await transformImage(BUF); - writeFileSync(FILENAME, BUF); - console.log(FILENAME); - }); -})(); - -program.parse(process.argv); diff --git a/scripts/edit-last-screenshot.sh b/scripts/edit-last-screenshot.sh deleted file mode 100755 index 05943b0..0000000 --- a/scripts/edit-last-screenshot.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -SCREENSHOTS_DIR="$HOME/Pictures/Screenshots" - -LAST_SCREENSHOT=$(ls -t "$SCREENSHOTS_DIR" | head -n 1) - -if [[ -n "$LAST_SCREENSHOT" ]]; then - swappy -f "$SCREENSHOTS_DIR/$LAST_SCREENSHOT" -o "$SCREENSHOTS_DIR/$LAST_SCREENSHOT" -else - notify-send -a dotfiles-screenshot -u critical -t 3 "Error" "Can't find the damn file :(" -fi diff --git a/scripts/hot-reload.sh b/scripts/hot-reload.sh index ce05a41..0166c97 100755 --- a/scripts/hot-reload.sh +++ b/scripts/hot-reload.sh @@ -1,8 +1,5 @@ #!/bin/bash -pkill -9 waybar > /dev/null - -# hyprctl dispatch exec "GTK_THEME=Adwaita waybar -c ~/config/config/waybar/config -s ~/config/config/waybar/style.css" > /dev/null & hyprctl reload > /dev/null & ROBLOX_PID="$(pidof sober)" diff --git a/scripts/roblox-fullscreen.sh b/scripts/roblox-fullscreen.sh index 4781548..c6b0cfa 100755 --- a/scripts/roblox-fullscreen.sh +++ b/scripts/roblox-fullscreen.sh @@ -1,21 +1,4 @@ # run roblox in fullscreen with mouse sensitivity of the os default and not some value set by roblox #!/usr/bin/env sh -HYPRGAMEMODE=$(pidof waybar | awk 'NR>=1{print 1}') # $(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;" - pkill -9 waybar - exit -fi bash ~/config/scripts/hot-reload.sh -# hyprctl reload diff --git a/scripts/screenshot-fullscreen.sh b/scripts/screenshot-fullscreen.sh deleted file mode 100755 index 4e1abb7..0000000 --- a/scripts/screenshot-fullscreen.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash - -# do NOT use $PATH for this!! -SS_PATH=$(timeout 30s bun run /etc/nixos/scripts/bin/handleScreenshot.ts fullscreen) - -echo "$SS_PATH" - -if [[ -n "$SS_PATH" && "$SS_PATH" == /home/kris/Pictures/Screenshots/* ]]; then - wl-copy < "$SS_PATH" - notify-send -i "$SS_PATH" "Screenshot" "copied to clipboard!" -fi diff --git a/scripts/screenshot-selection.sh b/scripts/screenshot-selection.sh deleted file mode 100755 index 0185bfa..0000000 --- a/scripts/screenshot-selection.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash - -# do NOT use $PATH for this!! -SS_PATH=$(timeout 30s bun run /etc/nixos/scripts/bin/handleScreenshot.ts selection) - -echo "$SS_PATH" - -if [[ -n "$SS_PATH" && "$SS_PATH" == /home/kris/Pictures/Screenshots/* ]]; then - wl-copy < "$SS_PATH" - notify-send -a dotfiles-screenshot -i "$SS_PATH" "Screenshot" "selection copied to clipboard!" -fi