fusuma: Right and left swipe with 3 fingers are not working in Ubuntu 20.04.

I have attached my config.yml file here as a .txt as .yml is apparently not supported. config .yml.txt

I can’t find any issues with this file. Also, the action is recognized when I run $ fusuma in the terminal as you can see from the output below. This issue is only with 3 finger swipe right and left.

me@mylaptop:~$ fusuma
I, [2020-05-25T18:22:26.938651 #6145] INFO – : ---------------------------------------------
I, [2020-05-25T18:22:26.938700 #6145] INFO – : Fusuma: 1.10.1
I, [2020-05-25T18:22:26.940427 #6145] INFO – : libinput: 1.15.5
I, [2020-05-25T18:22:26.941111 #6145] INFO – : OS: Linux 5.4.0-31-generic #35-Ubuntu SMP Thu May 7 20:20:34 UTC 2020
I, [2020-05-25T18:22:26.941775 #6145] INFO – : Distribution: Ubuntu 20.04 LTS \n \l
I, [2020-05-25T18:22:26.942394 #6145] INFO – : Desktop session: ubuntu x11
I, [2020-05-25T18:22:26.942422 #6145] INFO – : ---------------------------------------------
I, [2020-05-25T18:22:26.942442 #6145] INFO – : Enabled Plugins:
I, [2020-05-25T18:22:26.942513 #6145] INFO – : Fusuma::Plugin::Buffers::GestureBuffer
I, [2020-05-25T18:22:26.942529 #6145] INFO – : Fusuma::Plugin::Detectors::PinchDetector
I, [2020-05-25T18:22:26.942555 #6145] INFO – : Fusuma::Plugin::Detectors::RotateDetector
I, [2020-05-25T18:22:26.942574 #6145] INFO – : Fusuma::Plugin::Detectors::SwipeDetector
I, [2020-05-25T18:22:26.942590 #6145] INFO – : Fusuma::Plugin::Events::Records::GestureRecord
I, [2020-05-25T18:22:26.942600 #6145] INFO – : Fusuma::Plugin::Events::Records::IndexRecord
I, [2020-05-25T18:22:26.942610 #6145] INFO – : Fusuma::Plugin::Events::Records::TextRecord
I, [2020-05-25T18:22:26.942619 #6145] INFO – : Fusuma::Plugin::Executors::CommandExecutor
I, [2020-05-25T18:22:26.942629 #6145] INFO – : Fusuma::Plugin::Filters::LibinputDeviceFilter
I, [2020-05-25T18:22:26.942638 #6145] INFO – : Fusuma::Plugin::Filters::LibinputTimeoutFilter
I, [2020-05-25T18:22:26.942652 #6145] INFO – : Fusuma::Plugin::Inputs::LibinputCommandInput
I, [2020-05-25T18:22:26.942661 #6145] INFO – : Fusuma::Plugin::Parsers::LibinputGestureParser
I, [2020-05-25T18:22:26.942670 #6145] INFO – : ---------------------------------------------
I, [2020-05-25T18:22:26.943318 #6145] INFO – : reload config : /home/vidath_dissanayake/.config/fusuma/config.yml
I, [2020-05-25T18:22:28.849487 #6145] INFO – : {:command=>“xdotool key alt+tab”}
I, [2020-05-25T18:22:30.237735 #6145] INFO – : {:command=>“xdotool key alt+shift+tab”}

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 18 (8 by maintainers)

Most upvoted comments

This is my code now and I am satisfied with it. Thank you for your help. config .yml.txt

Ah I see. Thanks for the clarification. Ping me when you add that feature to wmctrl. I will add the plugin then.

Yes, that is a good idea. Though you better say that it sends windows back instead of switching them. That is a very useful function. Also, when I want to directly switch to another window I use alt+swipe with 3 fingers thanks to keypress

So with the window: property in the current fusuma-plugin-wmctrl you can only switch between 2 windows?

It may be great that there is a simple one shot command that behaves that foreground application move to background in the same workspace.

I wrote simple shellscript for you. please try this.

#!/bin/bash
if [ $# -ne 1 ]; then
  echo "require an argument" 1>&2
  exit 1
fi

case "$1" in #
  "1" | "-1") direction="$1" ;;
  *) echo "argument should be 1 or -1"
    exit 1;;
esac

desktop_id=$(wmctrl -d | grep -e "\*" | cut -d ' ' -f1)
cursor_file=/tmp/window_cursor

touch "$cursor_file"

cursor=$(head -n 1 "$cursor_file")

windows=$(wmctrl -l | grep "\ $desktop_id\ " | cut -d ' ' -f1 | sort)


if [ -z "$cursor" ]; then
  next_window=$(echo "$windows" | tail -n 1)
else

  if [ "$direction" = 1 ]; then
    tail_or_head=tail
  else
    tail_or_head=head
  fi
  next_window=$(echo "$windows" | grep "$cursor" -A1 -B1 | "$tail_or_head" -n 1)

  if [ "$cursor" = "$next_window" ]; then
    next_window=$(echo "$windows" | sort -r | "$tail_or_head" -n 1)
  fi
fi

echo "$next_window" > "$cursor_file"

wmctrl -i -a  "$next_window"

Save as cycle.sh and try following commands.

$ cycle.sh 1 # next window
$ cycle.sh -1 #previous window

You can set commands to fusuma’s config.yml command: "sh /path/to/cycle.sh 1"