add(apps): screenshot
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
* add: similar to omarchy-menu
|
* add: similar to omarchy-menu
|
||||||
* walker should have a script that initializes elephant if task does not exist.
|
* walker should have a script that initializes elephant if task does not exist.
|
||||||
* screenshot
|
* screenshot
|
||||||
* notification
|
|
||||||
* polkit security
|
* polkit security
|
||||||
|
* exec.conf should be on their own apps
|
||||||
|
|||||||
@@ -64,8 +64,14 @@
|
|||||||
"SUPER, P, Toggle Preload, togglespecialworkspace, preload"
|
"SUPER, P, Toggle Preload, togglespecialworkspace, preload"
|
||||||
"SUPER CTRL, I, Switch Wallpaper, exec, hakase-wallpaper-switch"
|
"SUPER CTRL, I, Switch Wallpaper, exec, hakase-wallpaper-switch"
|
||||||
|
|
||||||
"SUPER, S, Toggle Special Workspace, togglespecialworkspace, custom"
|
# Screenshots
|
||||||
"SUPER + Shift, S, Move to Special Workspace, movetoworkspace, special:custom"
|
"SUPER, S, Screenshot Region (with edit), exec, screenshot region"
|
||||||
|
"SUPER SHIFT, S, Screenshot Active Window, exec, screenshot window"
|
||||||
|
"SUPER ALT SHIFT, S, Screenshot Current Monitor, exec, screenshot screen"
|
||||||
|
|
||||||
|
# Special workspace
|
||||||
|
"SUPER, U, Toggle Special Workspace, togglespecialworkspace, custom"
|
||||||
|
"SUPER SHIFT, U, Move to Special Workspace, movetoworkspace, special:custom"
|
||||||
|
|
||||||
# [Workspaces] Toggle between most recent workspaces
|
# [Workspaces] Toggle between most recent workspaces
|
||||||
"SUPER, Tab, Cycle workspaces, workspace, previous"
|
"SUPER, Tab, Cycle workspaces, workspace, previous"
|
||||||
|
|||||||
@@ -0,0 +1,45 @@
|
|||||||
|
{pkgs, ...}: let
|
||||||
|
# Screenshot script with swappy integration
|
||||||
|
screenshot = pkgs.writeShellScriptBin "screenshot" ''
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
region)
|
||||||
|
# Select region and edit
|
||||||
|
grim -g "$(slurp)" - | swappy -f -
|
||||||
|
;;
|
||||||
|
window)
|
||||||
|
# Screenshot active window
|
||||||
|
grim -g "$(hyprctl -j activewindow | jq -r '"\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"')" - | swappy -f -
|
||||||
|
;;
|
||||||
|
screen)
|
||||||
|
# Screenshot current monitor
|
||||||
|
grim -o "$(hyprctl -j monitors | jq -r '.[] | select(.focused) | .name')" - | swappy -f -
|
||||||
|
;;
|
||||||
|
all)
|
||||||
|
# Screenshot all monitors
|
||||||
|
grim - | swappy -f -
|
||||||
|
;;
|
||||||
|
region-save)
|
||||||
|
# Quick region screenshot (save without editing)
|
||||||
|
grim -g "$(slurp)" ~/Pictures/Screenshots/$(date +'%Y-%m-%d_%H-%M-%S.png')
|
||||||
|
notify-send "Screenshot saved" "Saved to ~/Pictures/Screenshots/"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: screenshot {region|window|screen|all|region-save}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
'';
|
||||||
|
in {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
grim # Screenshot utility
|
||||||
|
slurp # Region selector
|
||||||
|
swappy # Annotation tool
|
||||||
|
jq # For window selection
|
||||||
|
screenshot # Our wrapper script
|
||||||
|
];
|
||||||
|
|
||||||
|
# Create Screenshots directory
|
||||||
|
home.file."Pictures/Screenshots/.keep".text = "";
|
||||||
|
}
|
||||||
@@ -5,6 +5,7 @@
|
|||||||
../../apps/firefox
|
../../apps/firefox
|
||||||
../../apps/loupe
|
../../apps/loupe
|
||||||
../../apps/mako
|
../../apps/mako
|
||||||
|
../../apps/screenshot
|
||||||
# ../../apps/starship
|
# ../../apps/starship
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user