Skip to content

Commit

Permalink
Clipboard fixes, switch to xsel
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxattax97 committed Aug 16, 2024
1 parent 579b3b6 commit 2d5797c
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .tmux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ set -g @net_speed_format "󰁆 %8s 󰁞 %8s"
set -g @yank_selection 'clipboard' # or 'primary' or 'secondary'
set -g @yank_selection_mouse 'clipboard' # or 'primary' or 'secondary'
set -g @yank_action 'copy-pipe' # or 'copy-pipe-and-cancel' for the default
set -g @yank_with_mouse on # or 'on'
set -g @yank_with_mouse on # or 'off'

# Sensible: Fix the colors.
#set -g default-terminal "xterm-256color"
Expand Down
17 changes: 17 additions & 0 deletions .zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -1475,6 +1475,23 @@ zshrc_load_library() {
fi
done
}
clipboards() {
if [ -x "$(command -v xsel)" ]; then
echo "xsel:"
echo "Primary: \"$(xsel --output --primary)\""
echo "Secondary: \"$(xsel --output --secondary)\""
echo "Clipboard: \"$(xsel --output --clipboard)\""
fi
if [ -x "$(command -v xclip)" ]; then
echo "\nxclip:"
echo "Primary: \"$(xclip -out -selection primary)\""
echo "Secondary: \"$(xclip -out -selection secondary)\""
echo "Clipboard: \"$(xclip -out -selection clipboard)\""
echo "Buffer-cut: \"$(xclip -out -selection buffer-cut)\""
fi
}
}
zshrc_set_aliases() {
Expand Down
2 changes: 1 addition & 1 deletion archiso/10-archiso.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ echo "Mount up"
#ls /mnt

echo "Install base packages"
pacstrap /mnt base linux-lts linux-lts-headers linux-firmware e2fsprogs lvm2 cryptsetup iproute2 networkmanager neovim man-db man-pages texinfo git tmux zsh htop curl ripgrep python nodejs xclip weechat newsboat neofetch chezmoi efivars zram-generator sudo reflector rsync base-devel dkms xorg xorg-server xorg-apps xorg-init xorg-twm xorg-xclock xterm wget unzip zip python python-pip rubygems chromium firefox vulcan-icd-loader vulkan-tools xdg-user-dirs thermald ethtool smartmontools gsmartcontrol pipewire wireplumber helvum pipewire-jack pipewire-alsa pipewire-pulse xdg-desktop-portal xdg-desktop-portal-gtk util-linux chrony
pacstrap /mnt base linux-lts linux-lts-headers linux-firmware e2fsprogs lvm2 cryptsetup iproute2 networkmanager neovim man-db man-pages texinfo git tmux zsh htop curl ripgrep python nodejs xsel weechat newsboat neofetch chezmoi efivars zram-generator sudo reflector rsync base-devel dkms xorg xorg-server xorg-apps xorg-init xorg-twm xorg-xclock xterm wget unzip zip python python-pip rubygems chromium firefox vulcan-icd-loader vulkan-tools xdg-user-dirs thermald ethtool smartmontools gsmartcontrol pipewire wireplumber helvum pipewire-jack pipewire-alsa pipewire-pulse xdg-desktop-portal xdg-desktop-portal-gtk util-linux chrony
pacstrap /mnt tlp
pacstrap /mnt amd-ucode
pacstrap /mnt intel-ucode xf86-video-intel mesa
Expand Down
12 changes: 6 additions & 6 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ case "$response" in
tmux \
util-linux-user \
weechat \
xclip \
xsel \
zsh
elif [[ -x "$(command -v brew)" ]]; then
# macOS has outdated version of curl, make, binutils, gcc
Expand Down Expand Up @@ -226,7 +226,7 @@ case "$response" in
ripgrep \
tmux \
weechat \
xclip \
xsel \
zsh
elif [[ -x "$(command -v apt)" ]]; then
# NOTE: On slightly older versions of Debian/Ubuntu awscli is v1, not v2!
Expand Down Expand Up @@ -255,7 +255,7 @@ case "$response" in
ruby-rubygems \
tmux \
weechat \
xclip \
xsel \
zsh
elif [[ -x "$(command -v pacman)" ]]; then
sudo pacman -Syu --needed "$AUTOMATED_PACMAN_FLAGS" \
Expand Down Expand Up @@ -283,7 +283,7 @@ case "$response" in
rubygems \
tmux \
weechat \
xclip \
xsel \
zsh

if [[ -x "$(command -v yay)" ]]; then
Expand Down Expand Up @@ -319,7 +319,7 @@ case "$response" in
ruby \
tmux \
weechat \
xclip \
xsel \
zsh

# TODO: Install awscli v2 on BSD
Expand Down Expand Up @@ -999,7 +999,7 @@ case "$response" in
ssh-add "${HOME}/.ssh/id_rsa"
fi

xclip -sel clip < "${HOME}/.ssh/id_rsa.pub" && echo "Key copied to clipboard"
xsel --clipboard -i < "${HOME}/.ssh/id_rsa.pub" && echo "Key copied to clipboard"
cat "${HOME}/.ssh/id_rsa.pub"
;;
*)
Expand Down

0 comments on commit 2d5797c

Please sign in to comment.