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

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 = {