Compare commits
No commits in common. "493e552cded3429d9be36220e3ebc9fddaf6c241" and "3b4620a79a533f3c44b01033d71c5efaa0bc7419" have entirely different histories.
493e552cde
...
3b4620a79a
3 changed files with 0 additions and 61 deletions
|
@ -41,7 +41,6 @@ with lib; let
|
||||||
vrr = config.home-manager.users.${config.custom.username}.home.file.".local/bin/vrr".source;
|
vrr = config.home-manager.users.${config.custom.username}.home.file.".local/bin/vrr".source;
|
||||||
walker = "${config.home-manager.users.${config.custom.username}.programs.walker.package}/bin/walker";
|
walker = "${config.home-manager.users.${config.custom.username}.programs.walker.package}/bin/walker";
|
||||||
waydroid = "${pkgs.waydroid}/bin/waydroid";
|
waydroid = "${pkgs.waydroid}/bin/waydroid";
|
||||||
window = config.home-manager.users.${config.custom.username}.home.file.".local/bin/window".source;
|
|
||||||
zoom = config.home-manager.users.${config.custom.username}.home.file.".local/bin/zoom".source;
|
zoom = config.home-manager.users.${config.custom.username}.home.file.".local/bin/zoom".source;
|
||||||
|
|
||||||
cfg = config.custom.desktops.hyprland.binds;
|
cfg = config.custom.desktops.hyprland.binds;
|
||||||
|
@ -174,14 +173,6 @@ in {
|
||||||
"--workspace special:pip"
|
"--workspace special:pip"
|
||||||
]))
|
]))
|
||||||
(key "Space" "Super" "togglespecialworkspace" "scratchpad")
|
(key "Space" "Super" "togglespecialworkspace" "scratchpad")
|
||||||
(key "Space" "Super+Ctrl+Shift" "exec" (with config.custom;
|
|
||||||
concatStringsSep " " [
|
|
||||||
"${window} move"
|
|
||||||
"--current"
|
|
||||||
"--property title"
|
|
||||||
"'^Picture.in.[Pp]icture$'"
|
|
||||||
"${toString (gap + border)},${toString (gap + border)}"
|
|
||||||
]))
|
|
||||||
(key "Space" "Super+Shift" "movetoworkspacesilent" "special:scratchpad")
|
(key "Space" "Super+Shift" "movetoworkspacesilent" "special:scratchpad")
|
||||||
(key "Tab" "Super" "cyclenext" "tiled")
|
(key "Tab" "Super" "cyclenext" "tiled")
|
||||||
(key "Tab" "Super+Shift" "alterzorder" "top")
|
(key "Tab" "Super+Shift" "alterzorder" "top")
|
||||||
|
|
|
@ -175,11 +175,6 @@ in {
|
||||||
swww
|
swww
|
||||||
tailscale
|
tailscale
|
||||||
])
|
])
|
||||||
(bash "window" [
|
|
||||||
argc
|
|
||||||
hyprland
|
|
||||||
jq
|
|
||||||
])
|
|
||||||
(bash "zoom" [
|
(bash "zoom" [
|
||||||
argc
|
argc
|
||||||
bc
|
bc
|
||||||
|
|
|
@ -1,47 +0,0 @@
|
||||||
#! /usr/bin/env bash
|
|
||||||
|
|
||||||
# @describe Wrapper for switching between window geometries
|
|
||||||
#
|
|
||||||
# https://github.com/sigoden/argc
|
|
||||||
|
|
||||||
# @meta combine-shorts
|
|
||||||
|
|
||||||
_default_file() {
|
|
||||||
echo "/tmp/window.move"
|
|
||||||
}
|
|
||||||
|
|
||||||
# @cmd Move window to and from specified location, requires floating
|
|
||||||
# @alias m,mo,mov
|
|
||||||
# @arg window! Window to switch, in regex
|
|
||||||
# @arg to*, X,Y position to move to
|
|
||||||
# @arg from*, X,Y position to move from
|
|
||||||
# @option -f --file=`_default_file` File to save current window position
|
|
||||||
# @option -p --property=class Property to match window, such as class or title
|
|
||||||
# @flag -c --current Use current window position to move from
|
|
||||||
move() {
|
|
||||||
window="${argc_property:-}:${argc_window:-}"
|
|
||||||
|
|
||||||
# Get current position
|
|
||||||
position="$(hyprctl -j clients | jq -r ".[] | select(.${argc_property:-} | test(\"${argc_window:-}\")).at")" # [X,Y]
|
|
||||||
|
|
||||||
if [[ "${argc_current:-}" ]]; then
|
|
||||||
if [[ -f "${argc_file:-}" ]]; then
|
|
||||||
# Pop saved position
|
|
||||||
argc_from[0]="$(jq ".[0]" "${argc_file:-}")"
|
|
||||||
argc_from[1]="$(jq ".[1]" "${argc_file:-}")"
|
|
||||||
rm --force "${argc_file:-}"
|
|
||||||
else
|
|
||||||
# Save current position
|
|
||||||
echo "$position" > "${argc_file:-}"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Switch between specified positions
|
|
||||||
if [[ "$(echo "$position" | jq .[0])" == "${argc_to[0]:-}" ]] && [[ "$(echo "$position" | jq .[1])" == "${argc_to[1]:-}" ]]; then
|
|
||||||
hyprctl dispatch movewindowpixel exact "${argc_from[0]:-}" "${argc_from[1]:-}","$window"
|
|
||||||
else
|
|
||||||
hyprctl dispatch movewindowpixel exact "${argc_to[0]:-}" "${argc_to[1]:-}","$window"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
eval "$(argc --argc-eval "$0" "$@")"
|
|
Loading…
Add table
Reference in a new issue