Skip to content

Instantly share code, notes, and snippets.

@ver-1000000
Last active March 16, 2020 16:41
Show Gist options
  • Save ver-1000000/06b9328e462b8f57ed52362cb760479b to your computer and use it in GitHub Desktop.
Save ver-1000000/06b9328e462b8f57ed52362cb760479b to your computer and use it in GitHub Desktop.
xsetwacomを用いて、タブレットのマッピングをトグルで切り替えるrubyワンライナー
#! /usr/bin/env ruby
`xsetwacom list`.each_line { |e| `xsetwacom set "#{e.split[0..-5].join(' ')}" MapToOutput next` if e[/STYLUS|ERASER/] }
@ver-1000000
Copy link
Author

フツーにbashとかだけでやりたいんだけど誰か頼む

@ver-1000000
Copy link
Author

awesomeのrc.luaに以下のような設定を追加した。

awful.util.spawn("xsetwacom --set 'Wacom BambooFun 6x8 Pad pad' Button 1 'key +super +shift + tab'")
    awful.key({ modkey, "Shift"   }, "Tab", function() awful.util.spawn("toggle-tablet-monitors") end),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment