remove(wallpapers): redundancies
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
{pkgs, ...}: {
|
||||
# TODO: implement a way to show binds, preferably use vicinae.
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
bindel = [
|
||||
", XF86MonBrightnessUp, exec, ddcutil setvcp 10 + 10"
|
||||
|
||||
@@ -1,16 +1,12 @@
|
||||
{pkgs, ...}: let
|
||||
hakase-workspace-switch-force = pkgs.writeShellScriptBin "hakase-workspace-switch-force" ''
|
||||
# Define binary paths to ensure they work regardless of environment PATH
|
||||
HYPRCTL="${pkgs.hyprland}/bin/hyprctl"
|
||||
JQ="${pkgs.jq}/bin/jq"
|
||||
|
||||
# Get the special workspace name
|
||||
special_workspace=$($HYPRCTL monitors -j | $JQ -r '.[] | select(.focused) | .specialWorkspace.name')
|
||||
|
||||
# Strip the "special:" prefix (Nix escape: ''${var#*:})
|
||||
workspace_name=''${special_workspace#*:}
|
||||
|
||||
# Get the target workspace number from argument
|
||||
chosen_workspace_num=$1
|
||||
|
||||
if [[ -z ''${chosen_workspace_num} ]]; then
|
||||
@@ -18,14 +14,11 @@
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if we are actually in a special workspace
|
||||
if [[ "''${special_workspace}" == *"special"* ]]; then
|
||||
echo "[LOG] workspace is ''${special_workspace}"
|
||||
|
||||
# Toggle the special workspace OFF
|
||||
$HYPRCTL dispatch togglespecialworkspace "''${workspace_name}"
|
||||
|
||||
# Switch to the requested normal workspace
|
||||
$HYPRCTL dispatch workspace "''${chosen_workspace_num}"
|
||||
else
|
||||
echo "[LOG] workspace is not special"
|
||||
|
||||
+14
-19
@@ -1,31 +1,28 @@
|
||||
{pkgs, ...}: let
|
||||
# Screenshot script with swappy integration
|
||||
# Screenshot script using grimblast (Hyprland-native)
|
||||
screenshot = pkgs.writeShellScriptBin "screenshot" ''
|
||||
#!/usr/bin/env bash
|
||||
|
||||
case "$1" in
|
||||
region)
|
||||
# Select region and edit
|
||||
grim -g "$(slurp)" - | swappy -f -
|
||||
grimblast --freeze save area - | swappy -f -
|
||||
;;
|
||||
window)
|
||||
# Screenshot active window
|
||||
grim -g "$(hyprctl -j activewindow | jq -r '"\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"')" - | swappy -f -
|
||||
# Screenshot active window and edit
|
||||
grimblast --freeze save active - | swappy -f -
|
||||
;;
|
||||
screen)
|
||||
# Screenshot current monitor
|
||||
grim -o "$(hyprctl -j monitors | jq -r '.[] | select(.focused) | .name')" - | swappy -f -
|
||||
# Screenshot current monitor and edit
|
||||
grimblast save output - | swappy -f -
|
||||
;;
|
||||
all)
|
||||
# Screenshot all monitors
|
||||
grim - | swappy -f -
|
||||
# Screenshot all monitors and edit
|
||||
grimblast save screen - | swappy -f -
|
||||
;;
|
||||
region-save)
|
||||
# Quick region screenshot (save without editing and copy to clipboard)
|
||||
filepath=~/Pictures/Screenshots/$(date +'%Y-%m-%d_%H-%M-%S.png')
|
||||
grim -g "$(slurp)" "$filepath"
|
||||
wl-copy < "$filepath"
|
||||
notify-send "Screenshot saved" "Saved and copied to clipboard"
|
||||
# Quick region screenshot (save and copy to clipboard)
|
||||
grimblast --freeze --notify copysave area ~/Pictures/Screenshots/$(date +'%Y-%m-%d_%H-%M-%S.png')
|
||||
;;
|
||||
*)
|
||||
echo "Usage: screenshot {region|window|screen|all|region-save}"
|
||||
@@ -35,12 +32,10 @@
|
||||
'';
|
||||
in {
|
||||
home.packages = with pkgs; [
|
||||
grim # Screenshot utility
|
||||
slurp # Region selector
|
||||
swappy # Annotation tool
|
||||
jq # For window selection
|
||||
wl-clipboard # For copying to clipboard
|
||||
screenshot # Our wrapper script
|
||||
grimblast # Hyprland screenshot utility
|
||||
swappy # Annotation tool
|
||||
wl-clipboard # For clipboard operations
|
||||
screenshot # Our wrapper script
|
||||
];
|
||||
|
||||
# Create Screenshots directory
|
||||
|
||||
Reference in New Issue
Block a user