dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit e10637bcda48f39bac2142c0bc0c63c6ea77223a
parent 49d83c02d9dc2cbefc229bd0aa4e8cbe18c9def3
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Mon,  7 Jan 2019 11:10:19 +0100

Add bindings and commands for clipboard

Diffstat:
Mlinks/.config/i3/config | 6+++++-
Alinks/bin/showclip | 15+++++++++++++++
2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/links/.config/i3/config b/links/.config/i3/config @@ -70,7 +70,7 @@ bindsym $mod+e exec $term -e vim bindsym $mod+m exec $term -e ~/bin/tmux-mutt.sh bindsym $mod+r exec $term -e ~/bin/tmux-newsboat.sh bindsym $mod+c exec $term -e calcurse -bindsym $mod+Shift+c exec $term -e ~/bin/google-cloud-lamps-instance1-ssh.sh +#bindsym $mod+Shift+c exec $term -e ~/bin/google-cloud-lamps-instance1-ssh.sh bindsym $mod+i exec $term -e htop bindsym $mod+y exec $term -e youtube-viewer bindsym $mod+Mod1+y exec $term -e youtube-viewer --novideo @@ -81,6 +81,10 @@ bindsym $mod+Shift+w exec tor-browser bindsym Mod1+Mod4+l exec --no-startup-id ~/bin/keyboard-layout-switch.sh && pkill -RTMIN+3 i3blocks bindsym $mod+n exec $term -e ranger +# clipboard commands +bindsym $mod+Mod1+c exec --no-startup-id ~/bin/showclip +bindsym $mod+Shift+c exec --no-startup-id ~/bin/xcqr + # volume control with alsamixer #bindsym XF86AudioRaiseVolume exec --no-startup-id amixer set Master 3%+ unmute && pkill -RTMIN+4 i3blocks #bindsym XF86AudioLowerVolume exec --no-startup-id amixer set Master 3%- unmute && pkill -RTMIN+4 i3blocks diff --git a/links/bin/showclip b/links/bin/showclip @@ -0,0 +1,15 @@ +#!/bin/sh + +# Display contents of selection via dunst if running. +# Separate script for i3. + +! pgrep -x dunst >/dev/null && echo "dunst not running." && exit + +clip=$(xclip -o -selection clipboard) + +prim=$(xclip -o -selection primary) + +[ "$clip" != "" ] && notify-send "<b>Clipboard:</b> +$clip" +[ "$prim" != "" ] && notify-send "<b>Primary:</b> +$prim"