Keyboard shortcut work landed
After a few user interface improvements and some last bug fixes, the work I described in my last post was merged in the master branches. It is thus available for testing to all users of the Xfce development version.
Feedback on this is welcome, file any bug you find on the Xfce Bugzilla. This will of course be available in the next development release of those components.
Work in progress to improve keyboard shortcuts in Xfce
Long time no blog! I started to hack again last week with the goal of improving keyboard shortcuts handling in Xfce. I touched that during the Xfce 4.10 cycle and this unfortunately seem to have introduced a bunch of bugs that I'm now trying to resolve. I also took this opportunity to try to overhaul the UI and make it more understandable.
This code is available in the jeromeg/keyboard-shortcuts branches of xfwm4, libxfce4ui and xfce4-settings on the Xfce Git server. Some improvements are still planned but most of what I was planning is already implemented.
Here is a list of reported bugs which should be fixed once I merge this:
- Keyboard shortcuts on numeric keypad are ineffective
- Usability issue : the dialog for adding keyboard shortcuts isn't clear
- Unable create keyboard shortcut <Alt>+Print
- Add a button to edit/modify a keybinding
- Control modifier appears as Primary when setting shortcuts
- Keyboard shortcuts of the same shortcut
- Default shortcuts not working
- Keyboard mapping for XF86PowerButton and Ctrl+Insert ineffective
- <Shift> modifier not recognized correctly
- Keyboard shortcuts shipped by Xfce are wrong since the Gtk switch from Control to Primary
A brief summary: shortcuts now work when Caps Lock is on, shortcuts using Shift or the numeric keypad are handled correctly, a bunch of regressions are fixed, conflict handling is now more reliable and the UI should be better.
Regarding keyboard shortcuts bugs, keyboard shortcuts not working correctly after a reboot or not work working in some other cases seem to occur because of a "wrong" shortcut database often caused by a problem in the migration script in Xfce 4.6. In that case, the easier way to fix this seems to be to revert all keyboard shortcuts to default (in xfwm4-settings and xfce4-keyboard-settings) and to rebind them using the dialogs.
Screenshots
Readable shortcut labels in the UI
Improved dialogs to add and edit shortcuts
Improved conflict handling
Testing is welcome!
If you know what you are doing, it would be useful if you could test those changes and report me by mail any remaining issues. Suggestions for improvements are also welcome.
Apache restart with Vim autocmd
In order to execute a command right after saving a file in Vim, you can use the :autocmd command. Here is a quick example how it can be useful with Apache files.NB: on my system, Debian in this case, an Apache file is automatically recognized as filetype=apache.
augroup apache
autocmd BufWritePost */sites-enabled/* !/etc/init.d/apache2 restart
augroup END
Apache restart with Vim autocmd
In order to execute a command right after saving a file in Vim, you can use the :autocmd command. Here is a quick example how it can be useful with Apache files.NB: on my system, Debian in this case, an Apache file is automatically recognized as filetype=apache.
augroup apache
autocmd BufWritePost */sites-enabled/* !/etc/init.d/apache2 restart
augroup END