Merge pull request #45 from Dylouwu/feat/qol

This commit is contained in:
Hadi
2025-08-25 19:31:10 +02:00
committed by GitHub
9 changed files with 55 additions and 59 deletions

View File

@@ -16,6 +16,7 @@ in {
update.method = "never";
git = {
commit.signOff = true;
overrideGpg = true;
parseEmoji = true;
};
gui = {

View File

@@ -108,4 +108,31 @@ in {
<property name="last-toolbar-items" type="string" value="menu:1,back:1,forward:0,open-parent:0,open-home:0,undo:0,redo:0,zoom-in:0,zoom-out:0,zoom-reset:0,view-as-icons:0,view-as-detailed-list:0,view-as-compact-list:0,toggle-split-view:0,location-bar:1,reload:0,search:1,uca-action-1710183590071525-1:0,new-tab:0,new-window:0,view-switcher:0"/>
</channel>
'';
xdg.configFile."Thunar/uca.xml".text = ''
<?xml version="1.0" encoding="UTF-8"?>
<actions>
<action>
<icon>utilities-terminal</icon>
<name>Open Terminal Here</name>
<unique-id>1700000000000001</unique-id>
<command>kitty -d %f</command>
<description>Opens Kitty terminal in the selected folder</description>
<patterns>*</patterns>
<startup-notify/>
<directories/>
</action>
<action>
<icon></icon>
<name>Extract here</name>
<submenu></submenu>
<unique-id>1689618425925956-3</unique-id>
<command>xarchiver -x . %f</command>
<description>Extracts the archive into the directory it is located in.</description>
<range>*</range>
<patterns>*.tar.bz2;*.tar.gz;*.tar.xz;*.tar.Z;*.tar;*.taz;*.tb2;*.tbz;*.tbz2;*.tgz;*.txz;*.zip;*.bz2;*.docx;*.apk;*.gz;*.odt;</patterns>
<other-files/>
</action>
</actions>
'';
}

View File

@@ -1,20 +1,15 @@
# - ## Nixy
#-
#- Nixy is a simple script that I use to manage my NixOS system. It's a simple script that provides a menu to rebuild, upgrade, update, collect garbage, clean boot menu, etc.
#- Nixy is a simple script that I use to manage my NixOS system. It's a simple script that provides a menu to rebuild, test, update, collect garbage, clean boot menu, etc.
#-
#- - `nixy` - UI wizard to manage the system.
#- - `nixy rebuild` - Rebuild the system.
#- - `nixy ...` - ... see the script for more commands.
{
pkgs,
config,
...
}: let
{ pkgs, config, ... }:
let
configDirectory = config.var.configDirectory;
hostname = config.var.hostname;
nixy =
pkgs.writeShellScriptBin "nixy"
nixy = pkgs.writeShellScriptBin "nixy"
# bash
''
function exec() {
@@ -27,7 +22,7 @@
# "icon;name;command"[]
apps=(
"󰑓;Rebuild;nixy rebuild"
"󰦗;Upgrade;nixy upgrade"
"󰐊;Test;nixy test"
"󰚰;Update;nixy update"
";Collect Garbage;nixy gc"
"󰍜;Clean Boot Menu;nixy cb"
@@ -54,15 +49,23 @@
[[ $1 == "" ]] && ui
if [[ $1 == "rebuild" ]];then
cd ${configDirectory} && git add .
sudo nixos-rebuild switch --flake ${configDirectory}#${hostname}
elif [[ $1 == "upgrade" ]];then
sudo nixos-rebuild switch --upgrade --flake '${configDirectory}#${hostname}'
cd ${configDirectory} && git add . && sudo nixos-rebuild switch --flake
elif [[ $1 == "test" ]];then
cd ${configDirectory} && git add . && sudo nixos-rebuild test --flake
elif [[ $1 == "update" ]];then
cd ${configDirectory} && nix flake update
elif [[ $1 == "gc" ]];then
cd ${configDirectory} && sudo nix-collect-garbage -d
cd ${configDirectory} && nix-collect-garbage -d
echo "Starting Nix garbage collection..."
cd ${configDirectory} && \
echo "Cleaning up system garbage..." && \
sudo nix-collect-garbage -d && \
echo "Cleaning up user garbage..." && \
nix-collect-garbage -d && \
echo "Collecting garbage from Nix store..." && \
nix-store --gc && \
echo "Optimizing Nix store..." && \
nix-store --optimise
echo "Nix garbage collection complete."
elif [[ $1 == "cb" ]];then
sudo /run/current-system/bin/switch-to-configuration boot
elif [[ $1 == "listgen" ]];then
@@ -71,4 +74,4 @@
echo "Unknown argument"
fi
'';
in {home.packages = [nixy];}
in { home.packages = [ nixy ]; }

View File

@@ -28,5 +28,5 @@
fi
'';
in {
home.packages = [pkgs.hyprshot screenshot pkgs.slurp pkgs.grim pkgs.grimblast];
home.packages = [ screenshot pkgs.grim pkgs.grimblast ];
}

View File

@@ -79,7 +79,6 @@
# pkill tofi
else
options=(
"󰅶 Caffeine"
"󰖔 Night-shift"
" Nixy"
"󰈊 Hyprpicker"
@@ -91,9 +90,6 @@
selected=''${selected:2}
case $selected in
"Caffeine")
caffeine
;;
"Night-shift")
night-shift
;;

View File

@@ -177,8 +177,6 @@ in {
"dimaround, class:^(polkit-gnome-authentication-agent-1)$"
"dimaround, class:^(zen)$, title:^(File Upload)$"
# fix xwayland apps
"rounding 0, xwayland:1"
"center, class:^(.*jetbrains.*)$, title:^(Confirm Exit|Open Project|win424|win201|splash)$"
"size 640 400, class:^(.*jetbrains.*)$, title:^(splash)$"
];

View File

@@ -1,9 +1,6 @@
# Hyprlock is a lockscreen for Hyprland
{
config,
lib,
...
}: let
{ config, lib, ... }:
let
foreground = "rgba(${config.theme.textColorOnWallpaper}ee)";
font = config.stylix.fonts.serif.name;
in {
@@ -11,18 +8,11 @@ in {
enable = true;
settings = {
general = {
no_fade_in = false;
disable_loading_bar = false;
ignore_empty_input = true;
hide_cursor = true;
};
background = {
monitor = "";
blur_passes = 0;
contrast = 0.8916;
brightness = 0.7172;
vibrancy = 0.1696;
vibrancy_darkness = 0.0;
};
background = { brightness = 0.7172; };
label = [
{
@@ -52,10 +42,6 @@ in {
monitor = "";
text = " $USER";
color = foreground;
outline_thickness = 2;
dots_size = 0.2; # Scale of input-field height, 0.2 - 0.8
dots_spacing = 0.2; # Scale of dots' absolute size, 0.0 - 1.0
dots_center = true;
font_size = 18;
font_family = font + " Bold";
position = "0, -180";
@@ -66,7 +52,6 @@ in {
# INPUT FIELD
input-field = lib.mkForce {
monitor = "";
size = "300, 60";
outline_thickness = 2;
dots_size = 0.2; # Scale of input-field height, 0.2 - 0.8
@@ -78,7 +63,6 @@ in {
fade_on_empty = false;
font_family = font + " Bold";
placeholder_text = "<i>🔒 Enter Password</i>";
hide_input = false;
position = "0, -250";
halign = "center";
valign = "center";

View File

@@ -24,25 +24,13 @@ in {
show = "drun";
prompt = "Apps";
normal_window = true;
layer = "top";
height = "325px";
orientation = "vertical";
halign = "fill";
line_wrap = "off";
dynamic_lines = false;
height = 325;
allow_images = true;
image_size = 24;
exec_search = false;
hide_search = false;
parse_search = false;
insensitive = true;
hide_scroll = true;
no_actions = true;
sort_order = "default";
gtk_dark = true;
filter_rate = 100;
key_expand = "Tab";
key_exit = "Escape";
};
style =

View File

@@ -39,7 +39,6 @@ in {
# Configuration for proprietary packages
nixpkgs.config = {
nvidia.acceptLicense = true;
allowUnfree = true; # Simplified from specific allowUnfreePredicate
};
# Nvidia configuration