From c3d29f2e1206c1b9f038e3f8adf2325996b14d0a Mon Sep 17 00:00:00 2001 From: Kjetil Orbekk Date: Sun, 24 Apr 2022 10:21:39 -0400 Subject: add mouse button bindings --- desktop/.xsession | 1 + direnv/.config/direnv/direnvrc | 2 +- setup.sh | 7 +++++-- xbindkeys/.xbindkeysrc | 25 +++++++++++++------------ 4 files changed, 20 insertions(+), 15 deletions(-) diff --git a/desktop/.xsession b/desktop/.xsession index 3ce18d4..8cb1315 100755 --- a/desktop/.xsession +++ b/desktop/.xsession @@ -29,6 +29,7 @@ xset -b dzen2 -dock -x 0 -h 24 -e 'onstart=lower' -bg '#252526' -p & conky | dzen2 -dock -geometry 800x24-950+0 -expand left -fn "WenQuanYi Micro Hei-16" -ta r -bg '#252526' -fg '#f4f4f4' & trayer --edge top --align right --SetDockType true --SetPartialStrut true --expand true --width 100 --widthtype pixel --transparent true --height 24 --tint 0x252526 --alpha 0 & +xbindkeys [[ -f /etc/nixos/configuration.nix ]] || \ redshift -l 40:-70 -r -t 5500:3700 & diff --git a/direnv/.config/direnv/direnvrc b/direnv/.config/direnv/direnvrc index 33f32b9..404fb59 100755 --- a/direnv/.config/direnv/direnvrc +++ b/direnv/.config/direnv/direnvrc @@ -8,5 +8,5 @@ use_nix-shell() { watch_file $1 mkdir -p $(direnv_layout_dir) profile="$(direnv_layout_dir)/shell-profile" - eval "nix print-dev-env --profile $profile --impure --file $1" + eval "$(nix print-dev-env --profile $profile --impure --file $1)" } diff --git a/setup.sh b/setup.sh index 8a6bda5..81a667d 100755 --- a/setup.sh +++ b/setup.sh @@ -12,6 +12,7 @@ touch ~/.zshenv.local $STOW common $STOW zsh $STOW direnv +$STOW xbindkeys touch $HOME/.zshrc.local source $HOME/.zshenv @@ -49,8 +50,10 @@ tools=( zoxide rofi # for emacs everywhere - xorg.xwininfo - xorg.xclip + xwininfo + xclip + xbindkeys + xvkbd ) for tool in "${tools[@]}"; do if ! type "$tool" &>/dev/null; then diff --git a/xbindkeys/.xbindkeysrc b/xbindkeys/.xbindkeysrc index 90bd105..a4bd883 100644 --- a/xbindkeys/.xbindkeysrc +++ b/xbindkeys/.xbindkeysrc @@ -38,18 +38,6 @@ #keystate_scrolllock= enable # Examples of commands: - -"xbindkeys_show" - control+shift + q - -# set directly keycode (here control + f with my keyboard) -"xterm" - c:41 + m:0x4 - -# specify a mouse button -"xterm" - control + b:2 - #"xterm -geom 50x20+20+20" # Shift+Mod2+alt + s # @@ -65,6 +53,19 @@ #"rxvt" # Control + b:2 + Release +"xdotool mousedown 1" + KP_End +"xdotool mouseup 1" + Release+KP_End +"xdotool mousedown 2" + KP_Down +"xdotool mouseup 2" + Release+KP_Down +"xdotool mousedown 3" + KP_Next +"xdotool mouseup 3" + Release+KP_Next + ################################## # End of xbindkeys configuration # ################################## -- cgit v1.2.3