1

So I'm off a fresh install of Arch Linux and now I'm at the stage of configuring Bspwm and have been reading off of https://wiki.archlinux.org/index.php/Bspwm

I've also been reading this to get a better understanding https://wiki.archlinux.org/index.php/XDG_Base_Directory_support

My problem is this:

Important: Make you sure environment variable $XDG_CONFIG_HOME is set or your bspwmrc will not be found. This can be done by adding XDG_CONFIG_HOME="$HOME/.config" and export XDG_CONFIG_HOME to your ~/.profile.

^^ I don't know what this really means currently. I logged in as root, and typed: XDG_CONFIG_HOME="$HOME/.config" to see if anything special happened. But nothing happened, no errors or anything. Hope I didn't mess anything up by that.

I just need some instruction on what exactly to do.

Member
  • 11

1 Answers1

1

This can be done by adding XDG_CONFIG_HOME="$HOME/.config" and export XDG_CONFIG_HOME to your ~/.profile.

First, login to the user account that you want to use to run bspwm. It's usually not root.

If the file ~/.profile doesn't exist yet, create an empty file with the command touch ~/.profile. Open the file using a text editor and add these two lines:

XDG_CONFIG_HOME="$HOME/.config"
export XDG_CONFIG_HOME

Save the file, and it will take effect the next time you login.

What this does is to set the value of the environment variable XDG_CONFIG_HOME to "$HOME/.config" and make it available to other programs. The value gets stored, but there is no output, so it seems that nothing happens when you run these commands in the console.

But it matters when other programs reference the variable and use its value. In this case, by referencing XDG_CONFIG_HOME, bspwm will be able to know where the configuration file is and read it.

Environment variables can be referenced using $. You may have noticed the $HOME part in XDG_CONFIG_HOME="$HOME/.config". HOME is an environment variable that stores the path to the user's home directory. In this expression $HOME is first replaced by something like /home/username and then /.config is appended. Using $ and the command echo, you can find out the value of XDG_CONFIG_HOME:

echo $XDG_CONFIG_HOME

It will produce an output similar to /home/username/.config.

wzhd
  • 163