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

@ -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;
};