aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.config/kanshi/config2
-rwxr-xr-x.local/bin/power-menu-fuzzel.sh2
-rwxr-xr-x.local/bin/screenshot.sh7
3 files changed, 4 insertions, 7 deletions
diff --git a/.config/kanshi/config b/.config/kanshi/config
index c3d9fdb..d0f0f24 100644
--- a/.config/kanshi/config
+++ b/.config/kanshi/config
@@ -5,5 +5,5 @@ profile Laptop {
profile Dock {
output HDMI-A-1 position 0,0 mode 1920x1080
output eDP-1 position 1920,0 mode 1920x1080
- exec mmsg -d focusmon,HDMI-A-1
+ exec mmsg dispatch focusmon,HDMI-A-1
}
diff --git a/.local/bin/power-menu-fuzzel.sh b/.local/bin/power-menu-fuzzel.sh
index a182d31..f41a42a 100755
--- a/.local/bin/power-menu-fuzzel.sh
+++ b/.local/bin/power-menu-fuzzel.sh
@@ -37,6 +37,6 @@ case $chosen in
# $lock && WIP
;;
"$log_out")
- mmsg -d quit
+ mmsg dispatch quit
;;
esac
diff --git a/.local/bin/screenshot.sh b/.local/bin/screenshot.sh
index 8276f65..715e9d5 100755
--- a/.local/bin/screenshot.sh
+++ b/.local/bin/screenshot.sh
@@ -14,11 +14,8 @@ case $1 in
;;
focused-window)
# Take a screenshot of the focused window
- xpos=$(mmsg -o "$output" -x | grep "x" | awk '{print$2}')
- ypos=$(mmsg -o "$output" -x | grep "y" | awk '{print$2}')
- xsize=$(mmsg -o "$output" -x | grep "width" | awk '{print$2}')
- ysize=$(mmsg -o "$output" -x | grep "height" | awk '{print$2}')
- grim -g "$xpos"",""$ypos $xsize""x""$ysize" -t jpeg ~/Pictures/Screenshots/"$(date +%Y-%m-%d_%H-%m-%s)".jpg
+ geometry=$(mmsg get focusing-client | jq -r '"\(.x),\(.y) \(.width)x\(.height)"')
+ grim -g "$geometry" -t jpeg ~/Pictures/Screenshots/"$(date +%Y-%m-%d_%H-%m-%s)".jpg
;;
*)
# Take a screenshot of the currently focused output and save it into screenshots