Skip to content

Instantly share code, notes, and snippets.

@mgutz
Last active December 11, 2021 21:00
Show Gist options
  • Save mgutz/ff44b1972f0b6e04a88b9334bfc16a60 to your computer and use it in GitHub Desktop.
Save mgutz/ff44b1972f0b6e04a88b9334bfc16a60 to your computer and use it in GitHub Desktop.

Revisions

  1. mgutz revised this gist Dec 11, 2021. 1 changed file with 6 additions and 5 deletions.
    11 changes: 6 additions & 5 deletions xfce-wm-switcher.sh
    Original file line number Diff line number Diff line change
    @@ -2,24 +2,25 @@

    #. Use i3wm
    use-i3wm() {
    # NOTE: specifies an i3 configuration tailored for XFCE
    # ie do not need to run some daemons like i3 standalone
    # NOTE: specifies an i3 configuration tailored for XFCE. ie do not to run
    # some daemons and bar as needed by a standalone i3 setup.
    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
    # xfce4-panel checks to see if xfwm is running and is slow to start with i3.
    # `--disable-wm-check` helps but the real fix is to start a GUI app when i3
    # first starts. I start neofetch as a welcome screen.
    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.
    # Cannot use xfdesktop :( Nitrogen sets the wallpaper.
    xfconf-query --channel xfce4-session \
    --property /sessions/Failsafe/Client4_Command \
    --type string --set nitrogen \
  2. mgutz revised this gist Dec 11, 2021. 1 changed file with 6 additions and 1 deletion.
    7 changes: 6 additions & 1 deletion xfce-wm-switcher.sh
    Original file line number Diff line number Diff line change
    @@ -2,27 +2,32 @@

    #. 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 xfwm
    #. Use/restore xfwm
    use-xfwm() {
    xfconf-query --channel xfce4-session \
    --property /sessions/Failsafe/Client0_Command \
  3. mgutz created this gist Dec 11, 2021.
    55 changes: 55 additions & 0 deletions xfce-wm-switcher.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,55 @@
    #!/bin/bash

    #. Use i3wm
    use-i3wm() {
    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

    xfconf-query --channel xfce4-session \
    --property /sessions/Failsafe/Client2_Command \
    --type string --set 'xfce4-panel' \
    --type string --set '--disable-wm-check' \
    --force-array

    xfconf-query --channel xfce4-session \
    --property /sessions/Failsafe/Client4_Command \
    --type string --set nitrogen \
    --type string --set '--restore' \
    --force-array
    }

    #. Use 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