Skip to content

niksingh710/utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

43 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Nix Scripts Flake

I realized that keeping all my scripts inside Nix '' text objects made the code cluttered. So, I created this flake to manage my scripts more efficiently! 🎯

πŸ“¦ Features

  • Easily Manageable: Each script is stored as a separate file for clarity.
  • Hyprland Utilities: Scripts to tweak Hyprland behavior dynamically.
  • Image Annotation: Quick clipboard-based image annotation with Swappy.
  • Window Management: Move, focus, and toggle windows seamlessly.
  • Volume & Brightness Controls: Manage system volume and brightness with ease.
  • Quick Terminal for Hyprland: Spawn a floating terminal instantly, like Yakuake.

πŸ“œ Installation

inputs.utils.url = "github:niksingh710/utils";

# In hyprland keymaps
",XF86AudioRaiseVolume,exec,${inputs.utils.packages.${pkgs.system}.volume} up"
",XF86AudioLowerVolume,exec,${inputs.utils.packages.${pkgs.system}.volume} down"

Or run scripts directly:

nix run github:niksingh710/utils#fast
nix run github:niksingh710/utils#zoom -- in
nix run github:niksingh710/utils#fullscreen

πŸ›  Available Scripts

Script Name Description
hypr/fast Toggles animations and rounding in Hyprland for a snappier experience.
img-annotate Opens Swappy to edit the image currently in clipboard.
hypr/focus Handles focus between tiled and floating windows (like tabbed browsing).
hypr/move Moves tiled and floating windows; uses HYPR_MOVE_VAL to adjust movement.
hypr/fullscreen Toggles maximized and fullscreen states (tiled/floating β†’ maximized β†’ fullscreen β†’ tiled/floating).
hypr/zoom Manages zoom levels (in, out, reset).
hypr/toggle-group Toggles a window into a Hyprland group; enables Group submap if already grouped.
hypr/lid-down Handles laptop lid-down state.
volume Supports up, down, mute, and mic-mute for volume control.
brightness Adjusts screen brightness using brightnessctl.
cat Replaces cat command to use bat without paging and -p flag enables paging
myip Shows local/global ip with flags [-g,-l].
hypr/quick-term Spawns a floating terminal in Hyprland, similar to Yakuake.
hypr/monitor Assigns 1-9 workspace to primary monitor and 10/0 to secondary (need help check comment in script)
hypr/clients/run-focus Lists all opened clients in rofi and focus on them if also drun then, for colors you can override the theme e.g below.
hypr/clients/get-client Lists all opened clients in rofi and brings them to the current workspace (ignores special workspace)
rofi/menus/audio-sink Lists Speakers and present a rofi menu to switch default
rofi/menus/audio-source Lists Microphones and present a rofi menu to switch default
rofi/menus/rofimoji Emoji picker using rofi
rofi/menus/network Quick network manager using rofi
rofi/menus/bluetooth Quick bluetooth manager using rofi
rofi/powermenu Rofi power manu isolatedly packed so that it will run from anywhere without needing the theme to be passed.
waybar/recorder Screen Recording utility utilising wf-screenrec. Sends RTMIN+4 Signal to waybar
walogram Walogram to generate telegram theme from stylix/color palette
center-align Logs the output in mid of terminal echo hi | center-align
bstat Shows the battery status of system and mobile device if kdeconnect is connected
audio-channel fzf/rofi/dmenu picker options to select default mic/output audio channel (will add as i complete my ndots)

πŸ“– Usage

For usage details, check out my ndots repository: πŸ”— ndots (Upcoming Refactor)

πŸ”§ Recommended Hyprland Config for Quick-Term

To quickly spawn a floating terminal in Hyprland, add the following keybind:

"CTRL,grave,exec,${inputs.utils.packages.${pkgs.system}.quick-term}"

And apply these windowrulev2 settings:

"float, class:^(foot-quick)$"
"size 100% 40%, class:^(foot-quick)$"
"move 0% 60%, class:^(foot-quick)$"
"dimaround, class:^(foot-quick)$"
"noborder, class:^(foot-quick)$"
"rounding 0, class:^(foot-quick)$"
"noshadow, class:^(foot-quick)$"
"noanim,class:^(foot-quick)$"
"pin,class:^(foot-quick)$"
"stayfocused,class:^(foot-quick)$"

Walogram

nix run github:niksingh710/utils#walogram

Generated theme is at ~/.cache/stylix-telegram-theme/stylix.tdesktop-theme

πŸ“Έ Screenshots

image

To use it with stylix you can use the following snippet

{ pkgs, lib, inputs, config, ... }:
let
  walogram = inputs.utils.packages.${pkgs.system}.walogram.override {
    image = "${config.stylix.image}";
    colors = (with config.lib.stylix.colors;
      ''
        color0="#${base00}"
        color1="#${base01}"
        color2="#${base02}"
        color3="#${base03}"
        color4="#${base04}"
        color5="#${base05}"
        color6="#${base06}"
        color7="#${base07}"
        color8="#${base08}"
        color9="#${base09}"
        color10="#${base0A}"
        color11="#${base0B}"
        color12="#${base0C}"
        color13="#${base0D}"
        color14="#${base0E}"
        color15="#${base0F}"
      '');
  };
in
{
  home.packages = [ pkgs.materialgram ];
  home.activation.tg-theme = lib.hm.dag.entryAfter [ "" ]
    ''
      run ${lib.getExe walogram}
    '';
}

Rofi

Power Menu
nix run github:niksingh710/utils#powermenu-rofi
πŸ“Έ Screenshots

Image

Emoji, Network, Bluetooth, Audio
nix run github:niksingh710/utils#menus
πŸ“Έ Screenshots

Image

Clients

run-focus and get-client
nix shell -p github:niksingh710/utils#clients -c "run-focus"

This will make theming easy with stylix or other modules.

self.packages.clients.override ({
    rofi-theme-str = ''
        * {
            background: red;
        }
    '';
})
πŸ“Έ Screenshots
Image Image

πŸ“Š Stats & Contributions

πŸ’‘ Contributions, feedback, and ideas are welcome! πŸŽ‰ Feel free to open issues or PRs.


πŸ“ Made with ❀️ by niksingh710

Releases

No releases published

Packages

No packages published