A Shell Script that Automates XFCE Desktop Configuration

License

The jc-xfce-settings project provides the jc-xfce-settings.sh script, which holds James Cherti’s settings to customize the XFCE desktop environment, including window management, notifications, desktop behavior, keyboard settings, and more, to enhance the user experience.

(The jc-xfce-settings.sh script was created with the help of watch-xfce-xfconf)

Table of Contents

Requirements

  • The XFCE Desktop Environment,
  • and xfconf-query utility that is part of XFCE.

Usage

  1. Clone the repository:

    git clone https://github.com/jamescherti/jc-xfce-settings
  2. Navigate to the repository directory:

    cd jc-xfce-settings
  3. Run the script to configure XFCE:

    ./jc-xfce-settings.sh

Features

  • Title Bar Customization: Simplifies button layout for easier window management.
  • Font and Display Settings: Enables anti-aliasing, hinting, and configures RGBA rendering.
  • File Manager (Thunar): Optimizes behavior for thumbnailing, single-click navigation, and directory-specific settings.
  • Keyboard Tweaks: Adjusts key repeat delay and rate for a smoother typing experience.
  • Notifications: Sets notification theme, position, and timeout duration.
  • Desktop Behavior: Disables unnecessary desktop icons and menus for a cleaner workspace.
  • Session Management: Disables session saving for a faster logout experience.
  • Window Management: Configures snapping, shadow effects, focus behavior, and workspace interactions.
  • Compositor Settings: Adjusts transparency and disables unneeded effects.

Author and License

The jc-xfce-settings tool has been written by James Cherti and is distributed under terms of the MIT license.

Links

Other project by the same author:

  • jc-dotfiles @GitHub: A collection of UNIX/Linux configuration files. You can either install them directly or use them as inspiration your own dotfiles.
  • bash-stdops @GitHub: A collection of Bash helper shell scripts.
  • jc-gnome-settings: GNOME customizations that can be applied programmatically.
  • jc-firefox-settings @GitHub: Provides the user.js file, which holds settings to customize the Firefox web browser to enhance the user experience and security.
  • jc-gentoo-portage @GitHub: Provides configuration files for customizing Gentoo Linux Portage, including package management, USE flags, and system-wide settings.

Configure XFCE 4 programmatically with the help of watch-xfce-xfconf

License

The watch-xfce-xfconf monitors XFCE settings in real time and prints the corresponding xfconf-query commands whenever a setting is modified through the graphical interface.

Configuration changes performed in components such as xfce4-settings-manager, Thunar, Catfish, Ristretto, and other XFCE applications are translated into explicit xfconf-query commands. These commands reveal how XFCE 4 persists and applies configuration at the Xfconf layer.

The generated commands can be reused to modify or create XFCE 4 settings programmatically, including desktop backgrounds, panel layouts, window decorations, window manager behavior, and related preferences.

By displaying the xfconf-query commands, watch-xfce-xfconf allows to easily create a Shell script that can be used to automate the configuration of XFCE 4, which provides several benefits:

  • It saves time and effort by eliminating the need to manually adjust settings on each individual machine,
  • It reduces the risk of errors and inconsistencies that may arise from manually configuring settings on different machines,
  • Finally, it allows focusing on other important tasks rather than spending time configuring XFCE 4 manually.

The watch-xfce-xfconf tool is useful for users who want to replicate XFCE 4 settings across different users or computers.

Here is an example of an XFCE customization script created with the help of watch-xfce-xfconf: jc-xfce-settings @GitHub.

If watch-xfce-xfconf enhances your workflow, please show your support by ⭐ starring watch-xfce-xfconf on GitHub to help more users discover its benefits.

Installation

To install the watch-xfce-xfconf executable locally in ~/.local/bin/watch-xfce-xfconf using pip, run:

pip install --user watch-xfce-xfconf

(Omitting the --user flag will install watch-xfce-xfconf system-wide in /usr/local/bin/watch-xfce-xfconf.)

Usage

Run xfce4-settings-manager in the background:

xfce4-settings-manager &

After that, execute watch-xfce-xfconf:

~/.local/bin/watch-xfce-xfconf

Once you begin modifying XFCE 4 settings using xfce4-settings-manager, watch-xfce-xfconf will automatically display the corresponding xfconf-query commands in the terminal. These xfconf-query commands can be easily copied and pasted into a Shell script, allowing for quick and efficient automation of XFCE 4 configuration across multiple machines.

Author and License

The watch-xfce-xfconf tool has been written by James Cherti and is distributed under terms of the MIT license.

Features

  • Parses XML files that are located in the directory: ~/.config/xfce4/xfconf/xfce-perchannel-xml/,
  • Monitors changes in XFCE 4 settings / Xfconf,
  • Displays xfconf-query commands with correctly escaped special characters in their arguments.
  • Reloads Xfconf when it is necessary.

Links