Script for cliboard merging.

This commit is contained in:
Bartek Stalewski 2021-10-07 22:54:37 +02:00
parent 9930348155
commit ff8222fc6f
17 changed files with 75 additions and 1 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
_desktop/qutebrowser/bookmarks/urls
_desktop/qutebrowser/quickmarks
_desktop/clipboard/selection

View File

@ -0,0 +1,21 @@
#!/bin/sh
set -e
exec 2>&1
SEL="../selection"
# "xsel --nodetach --input" with an empty input will still exit immediately,
# so we need to make sure the selection never is empty:
[ -s "$SEL" ] || echo >| "$SEL"
xsel --nodetach --logfile /dev/stdout --"$(basename "`pwd`")" \
--input < "$SEL"
# something else grabbed the selection. pull it over here:
xsel --nodetach --logfile /dev/stdout --"$(basename "`pwd`")" \
--output > "$SEL".new
# see above:
[ -s "$SEL" ] || echo >| "$SEL"
mv "$SEL".new "$SEL"
sv term ../primary ../secondary ../clipboard

View File

@ -0,0 +1 @@
23923

View File

@ -0,0 +1 @@
run

Binary file not shown.

21
_desktop/clipboard/primary/run Executable file
View File

@ -0,0 +1,21 @@
#!/bin/sh
set -e
exec 2>&1
SEL="../selection"
# "xsel --nodetach --input" with an empty input will still exit immediately,
# so we need to make sure the selection never is empty:
[ -s "$SEL" ] || echo >| "$SEL"
xsel --nodetach --logfile /dev/stdout --"$(basename "`pwd`")" \
--input < "$SEL"
# something else grabbed the selection. pull it over here:
xsel --nodetach --logfile /dev/stdout --"$(basename "`pwd`")" \
--output > "$SEL".new
# see above:
[ -s "$SEL" ] || echo >| "$SEL"
mv "$SEL".new "$SEL"
sv term ../primary ../secondary ../clipboard

View File

@ -0,0 +1 @@
23922

View File

@ -0,0 +1 @@
run

Binary file not shown.

View File

@ -0,0 +1,21 @@
#!/bin/sh
set -e
exec 2>&1
SEL="../selection"
# "xsel --nodetach --input" with an empty input will still exit immediately,
# so we need to make sure the selection never is empty:
[ -s "$SEL" ] || echo >| "$SEL"
xsel --nodetach --logfile /dev/stdout --"$(basename "`pwd`")" \
--input < "$SEL"
# something else grabbed the selection. pull it over here:
xsel --nodetach --logfile /dev/stdout --"$(basename "`pwd`")" \
--output > "$SEL".new
# see above:
[ -s "$SEL" ] || echo >| "$SEL"
mv "$SEL".new "$SEL"
sv term ../primary ../secondary ../clipboard

View File

@ -0,0 +1 @@
23921

View File

@ -0,0 +1 @@
run

Binary file not shown.

View File

@ -4,11 +4,15 @@
mkdir -p ~/.config ~/.local/bin ~/.local/settings
# link config
for i in clipit dunst fontconfig rofi zathura; do
for i in dunst fontconfig rofi zathura; do
rm -rf ~/.config/${i}
ln -sf ~/.local/repos/dotfiles/_desktop/${i} ~/.config
done
# link clibpoard hack
rm -rf ~/.local/bin/clipboard
ln -sf ~/.local/repos/dotfiles/_desktop/clipboard ~/.local/bin/clipboard
# copy firefox wrapper
ln -sf ~/.local/repos/dotfiles/_desktop/firefox ~/.local/bin