You are not logged in.
I'm trying to make a script that will initalise xfce to my settings, using xfconf-query. It seems to be working fine for most things, but I'm having an issue with the XFWM keyboard shortcuts.
Basically I want tile up, down, left right to be mapped to up down left right arrow keys, and then top left etc mapped to page up/down and home/end, as on my laptop those are mapped to fn + arrow keys.
The issue I'm having is using the following set of xfconf commands:
xfconf-query -c xfce4-keyboard-shortcuts -p "/xfwm4/custom" -r -R # To reset any other changes
xfconf-query -c xfce4-keyboard-shortcuts -np '/xfwm4/custom/<Super>Up' -t 'string' -s 'tile_up_key'
xfconf-query -c xfce4-keyboard-shortcuts -np '/xfwm4/custom/<Super>Down' -t 'string' -s 'tile_down_key'
xfconf-query -c xfce4-keyboard-shortcuts -np '/xfwm4/custom/<Super>Right' -t 'string' -s 'tile_right_key'
xfconf-query -c xfce4-keyboard-shortcuts -np '/xfwm4/custom/<Super>Left' -t 'string' -s 'tile_left_key'
xfconf-query -c xfce4-keyboard-shortcuts -np '/xfwm4/custom/<Super>End' -t 'string' -s 'tile_up_right_key'
xfconf-query -c xfce4-keyboard-shortcuts -np '/xfwm4/custom/<Super>Page_Down' -t 'string' -s 'tile_down_right_key'
xfconf-query -c xfce4-keyboard-shortcuts -np '/xfwm4/custom/<Super>Page_Up' -t 'string' -s 'tile_up_left_key'
xfconf-query -c xfce4-keyboard-shortcuts -np '/xfwm4/custom/<Super>Home' -t 'string' -s 'tile_down_left_key'
If I run these commands, none of the keys will work. If I run
xfconf-query -c xfce4-keyboard-shortcuts -lv | grep "xfwm4/custom/<Super>"
then this is the output:
/xfwm4/custom/<Super>Down tile_down_key
/xfwm4/custom/<Super>End tile_up_right_key
/xfwm4/custom/<Super>Home tile_down_left_key
/xfwm4/custom/<Super>Left tile_left_key
/xfwm4/custom/<Super>Page_Down tile_down_right_key
/xfwm4/custom/<Super>Page_Up tile_up_left_key
/xfwm4/custom/<Super>Right tile_right_key
/xfwm4/custom/<Super>Up tile_up_key
Which looks right, but if you look the the xfwm4-settings UI, it looks like this:
Which doesn't look right.
What am I doing wrong?
Offline
If you run each of those commands manually in a terminal window, does it then work?
If so, maybe place a sleep statement after the first command to give it time to complete properly.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
If you run each of those commands manually in a terminal window, does it then work?
If so, maybe place a sleep statement after the first command to give it time to complete properly.
They sometimes work, but inconsistently. About 5 minutes after I made this post I ran the script again, and then every single one worked. However, 30 minutes later, some of the shortcuts have stopped working (I didn't rerun the script or make any other changes to XFWM4 bindings)
For example now I tried running
xfconf-query -c xfce4-keyboard-shortcuts -np '/xfwm4/custom/<Super>Down' -t 'string' -s 'tile_down_key'
and it didn't work. If I go into the settings UI and set it then it will work. However if I reboot, it stops working.
Offline
Which distro and versions of Xfce and xfwm4 are you running?
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Which distro and versions of Xfce and xfwm4 are you running?
Distro is Arch, Xfce version is 4.18, Xfwm4 version 4.18.0 (revision 7e7473c5b)
Offline
This might be of interest.
I can replicate the problem on my system as well. Have a read through that bug report and if you feel it is relevant, post to it. If not, feel free to create a new bug report.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
This might be of interest.
I can replicate the problem on my system as well. Have a read through that bug report and if you feel it is relevant, post to it. If not, feel free to create a new bug report.
Thanks, I'll have a look at the bug report.
As a workaround, xdotool could be used to automatically add shortcuts:
xfwm4-settings & disown
sleep 0.1
xdotool key Right Down Down
xdotool type "Add workspace"
xdotool key Enter
xdotool keydown Super Shift
xdotool key t
xdotool keyup Super Shift
Where "Add workspace" is the exact name of the action, and "Super+Shift+t" is the keyboard shortcut.
Offline