mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-04-04 03:52:10 +02:00
Merge pull request #45 from Dylouwu/feat/qol
This commit is contained in:
@@ -16,6 +16,7 @@ in {
|
|||||||
update.method = "never";
|
update.method = "never";
|
||||||
git = {
|
git = {
|
||||||
commit.signOff = true;
|
commit.signOff = true;
|
||||||
|
overrideGpg = true;
|
||||||
parseEmoji = true;
|
parseEmoji = true;
|
||||||
};
|
};
|
||||||
gui = {
|
gui = {
|
||||||
|
|||||||
@@ -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"/>
|
<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>
|
</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>
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,20 +1,15 @@
|
|||||||
# - ## Nixy
|
# - ## 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` - UI wizard to manage the system.
|
||||||
#- - `nixy rebuild` - Rebuild the system.
|
#- - `nixy rebuild` - Rebuild the system.
|
||||||
#- - `nixy ...` - ... see the script for more commands.
|
#- - `nixy ...` - ... see the script for more commands.
|
||||||
{
|
{ pkgs, config, ... }:
|
||||||
pkgs,
|
let
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
configDirectory = config.var.configDirectory;
|
configDirectory = config.var.configDirectory;
|
||||||
hostname = config.var.hostname;
|
|
||||||
|
|
||||||
nixy =
|
nixy = pkgs.writeShellScriptBin "nixy"
|
||||||
pkgs.writeShellScriptBin "nixy"
|
|
||||||
# bash
|
# bash
|
||||||
''
|
''
|
||||||
function exec() {
|
function exec() {
|
||||||
@@ -27,7 +22,7 @@
|
|||||||
# "icon;name;command"[]
|
# "icon;name;command"[]
|
||||||
apps=(
|
apps=(
|
||||||
";Rebuild;nixy rebuild"
|
";Rebuild;nixy rebuild"
|
||||||
";Upgrade;nixy upgrade"
|
";Test;nixy test"
|
||||||
";Update;nixy update"
|
";Update;nixy update"
|
||||||
";Collect Garbage;nixy gc"
|
";Collect Garbage;nixy gc"
|
||||||
";Clean Boot Menu;nixy cb"
|
";Clean Boot Menu;nixy cb"
|
||||||
@@ -54,15 +49,23 @@
|
|||||||
[[ $1 == "" ]] && ui
|
[[ $1 == "" ]] && ui
|
||||||
|
|
||||||
if [[ $1 == "rebuild" ]];then
|
if [[ $1 == "rebuild" ]];then
|
||||||
cd ${configDirectory} && git add .
|
cd ${configDirectory} && git add . && sudo nixos-rebuild switch --flake
|
||||||
sudo nixos-rebuild switch --flake ${configDirectory}#${hostname}
|
elif [[ $1 == "test" ]];then
|
||||||
elif [[ $1 == "upgrade" ]];then
|
cd ${configDirectory} && git add . && sudo nixos-rebuild test --flake
|
||||||
sudo nixos-rebuild switch --upgrade --flake '${configDirectory}#${hostname}'
|
|
||||||
elif [[ $1 == "update" ]];then
|
elif [[ $1 == "update" ]];then
|
||||||
cd ${configDirectory} && nix flake update
|
cd ${configDirectory} && nix flake update
|
||||||
elif [[ $1 == "gc" ]];then
|
elif [[ $1 == "gc" ]];then
|
||||||
cd ${configDirectory} && sudo nix-collect-garbage -d
|
echo "Starting Nix garbage collection..."
|
||||||
cd ${configDirectory} && nix-collect-garbage -d
|
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
|
elif [[ $1 == "cb" ]];then
|
||||||
sudo /run/current-system/bin/switch-to-configuration boot
|
sudo /run/current-system/bin/switch-to-configuration boot
|
||||||
elif [[ $1 == "listgen" ]];then
|
elif [[ $1 == "listgen" ]];then
|
||||||
@@ -71,4 +74,4 @@
|
|||||||
echo "Unknown argument"
|
echo "Unknown argument"
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
in {home.packages = [nixy];}
|
in { home.packages = [ nixy ]; }
|
||||||
|
|||||||
@@ -28,5 +28,5 @@
|
|||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
home.packages = [pkgs.hyprshot screenshot pkgs.slurp pkgs.grim pkgs.grimblast];
|
home.packages = [ screenshot pkgs.grim pkgs.grimblast ];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,7 +79,6 @@
|
|||||||
# pkill tofi
|
# pkill tofi
|
||||||
else
|
else
|
||||||
options=(
|
options=(
|
||||||
" Caffeine"
|
|
||||||
" Night-shift"
|
" Night-shift"
|
||||||
" Nixy"
|
" Nixy"
|
||||||
" Hyprpicker"
|
" Hyprpicker"
|
||||||
@@ -91,9 +90,6 @@
|
|||||||
selected=''${selected:2}
|
selected=''${selected:2}
|
||||||
|
|
||||||
case $selected in
|
case $selected in
|
||||||
"Caffeine")
|
|
||||||
caffeine
|
|
||||||
;;
|
|
||||||
"Night-shift")
|
"Night-shift")
|
||||||
night-shift
|
night-shift
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -177,8 +177,6 @@ in {
|
|||||||
"dimaround, class:^(polkit-gnome-authentication-agent-1)$"
|
"dimaround, class:^(polkit-gnome-authentication-agent-1)$"
|
||||||
"dimaround, class:^(zen)$, title:^(File Upload)$"
|
"dimaround, class:^(zen)$, title:^(File Upload)$"
|
||||||
|
|
||||||
# fix xwayland apps
|
|
||||||
"rounding 0, xwayland:1"
|
|
||||||
"center, class:^(.*jetbrains.*)$, title:^(Confirm Exit|Open Project|win424|win201|splash)$"
|
"center, class:^(.*jetbrains.*)$, title:^(Confirm Exit|Open Project|win424|win201|splash)$"
|
||||||
"size 640 400, class:^(.*jetbrains.*)$, title:^(splash)$"
|
"size 640 400, class:^(.*jetbrains.*)$, title:^(splash)$"
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
# Hyprlock is a lockscreen for Hyprland
|
# Hyprlock is a lockscreen for Hyprland
|
||||||
{
|
{ config, lib, ... }:
|
||||||
config,
|
let
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
foreground = "rgba(${config.theme.textColorOnWallpaper}ee)";
|
foreground = "rgba(${config.theme.textColorOnWallpaper}ee)";
|
||||||
font = config.stylix.fonts.serif.name;
|
font = config.stylix.fonts.serif.name;
|
||||||
in {
|
in {
|
||||||
@@ -11,18 +8,11 @@ in {
|
|||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
general = {
|
general = {
|
||||||
no_fade_in = false;
|
ignore_empty_input = true;
|
||||||
disable_loading_bar = false;
|
hide_cursor = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
background = {
|
background = { brightness = 0.7172; };
|
||||||
monitor = "";
|
|
||||||
blur_passes = 0;
|
|
||||||
contrast = 0.8916;
|
|
||||||
brightness = 0.7172;
|
|
||||||
vibrancy = 0.1696;
|
|
||||||
vibrancy_darkness = 0.0;
|
|
||||||
};
|
|
||||||
|
|
||||||
label = [
|
label = [
|
||||||
{
|
{
|
||||||
@@ -52,10 +42,6 @@ in {
|
|||||||
monitor = "";
|
monitor = "";
|
||||||
text = " $USER";
|
text = " $USER";
|
||||||
color = foreground;
|
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_size = 18;
|
||||||
font_family = font + " Bold";
|
font_family = font + " Bold";
|
||||||
position = "0, -180";
|
position = "0, -180";
|
||||||
@@ -66,7 +52,6 @@ in {
|
|||||||
|
|
||||||
# INPUT FIELD
|
# INPUT FIELD
|
||||||
input-field = lib.mkForce {
|
input-field = lib.mkForce {
|
||||||
monitor = "";
|
|
||||||
size = "300, 60";
|
size = "300, 60";
|
||||||
outline_thickness = 2;
|
outline_thickness = 2;
|
||||||
dots_size = 0.2; # Scale of input-field height, 0.2 - 0.8
|
dots_size = 0.2; # Scale of input-field height, 0.2 - 0.8
|
||||||
@@ -78,7 +63,6 @@ in {
|
|||||||
fade_on_empty = false;
|
fade_on_empty = false;
|
||||||
font_family = font + " Bold";
|
font_family = font + " Bold";
|
||||||
placeholder_text = "<i>🔒 Enter Password</i>";
|
placeholder_text = "<i>🔒 Enter Password</i>";
|
||||||
hide_input = false;
|
|
||||||
position = "0, -250";
|
position = "0, -250";
|
||||||
halign = "center";
|
halign = "center";
|
||||||
valign = "center";
|
valign = "center";
|
||||||
|
|||||||
@@ -24,25 +24,13 @@ in {
|
|||||||
show = "drun";
|
show = "drun";
|
||||||
prompt = "Apps";
|
prompt = "Apps";
|
||||||
normal_window = true;
|
normal_window = true;
|
||||||
layer = "top";
|
height = 325;
|
||||||
height = "325px";
|
|
||||||
orientation = "vertical";
|
|
||||||
halign = "fill";
|
|
||||||
line_wrap = "off";
|
|
||||||
dynamic_lines = false;
|
|
||||||
allow_images = true;
|
allow_images = true;
|
||||||
image_size = 24;
|
image_size = 24;
|
||||||
exec_search = false;
|
|
||||||
hide_search = false;
|
|
||||||
parse_search = false;
|
|
||||||
insensitive = true;
|
insensitive = true;
|
||||||
hide_scroll = true;
|
hide_scroll = true;
|
||||||
no_actions = true;
|
no_actions = true;
|
||||||
sort_order = "default";
|
|
||||||
gtk_dark = true;
|
gtk_dark = true;
|
||||||
filter_rate = 100;
|
|
||||||
key_expand = "Tab";
|
|
||||||
key_exit = "Escape";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
style =
|
style =
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ in {
|
|||||||
# Configuration for proprietary packages
|
# Configuration for proprietary packages
|
||||||
nixpkgs.config = {
|
nixpkgs.config = {
|
||||||
nvidia.acceptLicense = true;
|
nvidia.acceptLicense = true;
|
||||||
allowUnfree = true; # Simplified from specific allowUnfreePredicate
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Nvidia configuration
|
# Nvidia configuration
|
||||||
|
|||||||
Reference in New Issue
Block a user