diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-27 16:29:58 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-27 16:29:58 +0100 |
commit | 6cf0596af2aad885944df8d3b5a19e960147f565 (patch) | |
tree | 510b4903489e1e2ccc048521e5d936830955773b /.local | |
parent | db1311461fb46b005c664131deb2c0a8f4865fb1 (diff) |
translate `wacommode` notifications
Diffstat (limited to '.local')
-rwxr-xr-x | .local/share/bin/wacommode | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/.local/share/bin/wacommode b/.local/share/bin/wacommode index 3e8ff8a..2563895 100755 --- a/.local/share/bin/wacommode +++ b/.local/share/bin/wacommode @@ -11,25 +11,34 @@ defaults () { setwacom Rotate none } +notify() { + notify-send \ + --replace-id=99999 \ + --icon=/dev/null \ + --expire-time=1000 \ + -- \ + 'ワコム' "$*" +} + SCREEN_1_GEOMETRY="$(xrandr -q | awk '$2 == "connected" && $3 == "primary" { print $4 }')" SCREEN_2_GEOMETRY="$(xrandr -q | awk '$2 == "connected" && $3 != "primary" { print $3 }')" ALL_GEOMETRY="$(xrandr -q | awk '$1 == "Screen" { print ; exit }' | grep -o '\<current\>[^,]\+' | sed -e 's/^current//' -e 's/ //g' -e 's/$/+0+0/')" topleft() { - notify-send "screen 1 only (landscape)" + notify "画面1、横" setwacom MapToOutput "$SCREEN_1_GEOMETRY" } bottomleft() { - notify-send "screen 2 only (portrait)" + notify "画面2、縦" setwacom Rotate ccw setwacom MapToOutput "$SCREEN_2_GEOMETRY" } topright() { - notify-send "screen 1 only [osu] (landscape)" + notify "画面1、横、低遅延" setwacom Suppress 0 setwacom RawSample 1 @@ -39,7 +48,7 @@ topright() { } bottomright() { - notify-send "both screens (landscape)" + notify "全ての画面、横" setwacom Area 0 0 11875 7600 setwacom MapToOutput "$ALL_GEOMETRY" |