Skip to content

Instantly share code, notes, and snippets.

@clockworkpc
Last active November 23, 2025 00:41
Show Gist options
  • Select an option

  • Save clockworkpc/7e75810fc2b5bc081ddc56d36c61c907 to your computer and use it in GitHub Desktop.

Select an option

Save clockworkpc/7e75810fc2b5bc081ddc56d36c61c907 to your computer and use it in GitHub Desktop.
Imitation COSMIC desktop on Void Linux with XFCE
#!/bin/sh
set -e
# ============================================
# XFCE + COSMIC-like setup for Void Linux
# ============================================
echo "[*] Installing core XFCE + plugins + utilities..."
sudo xbps-install -S \
xfce4 \
xfce4-whiskermenu-plugin \
xfce4-docklike-plugin \
xfce4-pulseaudio-plugin \
xfce4-notifyd \
xfce4-power-manager \
xfce4-screenshooter \
xfce4-taskmanager \
xfce4-clipman-plugin \
picom \
font-inter \
git \
unzip
echo "[*] Creating theme and icon directories..."
mkdir -p "$HOME/.local/share/themes"
mkdir -p "$HOME/.local/share/icons"
mkdir -p "$HOME/.local/src"
cd "$HOME/.local/src"
# ============================================
# Pop!/COSMIC themes
# ============================================
clone_if_missing() {
REPO_URL="$1"
DIR_NAME="$2"
if [ -d "$DIR_NAME" ]; then
echo "[*] $DIR_NAME already exists, skipping clone."
else
git clone "$REPO_URL" "$DIR_NAME"
fi
}
echo "[*] Cloning Pop!/COSMIC themes (GTK + icons)..."
clone_if_missing "https://github.com/pop-os/gtk-theme.git" "gtk-theme"
clone_if_missing "https://github.com/pop-os/icon-theme.git" "icon-theme"
clone_if_missing "https://github.com/pop-os/cosmic-gtk-theme.git" "cosmic-gtk-theme"
echo "[*] Installing Pop GTK themes into ~/.local/share/themes..."
cp -r gtk-theme/Pop* "$HOME/.local/share/themes/" 2>/dev/null || true
echo "[*] Installing Pop icon themes into ~/.local/share/icons..."
cp -r icon-theme/Pop* "$HOME/.local/share/icons/" 2>/dev/null || true
echo "[*] Installing COSMIC GTK themes into ~/.local/share/themes..."
cp -r cosmic-gtk-theme/Cosmic* "$HOME/.local/share/themes/" 2>/dev/null || true
# ============================================
# picom configuration
# ============================================
echo "[*] Writing picom configuration (~/.config/picom/picom.conf)..."
mkdir -p "$HOME/.config/picom"
cat > "$HOME/.config/picom/picom.conf" <<'EOF'
########################################
# picom config for COSMIC-like XFCE
########################################
backend = "xrender";
shadow = true;
shadow-radius = 18;
shadow-opacity = 0.32;
shadow-offset-x = -12;
shadow-offset-y = -12;
corner-radius = 12;
round-borders = 1;
rounded-corners-exclude = [
"class_g = 'Xfce4-panel'",
"class_g = 'Docklike'",
"class_g = 'Xfce4-notifyd'"
];
fading = true;
fade-in-step = 0.03;
fade-out-step = 0.03;
fade-delta = 10;
inactive-opacity = 1.0;
frame-opacity = 1.0;
inactive-opacity-override = false;
vsync = true;
detect-rounded-corners = true;
detect-client-opacity = true;
detect-transient = true;
glx-no-stencil = true;
use-damage = true;
opacity-rule = [
];
EOF
# ============================================
# Disable xfwm compositor & autostart picom
# (will only work once you have XFCE configs)
# ============================================
echo "[*] Setting up picom autostart..."
mkdir -p "$HOME/.config/autostart"
cat > "$HOME/.config/autostart/picom.desktop" <<'EOF'
[Desktop Entry]
Type=Application
Exec=picom --config ~/.config/picom/picom.conf
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name=picom
Comment=Compositor for shadows and rounded corners
EOF
echo "[*] Attempting to disable XFCE's built-in compositor (safe to ignore errors)..."
xfconf-query -c xfwm4 -p /general/use_compositing -n -t bool -s false 2>/dev/null || true
# ============================================
# Final notes
# ============================================
cat <<'EONOTE'
============================================================
Done.
What you have now:
- XFCE core + useful plugins:
- Whisker menu
- Docklike dock
- Audio, notifications, power, clipboard, screenshots, task manager
- picom configured for:
- rounded corners
- soft shadows
- Pop!/COSMIC GTK + icon themes installed to:
- ~/.local/share/themes
- ~/.local/share/icons
- Inter font installed
- picom set to autostart, xfwm compositor disabled
Next steps (manual inside XFCE session):
1) Log into XFCE.
2) Set theme and icons:
- Settings → Appearance:
Style: Pop or Pop-dark (or Cosmic if you prefer)
Icons: Pop or Pop-dark
- Settings → Window Manager:
Theme: Pop (or Cosmic)
Title font: Inter Bold 11 or 12
- Settings → Appearance → Fonts:
Default font: Inter 10 or 11
3) Panels:
- Top panel (34–36 px):
- Add Whisker Menu to the left
- Window Buttons in the center (use expand + separators)
- Notification Area, PulseAudio, Power, Clock on the right
- Bottom panel (42–48 px):
- Add Docklike Taskbar
- Set it to center, icons-only, autohide if you want
4) Keyboard shortcuts (to mimic COSMIC)
- Settings → Keyboard → Application Shortcuts:
- xfce4-popup-whiskermenu → Super
- Settings → Window Manager → Keyboard:
- Super+Left/Right for tiling
- Super+Up for maximize
- Super+Down for unmaximize/restore
- Super+PgUp/PgDn for workspace nav
You now have a COSMIC-style XFCE on Void, without touching Wayland.
============================================================
EONOTE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment