Skip to content
This repository was archived by the owner on Jan 3, 2026. It is now read-only.
Byson94 edited this page Jul 19, 2025 · 2 revisions

Introduction

xfsrtray is customizable, so it is important to learn the commands. So, this wiki will help you use xfsrtray.

Setting background color

You can set the background color of xfsrtray with the --background-color flag followed by the color in hexadecimal. The default color is white.

Example:

xfsrtray --background-color "000000" # background color is black

Setting positions

There are multiple ways to position the tray. --position, --margin-x, and --margin-y are the flags that you can use to position xfsrtray.

--position

You can pass any one of these values to the position flag: TL, T, TR, L, C, R, BL, B, BR. The default value of position is BR (Bottom Right).

  • TL: Top Left
  • T: Top
  • TR: Top Right
  • L: Left
  • C: Center
  • R: Right
  • BL: Bottom Left
  • B: Bottom
  • BR: Bottom Right

--margin-x

You can add x margin to xfsrtray (both positive and negative values). You add the margin to xfsrtray by passing --margin-x flag with a numerical number. Numerical values in quotations are also valid. However, there is a catch with negative numerical values. Instead of just passing them to the flag like <flag> <value>, you need to pass them like <flag>=<value> because the parser thinks that the negative sign is another flag.

Example:

xfsrtray --margin-x 30 # Moves 30 pixels in the positive direction (right)

xfsrtray --margin-x "30" # Also valid - Moves 30 pixels in the positive direction (right)

# however, you cannot pass a negative numerical value without equals
xfsrtray --margin-x=-30 # Moves 30 pixels in the negative direction (left)

xfsrtray --margin-x="-30" # Also valid - Moves 30 pixels in the negative direction (left)

# The following command wont work, so it is commented out
# xfsrtray --margin-x -30 # This will throw parsing error: error: unexpected argument '-3' found.

--margin-y

You can add y margin to xfsrtray (both positive and negative values). You add the margin to xfsrtray by passing --margin-y flag with a numerical number. Just like the --margin-x flag, numerical values in quotations are also valid and instead of just passing them to the flag like <flag> <value>, you need to pass them like <flag>=<value> because the parser thinks that the negative sign is another flag.

Example:

xfsrtray --margin-y 30 # Moves 30 pixels in the positive direction (down)

xfsrtray --margin-y "30" # Also valid - Moves 30 pixels in the positive direction (down)

# however, you cannot pass a negative numerical value without equals
xfsrtray --margin-x=-30 # Moves 30 pixels in the negative direction (up)

xfsrtray --margin-x="-30" # Also valid - Moves 30 pixels in the negative direction (up)

# The following command wont work, so it is commented out
# xfsrtray --margin-x -30 # This will throw parsing error: error: unexpected argument '-3' found.

Setting the padding

Padding is the extra empty space that you can add to the tray to make it look good. --padding is the flag to set the padding.

padding example

Note

This diagram only shows padding on the sides, but in reality, the padding is applied on all four directions (top, left, right, down).

You can add padding by passing the value to the flag. The numerical values added in quotations are also valid. Negative values are also supported but in the = format but its not recommended and will not be shown in the example.

Example:

xfsrtray --padding 30 # adds 30px padding on all sides

Tray size control

You can change the tray's size by using the --tray-width, --tray-height, and the --set-to-item-width flags.

--tray-width

This flags sets the tray to a particular width.

Example:

xfsrtray --tray-width 40 # Limits the tray width to 40

--tray-height

This flags sets the tray to a particular height.

Example:

xfsrtray --tray-width 60 # Limits the tray height to 60

--set-to-item-width

This flag can be used to set the tray's width and height based on the number of contents in that tray.

Example:

xfsrtray --set-to-content-size

Important

You cannot pass any values to this flag