瀏覽代碼

xprograms: make rightclick emulate function do not depend on another script

pull/1/head
10sr 10 年之前
父節點
當前提交
32f35e4176
共有 1 個文件被更改,包括 11 次插入4 次删除
  1. +11
    -4
      xprograms

+ 11
- 4
xprograms 查看文件

@@ -86,11 +86,18 @@ _xsslock(){
(sleep 3s && xss-lock -- xscreensaver-command -lock) &
}

_mac_rightclick(){
if ! sh /usr/local/bin/rightbutton_emulate.sh --check
_macbook_rightclick(){
_mrc_emutgt=dev.mac_hid.mouse_button_emulation
_mrc_codetgt=dev.mac_hid.mouse_button3_keycode

if test "`sysctl -n $_mrc_emutgt`" = 1 -a "`sysctl -n $_mrc_codetgt`" = 126
then
(sleep 3s && \
gksudo sh /usr/local/bin/rightbutton_emulate.sh >/dev/null) &
# nothing to do
true
else
(sleep 2s && \
gksudo -- sh -c "sysctl ${_mrc_emutgt}=1 ${_mrc_codetgt}=126 | \
logger -t macbook_rightclick") &
fi
}



Loading…
取消
儲存