Wayland clipshot?

This commit is contained in:
Daniel Flanagan 2020-03-24 14:11:38 -05:00
parent 616099b54d
commit a07b3e6f63
Signed by: lytedev
GPG key ID: 5B2020A0F9921EF4
6 changed files with 24 additions and 11 deletions

View file

@ -19,6 +19,7 @@ export WLC_REPEAT_RATE=60
export QT_QPA_PLATFORM=wayland-egl
export CLUTTER_BACKEND=wayland
export SDL_VIDEODRIVER=wayland
# export GDK_BACKEND=wayland # DON'T SET THIS ONE
export MOZ_ENABLE_WAYLAND=1
# configuration flag for some of my dotfiles scripts

View file

@ -98,7 +98,7 @@
//"format-bluetooth-muted": " {icon} {format_source}",
//"format-muted": " {format_source}",
"format-muted": "<span foreground=\"#666666\"></span> {format_source}",
"format-source": "<span foreground=\"#666666\"> </span>",
"format-source": "<span foreground=\"#666666\"></span>",
"format-source-muted": "<span foreground=\"#666666\"></span>",
"format-icons": {
"headphones": "",

View file

@ -1,11 +1,15 @@
#!/usr/bin/env bash
pkill unclutter
sleep 0.1
import ~/.ss.png
chmod 700 ~/.ss.png
< ~/.ss.png xclip -t image/png -i -selection clipboard
< ~/.ss.png xclip -t image/png -i -selection primary
< ~/.ss.png xclip -t image/png -i -selection secondary
< ~/.ss.png xclip -t image/png -i -selection buffer-cut
unclutter &
if is_wayland; then
grim -g "$(slurp -d)" - | wl-copy
else
pkill unclutter
sleep 0.1
import ~/.ss.png
chmod 700 ~/.ss.png
< ~/.ss.png xclip -t image/png -i -selection clipboard
< ~/.ss.png xclip -t image/png -i -selection primary
< ~/.ss.png xclip -t image/png -i -selection secondary
< ~/.ss.png xclip -t image/png -i -selection buffer-cut
unclutter &
fi

3
bin/is_wayland Executable file
View file

@ -0,0 +1,3 @@
#!/usr/bin/env bash
(test -z "$DISPLAY" || test -n "$WAYLAND_DISPLAY" || test -n "$SWAYSOCK" || test "$IS_WAYLAND" -eq 1)

View file

@ -40,6 +40,7 @@ pacaur --needed -S \
wlroots-git sway-git `# Wayland Compositor` \
swaylock `# Wayland Compositor` \
waybar mako `# Wayland Bar & Notifications` \
slurp grim `# Wayland Screen Selection & Clipping` \
wl-clipboard `# Wayland Clipboard CLI` \
terminus-font ttf-iosevka-type ttf-iosevka-term `# Primary Fonts` \
ttf-font-awesome `# Icon Font` \

View file

@ -75,14 +75,18 @@ Here are some bullet points on my workflow:
## To Do and Improvements
+ Wayland stuff
+ Sway hotkey parity (as much as is possible) with sxhkd/bspwm
+ Clean out all the X11 cruft?
* Add vim in the terminal as the handler for many MIME types (xdg-open and such)
for the rare time I'm in a file manager or for opening easily from
the browser.
* Unify all the common variables... somehow? (and use templates and `envsubst`?)
* Makefile instead of setup script
* [Vimux](https://github.com/benmills/vimux)?
* Nerd Fonts with ligatures and icons for Kitty
* Custom Iosevka font with kitty-compatible ligatures
* Setup network file sharing directory
+ Investigate some systemd services (homed,
[upstream]: https://git.faceless.lytedev.io/lytedev/dotfiles