Script for cliboard merging.
This commit is contained in:
parent
9930348155
commit
ff8222fc6f
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
_desktop/qutebrowser/bookmarks/urls
|
||||
_desktop/qutebrowser/quickmarks
|
||||
_desktop/clipboard/selection
|
||||
|
21
_desktop/clipboard/clipboard/run
Executable file
21
_desktop/clipboard/clipboard/run
Executable 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
|
0
_desktop/clipboard/clipboard/supervise/lock
Normal file
0
_desktop/clipboard/clipboard/supervise/lock
Normal file
1
_desktop/clipboard/clipboard/supervise/pid
Normal file
1
_desktop/clipboard/clipboard/supervise/pid
Normal file
@ -0,0 +1 @@
|
||||
23923
|
1
_desktop/clipboard/clipboard/supervise/stat
Normal file
1
_desktop/clipboard/clipboard/supervise/stat
Normal file
@ -0,0 +1 @@
|
||||
run
|
BIN
_desktop/clipboard/clipboard/supervise/status
Normal file
BIN
_desktop/clipboard/clipboard/supervise/status
Normal file
Binary file not shown.
21
_desktop/clipboard/primary/run
Executable file
21
_desktop/clipboard/primary/run
Executable 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
|
0
_desktop/clipboard/primary/supervise/lock
Normal file
0
_desktop/clipboard/primary/supervise/lock
Normal file
1
_desktop/clipboard/primary/supervise/pid
Normal file
1
_desktop/clipboard/primary/supervise/pid
Normal file
@ -0,0 +1 @@
|
||||
23922
|
1
_desktop/clipboard/primary/supervise/stat
Normal file
1
_desktop/clipboard/primary/supervise/stat
Normal file
@ -0,0 +1 @@
|
||||
run
|
BIN
_desktop/clipboard/primary/supervise/status
Normal file
BIN
_desktop/clipboard/primary/supervise/status
Normal file
Binary file not shown.
21
_desktop/clipboard/secondary/run
Executable file
21
_desktop/clipboard/secondary/run
Executable 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
|
0
_desktop/clipboard/secondary/supervise/lock
Normal file
0
_desktop/clipboard/secondary/supervise/lock
Normal file
1
_desktop/clipboard/secondary/supervise/pid
Normal file
1
_desktop/clipboard/secondary/supervise/pid
Normal file
@ -0,0 +1 @@
|
||||
23921
|
1
_desktop/clipboard/secondary/supervise/stat
Normal file
1
_desktop/clipboard/secondary/supervise/stat
Normal file
@ -0,0 +1 @@
|
||||
run
|
BIN
_desktop/clipboard/secondary/supervise/status
Normal file
BIN
_desktop/clipboard/secondary/supervise/status
Normal file
Binary file not shown.
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user