Add back lacros and some keybind stuff

This commit is contained in:
Jimbo 2024-12-10 17:54:39 -05:00
parent 7c5ff0253e
commit 7540a2156a
26 changed files with 134 additions and 157 deletions

View file

@ -9,30 +9,6 @@
theme = "agnoster";
plugins = [ "git" ];
};
shellAliases = {
# NixOS
flakedate = "doas nix flake update --flake /etc/nixos";
nhs = "doas nh os switch -R /etc/nixos";
nhu = "flakedate && nhs";
ns = "nix-shell -p";
nixclean = "doas nix-store --gc; nix-collect-garbage -d";
nixpurge = "doas nix-collect-garbage --delete-old";
nixoptimize = "doas nix store optimise";
nixscrub = "nixclean; nixpurge; nixoptimize";
# Shortcuts
ff = "clear && fastfetch";
ip = "ip -c";
ls = "${pkgs.eza}/bin/eza -a --color=always --group-directories-first --icons";
cat = "${pkgs.bat}/bin/bat --paging never";
copycat = "wl-copy <";
myip = "curl ifconfig.co";
seneca = "ssh jhampton1@matrix.senecapolytechnic.ca";
# Deny
rm = ''echo "Use trash."; false'';
};
initExtra = ''
${pkgs.any-nix-shell}/bin/any-nix-shell zsh --info-right | source /dev/stdin; pfetch
source ${pkgs.zsh-vi-mode}/share/zsh-vi-mode/zsh-vi-mode.plugin.zsh

View file

@ -0,0 +1,27 @@
{ pkgs, ... }:
{
home.shellAliases = {
# NixOS
flakedate = "doas nix flake update --flake /etc/nixos";
nhs = "doas nh os switch -R /etc/nixos";
nhu = "flakedate && nhs";
ns = "nix-shell -p";
nixclean = "doas nix-store --gc; nix-collect-garbage -d";
nixpurge = "doas nix-collect-garbage --delete-old";
nixoptimize = "doas nix store optimise";
nixscrub = "nixclean; nixpurge; nixoptimize";
# Shortcuts
ff = "clear && fastfetch";
ip = "ip -c";
ls = "${pkgs.eza}/bin/eza -a --color=always --group-directories-first --icons";
cat = "${pkgs.bat}/bin/bat --paging never";
copycat = "wl-copy <";
myip = "curl ifconfig.co";
seneca = "ssh jhampton1@matrix.senecapolytechnic.ca";
# Deny
rm = ''echo "Use trash."; false'';
};
}

View file

@ -2,6 +2,7 @@
{
home.pointerCursor = {
gtk.enable = true;
x11.enable = true;
name = "Simp1e-Dark";
package = pkgs.simp1e-cursors;
size = 24;

View file

@ -1,6 +1,7 @@
{ ... }:
{
imports = [
./aliases
./cursor
./dconf
./fonts

View file

@ -9,8 +9,8 @@
LIBVIRT_DEFAULT_URI = "qemu:///system";
HISTCONTROL = "ignoreboth";
QT_QPA_PLATFORMTHEME = "gtk3";
XDG_SCREENSHOTS_DIR = "$XDG_PICTURES_DIR/Screenshots";
NIXPKGS_ALLOW_UNFREE = 1;
NIXOS_OZONE_WL = 1;
};
};
}

View file

@ -1,8 +1,10 @@
{ pkgs, ... }:
{
imports = [
./grimedit
./hyprpaper
./mako
./swappy
./swaylock
./waybar
./wlpicker
@ -10,11 +12,8 @@
home.packages = with pkgs; [
clipman
hyprpicker
libnotify
grimblast
wl-clipboard
wdisplays
jq
];
}

View file

@ -0,0 +1,34 @@
{ pkgs, config, ... }:
{
home.packages = with pkgs; [
(pkgs.writeScriptBin "grimedit" ''
# Freeze the screen using hyprpicker
${pkgs.hyprpicker}/bin/hyprpicker -r -z &
HYPRPICKER_PID=$!
sleep 0.1
# Select area
GEOM=$(${pkgs.slurp}/bin/slurp -w 3 -c ${config.look.colors.prime} -B 00000066 -b 00000099)
# Check selection is canceled
if [ -z "$GEOM" ]; then
kill $HYPRPICKER_PID 2>/dev/null
notify-send -t 3000 -a grimblast "Error" "No area selected."
exit 1
fi
# Define screenshot destination
FILE="''${XDG_PICTURES_DIR:-$HOME/Pictures}/Screenshots/$(date -Ins).png"
# Save and edit screenshot
grim -g "$GEOM" "$FILE"
swappy -f $FILE &
# Notify user that the screenshot is saved
notify-send -a grim "Screenshot" "Area saved to $FILE" -i "$FILE"
# Kill picker after selection
kill %1 2>/dev/null
'')
];
}

View file

@ -0,0 +1,11 @@
{ pkgs, ... }:
{
home = {
packages = with pkgs; [ swappy ];
file.".config/swappy/config".text = ''
[Default]
early_exit=true
save_dir=$HOME/Pictures/Screenshots
'';
};
}

View file

@ -136,11 +136,10 @@
gamemodeModule = {
format = "{glyph}";
glyph = "󰖺";
hide-not-running = true;
use-icon = true;
icon-size = 19;
icon-spacing = 3;
icon-spacing = 0;
tooltip = true;
};

View file

@ -60,7 +60,7 @@
"${primeMod}+Ctrl+n" = ''exec makoctl dismiss -a'';
# Screenshots
"${secMod}+f" = ''exec shot-sway --swappy'';
"${secMod}+f" = ''exec grimedit'';
"${secMod}+Shift+f" = ''exec shot-sway --screen'';
# Display and keyboard brightness

View file

@ -47,7 +47,7 @@
pos = "3840 405";
mode = "1920x1080@143.980Hz";
max_render_time = "3";
adaptive_sync = "on";
allow_tearing = "yes";
};
${config.displays.d2} = {
pos = "1920 405";

View file

@ -30,10 +30,6 @@
criteria = { con_mark = "giveborder"; };
command = ''border pixel ${config.look.border.string}'';
}
{
criteria = { app_id = "com.github.wwmm.easyeffects"; };
command = ''mark giveborder'';
}
{
criteria = { class = "steam"; };
command = ''mark giveborder'';
@ -50,12 +46,6 @@
criteria = { window_role = "pop-up"; };
command = ''mark giveborder'';
}
# Misc
{
criteria = { title = "^GlobalShot"; };
command = ''floating enable, fullscreen enable global'';
}
];
};
assigns = {