From 943b189141013b992e066e6c1f2c1376c04af569 Mon Sep 17 00:00:00 2001 From: Massaki Archambault Date: Thu, 4 Apr 2019 17:44:39 -0400 Subject: [PATCH] cleanup jq, sway config --- files/.config/sway/config | 8 ++++++-- files/.local/bin/get-focused-window-properties | 2 +- files/.local/bin/sshot | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/files/.config/sway/config b/files/.config/sway/config index 439a245..714f585 100644 --- a/files/.config/sway/config +++ b/files/.config/sway/config @@ -47,10 +47,14 @@ smart_gaps on # Floating mod for_window [app_id="pavucontrol"] floating enable -for_window [class="Remmina" title="Remmina Remote Desktop Client"] floating enable -for_window [class="feh"] floating enable +for_window [app_id="org.remmina.Remmina" title="Remmina Remote Desktop Client"] floating enable for_window [class="TeamViewer"] floating enable +for_window [class="feh" title="Pinned screenshot"] { + floating enable + sticky enable +} + for_window [window_type="dialog"] floating enable for_window [window_type="utility"] floating enable for_window [window_type="toolbar"] floating enable diff --git a/files/.local/bin/get-focused-window-properties b/files/.local/bin/get-focused-window-properties index 4828e1d..c42ac84 100755 --- a/files/.local/bin/get-focused-window-properties +++ b/files/.local/bin/get-focused-window-properties @@ -1,3 +1,3 @@ #!/bin/bash -swaymsg -t get_tree | jq --raw-output '..|if .focused? == true then . else empty end' +swaymsg -t get_tree | jq --raw-output '..|select(.focused? == true)' diff --git a/files/.local/bin/sshot b/files/.local/bin/sshot index d814746..e5523ee 100755 --- a/files/.local/bin/sshot +++ b/files/.local/bin/sshot @@ -33,7 +33,7 @@ wl-copy < "$file" if [[ -n "$ARG_PIN" ]]; then # pin the screenshot - feh --geometry "$(echo -n "$geometry" | sed -E 's/([0-9]+),([0-9]+) ([0-9]+)x([0-9]+)/\3x\4+\1+\2/')" "$file" & + feh --title "Pinned screenshot" --geometry "$(echo -n "$geometry" | sed -E 's/([0-9]+),([0-9]+) ([0-9]+)x([0-9]+)/\3x\4+\1+\2/')" "$file" & fi # print the file name