Add script to clear the clipboard (requires wl-clipboard) and add keybinding for it in sway config.

This commit is contained in:
the_4n0nym0u53 2021-12-22 15:27:03 +01:00
parent ae7045c12c
commit 3f0f59bdb2
No known key found for this signature in database
GPG key ID: 35EE09F5481049BB
4 changed files with 10 additions and 0 deletions

View file

@ -33,6 +33,7 @@ This configuration depends on the following packages:
- `sway-launcher-desktop`
- `waybar`
- `wireplumber`
- `wl-clipboard`
\* If you prefer `sudo`, then change all instances of `doas` to `sudo`. They're mainly in the sway config file and in my `autostart.sh` script.

View file

@ -5,6 +5,7 @@ echo -e "Creating the symlinks with stow..."
stow -t $HOME alacritty \
mako \
nvim \
scripts \
sway \
swaylock \
waybar
@ -12,6 +13,7 @@ stow -t $HOME alacritty \
sleep 1
echo -e "Making scripts executable..."
chmod +x scripts/.local/bin/clear-clipboard.sh
chmod +x sway/.config/sway/autostart.sh
chmod +x waybar/.config/waybar/ivpn-status.sh
chmod +x waybar/.config/waybar/ivpn-reconnect.sh

View file

@ -0,0 +1,4 @@
#!/bin/sh
wl-copy -c
wl-copy -pc

View file

@ -71,6 +71,9 @@ exec swayidle -w \
# Start your launcher
bindsym $mod+d exec $menu
# Clear the clipboard (make sure to have $HOME/.local/bin in your $PATH)
bindsym $mod+c exec clear-clipboard.sh
# Drag floating windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod.
# Despite the name, also works for non-floating windows.