Fix screensharing
This commit is contained in:
parent
169f0bcbba
commit
30ead683ec
|
@ -7,25 +7,22 @@ d="$(date +"%Y-%m-%d_%H-%M-%S")"
|
|||
fn="$SCROTS_PATH/clipshot_$d.png"
|
||||
mkdir -p "$SCROTS_PATH"
|
||||
|
||||
if is_wayland; then
|
||||
dim="$(slurp -d)"
|
||||
if [ $? -eq 0 ]; then
|
||||
dim="$(slurp -d -b \#00000066 -c \#ffffffff)"
|
||||
if [ "$?" -eq 0 ]; then
|
||||
grim -g "$dim" - | wl-copy -t image/png
|
||||
wl-paste -n > "$fn"
|
||||
echo "$fn"
|
||||
# grim -g "$dim" - | tee "$fn" | wl-copy -f
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
pkill unclutter
|
||||
sleep 0.1
|
||||
import "$fn"
|
||||
< "$fn" xclip -t image/png -i -selection clipboard
|
||||
< "$fn" xclip -t image/png -i -selection primary
|
||||
< "$fn" xclip -t image/png -i -selection secondary
|
||||
< "$fn" xclip -t image/png -i -selection buffer-cut
|
||||
unclutter &
|
||||
echo "$fn"
|
||||
exit 1
|
||||
fi
|
||||
set -x
|
||||
|
||||
# pkill unclutter
|
||||
# sleep 0.1
|
||||
# import "$fn"
|
||||
# < "$fn" xclip -t image/png -i -selection clipboard
|
||||
# < "$fn" xclip -t image/png -i -selection primary
|
||||
# < "$fn" xclip -t image/png -i -selection secondary
|
||||
# < "$fn" xclip -t image/png -i -selection buffer-cut
|
||||
# unclutter &
|
||||
# echo "$fn"
|
||||
|
|
|
@ -2,12 +2,14 @@
|
|||
monitor=,preferred,auto,auto
|
||||
monitor=DP-1,3840x2160@60,0x0,1.5,transform,3
|
||||
monitor=DP-2,3840x2160@60,5280x0,1.5,transform,3
|
||||
monitor=DP-3,3840x2160@120,1440x0,1,bitdepth,10
|
||||
monitor=DP-3,3840x2160@120,1440x0,1
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
||||
|
||||
# Execute your favorite apps at launch
|
||||
exec-once = firefox & wezterm & hyprpaper & mako & /usr/lib/polkit-kde-authentication-agent-1 & waybar & eww daemon & eww open-many bar & swayidle -w timeout 600 'notify-send "Locking in 30 seconds..."' timeout 630 'swaylock -f' timeout 660 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' before-sleep 'swaylock -f'
|
||||
exec-once = firefox & wezterm & hyprpaper & mako & /usr/lib/polkit-kde-authentication-agent-1 & waybar & eww daemon & eww open-many bar
|
||||
exec-once = swayidle -w timeout 600 'notify-send "Locking in 30 seconds..."' timeout 630 'swaylock -f' timeout 660 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' before-sleep 'swaylock -f'
|
||||
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
||||
|
||||
# source = ~/.config/hypr/myColors.conf
|
||||
|
||||
|
@ -182,6 +184,8 @@ bind = $mainMod SHIFT, 8, movetoworkspace, 8
|
|||
bind = $mainMod SHIFT, 9, movetoworkspace, 9
|
||||
bind = $mainMod SHIFT, 0, movetoworkspace, 10
|
||||
|
||||
bind = $mainMod SHIFT, S, exec, clipshot
|
||||
|
||||
# Scroll through existing workspaces with mainMod + scroll
|
||||
bind = $mainMod, mouse_down, workspace, e+1
|
||||
bind = $mainMod, mouse_up, workspace, e-1
|
||||
|
@ -189,3 +193,4 @@ bind = $mainMod, mouse_up, workspace, e-1
|
|||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
bindm = $mainMod, mouse:272, movewindow
|
||||
bindm = $mainMod, mouse:273, resizewindow
|
||||
|
||||
|
|
Reference in a new issue