Last active
December 11, 2021 21:00
-
-
Save mgutz/ff44b1972f0b6e04a88b9334bfc16a60 to your computer and use it in GitHub Desktop.
Shell functions to set XFCE's window manager to i3 or built-in xfwm.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #. Use i3wm | |
| use-i3wm() { | |
| # NOTE: specifies an i3 configuration tailored for XFCE | |
| # ie do not need to run some daemons like i3 standalone | |
| xfconf-query --channel xfce4-session \ | |
| --property /sessions/Failsafe/Client0_Command \ | |
| --type string --set i3 \ | |
| --type string --set '-c' \ | |
| --type string --set "$HOME/.config/i3/xfce-de-config" \ | |
| --force-array | |
| # xfce4-panel checks to see if xfwm is running, `--disable-wm-check` helps | |
| # a little | |
| xfconf-query --channel xfce4-session \ | |
| --property /sessions/Failsafe/Client2_Command \ | |
| --type string --set 'xfce4-panel' \ | |
| --type string --set '--disable-wm-check' \ | |
| --force-array | |
| # Cannot use xfdesktop :( Nitrogen utility sets wallpaper. | |
| xfconf-query --channel xfce4-session \ | |
| --property /sessions/Failsafe/Client4_Command \ | |
| --type string --set nitrogen \ | |
| --type string --set '--restore' \ | |
| --force-array | |
| } | |
| #. Use/restore xfwm | |
| use-xfwm() { | |
| xfconf-query --channel xfce4-session \ | |
| --property /sessions/Failsafe/Client0_Command \ | |
| --type string --set xfwm4 \ | |
| --force-array | |
| xfconf-query --channel xfce4-session \ | |
| --property /sessions/Failsafe/Client2_Command \ | |
| --type string --set 'xfce4-panel' \ | |
| --force-array | |
| xfconf-query --channel xfce4-session \ | |
| --property /sessions/Failsafe/Client4_Command \ | |
| --type string --set xfdesktop \ | |
| --force-array | |
| } | |
| #. Query wm values | |
| query-wm() { | |
| for i in 0 2 4; do | |
| echo "" | |
| echo Client${i}_Command | |
| xfconf-query --channel xfce4-session \ | |
| --property /sessions/Failsafe/Client${i}_Command \ | |
| -v | |
| done | |
| } | |
| query-wm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment