Replace XFCE window manager with i3

This commit is contained in:
Fabio Scotto di Santolo
2026-02-12 13:51:23 +01:00
parent 0984d55782
commit 06b9a3d0e0
32 changed files with 92 additions and 318 deletions

View File

@@ -17,12 +17,12 @@ set $down j
set $up k
set $right l
set $term 'alacritty'
set $term 'xfce4-terminal'
set $editor 'emacs'
set $filemanager 'nemo'
set $filemanager 'thunar'
set $notification 'dunst'
set $browser 'org.mozilla.firefox'
set $clipboard 'diodon'
set $browser 'chromium'
set $clipboard 'xfce4-clipman'
# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
@@ -43,33 +43,12 @@ set $ws10 "10"
###############################################################
###############################################################
# Import Catppuccin theme defined colors
set $rosewater #f5e0dc
set $flamingo #f2cdcd
set $pink #f5c2e7
set $mauve #cba6f7
set $red #f38ba8
set $maroon #eba0ac
set $peach #fab387
set $yellow #f9e2af
set $green #a6e3a1
set $teal #94e2d5
set $sky #89dceb
set $sapphire #74c7ec
set $blue #89b4fa
set $lavender #b4befe
set $text #cdd6f4
set $subtext1 #bac2de
set $subtext0 #a6adc8
set $overlay2 #9399b2
set $overlay1 #7f849c
set $overlay0 #6c7086
set $surface2 #585b70
set $surface1 #45475a
set $surface0 #313244
set $base #1e1e2e
set $mantle #181825
set $crust #11111b
set $lavender '#813d9c'
set $base '#000000'
set $text '#000000'
set $rosewater '#dc8add'
set $overlay0 '#5e5c64'
set $peach '#e66100'
# target title bg text indicator border
client.focused $lavender $base $text $rosewater $lavender
@@ -84,7 +63,7 @@ client.background $base
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:Noto Sans Regular 10
font pango:Liberation Sans Regular 10
# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
@@ -96,6 +75,9 @@ default_floating_border pixel 3
gaps inner 5
gaps outer 5
# Apply wallpaper
exec_always --no-startup-id feh --bg-scale ~/.config/i3/wallpaper.jpg
###############################################################
###############################################################
################## WORKSPACES ##################
@@ -122,6 +104,7 @@ for_window [class="Spotify"] floating enable, resize set 1280 1024, move scratch
# Workspaces
assign [class="Emacs"] 1
assign [class="firefox"] 2
assign [class="chromium"] 2
assign [class="Telegram"] 3
assign [class="discord"] 3
@@ -156,12 +139,14 @@ mode "launcher" {
}
bindsym $mod+d mode "launcher"
bindsym $mod+Shift+f exec "nemo"
bindsym $mod+Shift+b exec "flatpak run org.mozilla.firefox"
bindsym $mod+Shift+f exec $filemanager
bindsym $mod+Shift+b exec $browser
bindsym $mod+Shift+t exec "flatpak run org.telegram.desktop"
bindsym $mod+Shift+e exec $editor
bindsym Print exec flameshot gui
bindsym $mod+Shift+v exec --no-startup-id $clipboard
bindsym Print exec xfce4-screenshooter
bindsym Shift+Print exec xfce4-screenshooter -r
bindsym Alt+Print exec xfce4-screenshooter -w
bindsym $mod+Shift+v exec --no-startup-id xfce4-clipman-history
# Use pactl to adjust volume in PulseAudio.
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5%
@@ -170,7 +155,7 @@ bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ to
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle
bindsym XF86MonBrightnessUp exec --no-startup-id brightnessctl set +5%
bindsym XF86MonBrightnessDown exec --no-startup-id brightnessctl set 5%-
bindsym $mod+Mod1+l exec ~/.config/i3/scripts/lockscreen.sh
#bindsym $mod+Mod1+l exec ~/.config/i3/scripts/lockscreen.sh
# use Mouse+Mod4 to drag floating windows to their wanted position
floating_modifier $mod
@@ -267,8 +252,6 @@ bindsym $mod+comma workspace prev
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X session)
#bindsym $mod+Shift+e exec ~/.config/i3/scripts/poweroff.sh
# resize window (you can also use the mouse for that)
mode "resize" {
@@ -296,53 +279,3 @@ mode "resize" {
}
bindsym $mod+r mode "resize"
###############################################################
###############################################################
################## AUTOSTART ##################
###############################################################
###############################################################
# Start XDG autostart .desktop files using dex. See also
# https://wiki.archlinux.org/index.php/XDG_Autostart
exec --no-startup-id dex --autostart --environment i3
# The combination of xss-lock, nm-applet and pactl is a popular choice, so
# they are included here as an example. Modify as you see fit.
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
# screen before suspend. Use loginctl lock-session to lock your screen.
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
# NetworkManager is the most popular way to manage wireless networks on Linux,
# and nm-applet is a desktop environment-independent system tray GUI for it.
exec --no-startup-id nm-applet
# Polkit Authentication agent
exec_always --no-startup-id /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
### Apply wallpaper
exec_always --no-startup-id feh --bg-scale ~/.config/i3/wallpaper.jpg
### Run status bar
exec_always --no-startup-id ~/.config/polybar/launch.sh
### Run in background X11 compositor
exec_always --no-startup-id picom --config ~/.config/picom/picom.conf
### Run in background notification daemon
exec_always --no-startup-id $notification
exec --no-startup-id $clipboard
### Enable autolock
exec_always xautolock -time 5 -locker ~/.config/i3/scripts/lockscreen.sh -detectsleep
### Run screenshot tool
exec flameshot
### Run my preferred editor
# exec $editor
### Run my preferred browser
exec flatpak run $browser

View File

@@ -1,109 +0,0 @@
## Modified to have rules organized to the rules section at bottom, legacy options commented out.
# OPACITY
# inactive-opacity = 0.8;
# frame-opacity = 0.7;
# Let inactive opacity set by -i override the '_NET_WM_WINDOW_OPACITY' values of windows.
# inactive-opacity-override = true;
# if for some reason you want all windows transparent
# active-opacity = 1.0
# inactive-dim = 0.05
# fixed inactive dim value
# inactive-dim-fixed = 1.0
# focus-exclude = [ "class_g = 'dwm'" ];
# opacity-rule = [
# "100:class_g = 'example'"
# ];
# ROUNDED CORNERS
corner-radius = 3
# uncommented for square notification box
rounded-corners-exclude = [
"class_g = 'Polybar'",
"class_g = 'Dunst'"
];
# BLURRING
# methods: none, gaussian, box, kernel (define custom kernel), dual_kawase
blur:
{
method = "dual_kawase";
size = 10;
strength = 3;
# default deviation is 0.84
# deviation = false;
};
# semi-transparent
blur-background = true
# blur-background-frame = true
# Use fixed blur strength rather than adjusting according to window opacity.
blur-background-fixed = true
# set custom blur kernel (method to kernel), preset examples:
# blur-kern = "3x3box";
# blur-kern = "5x5gaussian";
# SHADOWS
# shadow = true;
shadow-radius = 1; #blur radius
shadow-opacity = .1
shadow-offset-x = 0;
shadow-offset-y = 0;
shadow-color = "#000000"
# shadow-exclude = [];
# FADING
fading = true;
fade-in-step = 0.03;
fade-out-step = 0.03;
fade-delta = 3
# OTHER SETTINGS
# dbus = true
# daemon = false
# backends: `xrender`, `glx`, `egl` or `xr_glx_hybrid`
backend = "egl";
dithered-present = false;
vsync = true;
# mark-wmwin-focused = true;
# mark-ovredir-focused = true;
detect-rounded-corners = false
detect-client-opacity = true;
use-ewmh-active-win = true
detect-transient = true;
# glx-no-stencil = true
use-damage = true;
log-level = "warn";
# LEGACY
# wintypes:
# {
# tooltip = { fade = true; shadow = true; opacity = 0.5; focus = true; full-shadow = false; };
# dock = { shadow = false; clip-shadow-above = true; }
# dnd = { shadow = false; }
# popup_menu = { opacity = 0.7; }
# dropdown_menu = { opacity = 0.7; }
# normal = { opacity = 1;}
# };
# WINDOW RULES
rules = (
# { match = "name = 'dwm'"; opacity = 1; },
{ match = "focused"; opacity = 1; },
{ match = "!focused"; opacity = 0.85; },
{ match = "tooltip"; fade = true; shadow = true; opacity = 0.5; focus = true; full-shadow = false; },
{ match = "popup_menu"; opacity = 0.7; },
{ match = "dropdown_menu"; opacity = 0.7; }
)
# picom -b to daemonize

View File

@@ -1,210 +0,0 @@
;==========================================================
;
; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗
; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝
; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗
; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║
; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
;
;
; To learn more about how to configure Polybar
; go to https://github.com/polybar/polybar
;
; The README contains a lot of information
;
;==========================================================
[global/wm]
include-file = $HOME/.config/polybar/themes/mocha.ini
include-file = $HOME/.config/polybar/modules.ini
margin-top = 0
margin-bottom = 0
; FIXME remove radius on left and right borders
[bar/mainbar]
; monitor = eDP-1 ; xrandr --query | grep " connected"
; monitor = ${env:POLYBAR_MONITOR:}
; Require the monitor to be in connected state
; XRandR sometimes reports my monitor as being disconnected (when in use)
monitor-strict = false
; Tell the Window Manager not to configure the window.
; Use this to detach the bar if your WM is locking its size/position.
override-redirect = false
; Put the bar at the bottom of the screen
bottom = false
; Prefer fixed center position for the `modules-center` block
;
; When false, the center position will be based on the size of the other blocks.
fixed-center = true
; Offset defined as pixel value (e.g. 35) or percentage (e.g. 50%)
; the percentage can optionally be extended with a pixel offset like so:
; 50%:-10, this will result in an offset in the x or y direction
; of 50% minus 10 pixels
offset-x = 0%
offset-y = 0%
; Background ARGB color (e.g. #f00, #ff992a, #ddff1023)
background = ${colors.base}
; Foreground ARGB color (e.g. #f00, #ff992a, #ddff1023)
foreground = ${colors.text}
; Dimension defined as pixel value (e.g. 35) or percentage (e.g. 50%),
; 50%:-10, this will result in a width or height of 50% minus 10 pixels
; the percentage can optionally be extended with a pixel offset like so:
width = 100%
height = 26pt
; Value used for drawing rounded corners
; Note: This shouldn't be used together with border-size because the border
; doesn't get rounded
; Individual top/bottom values can be defined using:
; radius-{top,bottom}
radius-top = 0
radius-bottom = 0.0
; Under-/overline pixel size and argb color
; Individual values can be defined using:
; {overline,underline}-size
; {overline,underline}-color
underline-size = 2
underline-color = ${color.foreground}
; Values applied to all borders
; Individual side values can be defined using:
; border-{left,top,right,bottom}-size
; border-{left,top,right,bottom}-color
; The top and bottom borders are added to the bar height, so the effective
; window height is:
; height + border-top-size + border-bottom-size
; Meanwhile the effective window width is defined entirely by the width key and
; the border is placed withing this area. So you effectively only have the
; following horizontal space on the bar:
; width - border-right-size - border-left-size
border-size = 0
border-color = ${colors.base}
; Number of spaces to add at the beginning/end of the bar
; Individual side values can be defined using:
; padding-{left,right}
padding-left = 0
padding-right = 0
; Number of spaces to add before/after each module
; Individual side values can be defined using:
; module-margin-{left,right}
;module-margin-left = 0
;module-margin-right = 0
module-margin = 1
; The separator will be inserted between the output of each module
separator = |
separator-foreground = ${colors.crust}
; Fonts are defined using <font-name>;<vertical-offset>
; Font names are specified using a fontconfig pattern.
; font-0 = NotoSans-Regular:size=8;2
; font-1 = MaterialIcons:size=10
; font-2 = Termsynu:size=8;-1
; font-3 = FontAwesome:size=10
; See the Fonts wiki page for more details
font-0 = "JetBrainsMono Nerd Font:size=12;2"
; Modules are added to one of the available blocks
; modules-center = xwindow xbacklight
; modules-right = ipc clock
modules-left = xworkspaces
modules-center =
modules-right = spotify filesystem memory cpu pulseaudio backlight battery0 battery1 xkeyboard date systray
; Value to be used to set the WM_NAME atom
; If the value is empty or undefined, the atom value
; will be created from the following template: polybar-[BAR]_[MONITOR]
; NOTE: The placeholders are not available for custom values
;wm-name =
; Locale used to localize various module data (e.g. date)
; Expects a valid libc locale, for example: sv_SE.UTF-8
;locale =
; Position of the system tray window
; If empty or undefined, tray support will be disabled
; NOTE: A center aligned tray will cover center aligned modules
;
; Available positions:
; left
; center
; right
; none
tray-position = none
; If true, the bar will not shift its
; contents when the tray changes
tray-detached = false
; Tray icon max size
tray-maxsize = 20
; Background color for the tray container
; ARGB color (e.g. #f00, #ff992a, #ddff1023)
; By default the tray container will use the bar
; background color.
tray-background = ${color.base}
; Tray offset defined as pixel value (e.g. 35) or percentage (e.g. 50%)
tray-offset-x = 0
tray-offset-y = 0
; Pad the sides of each tray icon
tray-padding = 0
; Scale factor for tray clients
tray-scale = 0.5
; Restack the bar window and put it above the
; selected window manager's root
;
; Fixes the issue where the bar is being drawn
; on top of fullscreen window's
;
; Currently supported WM's:
; bspwm
; i3 (requires: `override-redirect = true`)
wm-restack = i3
; Set a DPI values used when rendering text
; This only affects scalable fonts
; dpi =
; Enable support for inter-process messaging
; See the Messaging wiki page for more details.
enable-ipc = true
; Fallback click handlers that will be called if
; there's no matching module handler found.
click-left =
click-middle =
click-right =
scroll-up =
scroll-down =
double-click-left =
double-click-middle =
double-click-right =
; Requires polybar to be built with xcursor support (xcb-util-cursor)
; Possible values are:
; - default : The default pointer as before, can also be an empty string (default)
; - pointer : Typically in the form of a hand
; - ns-resize : Up and down arrows, can be used to indicate scrolling
cursor-click = pointer
cursor-scroll = ns-resize
[settings]
screenchange-reload = true
pseudo-transparency = true

View File

@@ -1,13 +0,0 @@
#!/usr/bin/env bash
# Terminate already running bar instances
# If all your bars have ipc enabled, you can use
polybar-msg cmd quit
# Otherwise you can use the nuclear option:
# killall -q polybar
# Launch barxs
echo "---" | tee -a /tmp/polybar-mybar.log
polybar mainbar 2>&1 | tee -a /tmp/polybar-mybar.log & disown
echo "Bars launched..."

View File

@@ -1,585 +0,0 @@
; FIXME adapt systray icons to other status bar icons
[module/systray]
type = internal/tray
format-margin = 8pt
tray-spacing = 14pt
[module/xworkspaces]
type = internal/xworkspaces
label-active = %name%
label-active-background = ${colors.mantle}
label-active-foreground = ${colors.mauve}
label-active-underline= ${colors.mauve}
label-active-padding = 1
label-occupied = %name%
label-occupied-padding = 1
label-urgent = %name%
label-urgent-background = ${colors.red}
label-urgent-padding = 1
label-empty = %name%
label-empty-foreground = ${colors.crust}
label-empty-padding = 1
[module/xwindow]
type = internal/xwindow
label = %title:0:60:...%
[module/filesystem]
type = internal/fs
interval = 25
mount-0 = /
mount-1 = /home
label-mounted = %{F#F2CDCD}%mountpoint%%{F-} %percentage_used%%
label-unmounted = %mountpoint% not mounted
label-unmounted-foreground = ${colors.crust}
[module/pulseaudio]
type = internal/pulseaudio
;format-volume-prefix = "VOL "
;format-volume-prefix-foreground = ${colors.blue}
format-volume = <ramp-volume> <label-volume>
label-volume = %percentage%%
ramp-volume-foreground = ${colors.rosewater}
format-muted = <label-muted>
label-muted =  %percentage%%
ramp-muted-foreground = ${colors.red}
ramp-volume-0 =
ramp-volume-1 =
ramp-volume-2 =
[module/xkeyboard]
type = internal/xkeyboard
blacklist-0 = num lock
label-layout = %layout%
label-layout-foreground = ${colors.maroon}
label-indicator-padding = 2
label-indicator-margin = 1
label-indicator-foreground = ${colors.base}
label-indicator-background = ${colors.peach}
[module/memory]
type = internal/memory
interval = 2
format-prefix = " "
format-prefix-foreground = ${colors.teal}
label = %gb_used%/%gb_total%
[module/cpu]
type = internal/cpu
interval = 2
format-prefix = " "
format-prefix-foreground = ${colors.pink}
label = %percentage:2%%
[network-base]
type = internal/network
interval = 5
format-connected = <label-connected>
format-disconnected = <label-disconnected>
label-disconnected = %{F#F0C674}%ifname%%{F#707880} disconnected
[module/wlan]
inherit = network-base
interface-type = wireless
label-connected = %{F#F0C674}%ifname%%{F-} %essid% %local_ip%
[module/eth]
inherit = network-base
interface-type = wired
label-connected = %{F#F0C674}%ifname%%{F-} %local_ip%
[module/date]
type = internal/date
interval = 1
date = %H:%M
date-alt = %Y-%m-%d %H:%M:%S
label = %date%
;label-foreground = ${colors.blue}
[module/battery0]
type = internal/battery
; This is useful in case the battery never reports 100% charge
; Default: 100
full-at = 100
; format-low once this charge percentage is reached
; Default: 10
; New in version 3.6.0
low-at = 20
; Use the following command to list batteries and adapters:
; $ ls -1 /sys/class/power_supply/
battery = BAT0
adapter = ADP1
; If an inotify event haven't been reported in this many
; seconds, manually poll for new values.
;
; Needed as a fallback for systems that don't report events
; on sysfs/procfs.
;
; Disable polling by setting the interval to 0.
;
; Default: 5
poll-interval = 5
; see "man date" for details on how to format the time string
; NOTE: if you want to use syntax tags here you need to use %%{...}
; Default: %H:%M:%S
time-format = %H:%M
; Available tags:
; <label-charging> (default)
; <bar-capacity>
; <ramp-capacity>
; <animation-charging>
format-charging = <animation-charging> <label-charging>
animation-charging-foreground = ${colors.green}
; Available tags:
; <label-discharging> (default)
; <bar-capacity>
; <ramp-capacity>
; <animation-discharging>
format-discharging = <ramp-capacity> <label-discharging>
ramp-capacity-foreground = ${colors.yellow}
; Available tags:
; <label-full> (default)
; <bar-capacity>
; <ramp-capacity>
format-full = <ramp-capacity> <label-full>
format-full-foreground = ${colors.green}
; Format used when battery level drops to low-at
; If not defined, format-discharging is used instead.
; Available tags:
; <label-low>
; <animation-low>
; <bar-capacity>
; <ramp-capacity>
; New in version 3.6.0
format-low = <ramp-capacity> <label-low>
format-low-foreground = ${colors.red}
; Available tokens:
; %percentage% (default) - is set to 100 if full-at is reached
; %percentage_raw%
; %time%
; %consumption% (shows current charge rate in watts)
;label-charging = Charging %percentage%%
; Available tokens:
; %percentage% (default) - is set to 100 if full-at is reached
; %percentage_raw%
; %time%
; %consumption% (shows current discharge rate in watts)
;label-discharging = Discharging %percentage%%
; Available tokens:
; %percentage% (default) - is set to 100 if full-at is reached
; %percentage_raw%
;label-full = Fully charged
; Available tokens:
; %percentage% (default) - is set to 100 if full-at is reached
; %percentage_raw%
; %time%
; %consumption% (shows current discharge rate in watts)
; New in versinon 3.6.0
; label-low = BATTERY LOW
; Only applies if <ramp-capacity> is used
ramp-capacity-0 =
ramp-capacity-1 =
ramp-capacity-2 =
ramp-capacity-3 =
ramp-capacity-4 =
; Only applies if <bar-capacity> is used
bar-capacity-width = 10
; Only applies if <animation-charging> is used
animation-charging-0 =
animation-charging-1 =
animation-charging-2 =
animation-charging-3 =
animation-charging-4 =
; Framerate in milliseconds
animation-charging-framerate = 750
; Only applies if <animation-discharging> is used
animation-discharging-0 =
animation-discharging-1 =
animation-discharging-2 =
animation-discharging-3 =
animation-discharging-4 =
; Framerate in milliseconds
animation-discharging-framerate = 500
; Only applies if <animation-low> is used
; New in version 3.6.0
;animation-low-0 = !
;animation-low-1 =
;animation-low-framerate = 200
[module/battery1]
type = internal/battery
; This is useful in case the battery never reports 100% charge
; Default: 100
full-at = 100
; format-low once this charge percentage is reached
; Default: 10
; New in version 3.6.0
low-at = 20
; Use the following command to list batteries and adapters:
; $ ls -1 /sys/class/power_supply/
battery = BAT1
adapter = ADP1
; If an inotify event haven't been reported in this many
; seconds, manually poll for new values.
;
; Needed as a fallback for systems that don't report events
; on sysfs/procfs.
;
; Disable polling by setting the interval to 0.
;
; Default: 5
poll-interval = 5
; see "man date" for details on how to format the time string
; NOTE: if you want to use syntax tags here you need to use %%{...}
; Default: %H:%M:%S
time-format = %H:%M
; Available tags:
; <label-charging> (default)
; <bar-capacity>
; <ramp-capacity>
; <animation-charging>
format-charging = <animation-charging> <label-charging>
animation-charging-foreground = ${colors.green}
; Available tags:
; <label-discharging> (default)
; <bar-capacity>
; <ramp-capacity>
; <animation-discharging>
format-discharging = <ramp-capacity> <label-discharging>
ramp-capacity-foreground = ${colors.yellow}
; Available tags:
; <label-full> (default)
; <bar-capacity>
; <ramp-capacity>
format-full = <ramp-capacity> <label-full>
format-full-foreground = ${colors.green}
; Format used when battery level drops to low-at
; If not defined, format-discharging is used instead.
; Available tags:
; <label-low>
; <animation-low>
; <bar-capacity>
; <ramp-capacity>
; New in version 3.6.0
format-low = <ramp-capacity> <label-low>
format-low-foreground = ${colors.red}
; Available tokens:
; %percentage% (default) - is set to 100 if full-at is reached
; %percentage_raw%
; %time%
; %consumption% (shows current charge rate in watts)
;label-charging = Charging %percentage%%
; Available tokens:
; %percentage% (default) - is set to 100 if full-at is reached
; %percentage_raw%
; %time%
; %consumption% (shows current discharge rate in watts)
;label-discharging = Discharging %percentage%%
; Available tokens:
; %percentage% (default) - is set to 100 if full-at is reached
; %percentage_raw%
;label-full = Fully charged
; Available tokens:
; %percentage% (default) - is set to 100 if full-at is reached
; %percentage_raw%
; %time%
; %consumption% (shows current discharge rate in watts)
; New in versinon 3.6.0
; label-low = BATTERY LOW
; Only applies if <ramp-capacity> is used
ramp-capacity-0 =
ramp-capacity-1 =
ramp-capacity-2 =
ramp-capacity-3 =
ramp-capacity-4 =
; Only applies if <bar-capacity> is used
bar-capacity-width = 10
; Only applies if <animation-charging> is used
animation-charging-0 =
animation-charging-1 =
animation-charging-2 =
animation-charging-3 =
animation-charging-4 =
; Framerate in milliseconds
animation-charging-framerate = 750
; Only applies if <animation-discharging> is used
animation-discharging-0 =
animation-discharging-1 =
animation-discharging-2 =
animation-discharging-3 =
animation-discharging-4 =
; Framerate in milliseconds
animation-discharging-framerate = 500
; Only applies if <animation-low> is used
; New in version 3.6.0
;animation-low-0 = !
;animation-low-1 =
;animation-low-framerate = 200
[module/backlight]
type = internal/backlight
; Use the following command to list available cards:
; $ ls -1 /sys/class/backlight/
; Default: first usable card in /sys/class/backlight (new in version 3.7.0)
card = intel_backlight
; Use the `/sys/class/backlight/.../actual-brightness` file
; rather than the regular `brightness` file.
; New in version 3.6.0
; Changed in version: 3.7.0: Defaults to true also on amdgpu backlights
; Default: true
use-actual-brightness = true
; Interval in seconds after which after which the current brightness is read
; (even if no update is detected).
; Use this as a fallback if brightness updates are not registering in polybar
; (which happens if the use-actual-brightness is false).
; There is no guarantee on the precisio of this timing.
; Set to 0 to turn off
; New in version 3.7.0
; Default: 0 (5 if use-actual-brightness is false)
poll-interval = 0
; Enable changing the backlight with the scroll wheel
; NOTE: This may require additional configuration on some systems. Polybar will
; write to `/sys/class/backlight/${self.card}/brightness` which requires polybar
; to have write access to that file.
; DO NOT RUN POLYBAR AS ROOT.
; The recommended way is to add the user to the
; `video` group and give that group write-privileges for the `brightness` file.
; See the ArchWiki for more information:
; https://wiki.archlinux.org/index.php/Backlight#ACPI
; Default: false
enable-scroll = true
; Interval for changing the brightness (in percentage points).
; New in version 3.7.0
; Default: 5
scroll-interval = 10
; Available tags:
; <label> (default)
; <ramp>
; <bar>
format = <ramp> <label>
; Available tokens:
; %percentage% (default)
label = %percentage%%
; Only applies if <ramp> is used
ramp-foreground = ${colors.peach}
ramp-0 = ""
ramp-1 = ""
ramp-2 = ""
ramp-3 = ""
ramp-4 = ""
ramp-5 = ""
ramp-6 = ""
ramp-7 = ""
ramp-8 = ""
; Only applies if <bar> is used
bar-width = 10
bar-indicator = |
bar-fill =
bar-empty =
[module/mpd]
type = internal/mpd
; Host where mpd is running (either ip or domain name)
; Can also be the full path to a unix socket where mpd is running.
host = 127.0.0.1
port = 6600
; password = mysecretpassword
; Seconds to sleep between progressbar/song timer sync
; Default: 1
interval = 2
; Available tags:
; <label-song> (default)
; <label-time>
; <bar-progress>
; <toggle> - gets replaced with <icon-(pause|play)>
; <toggle-stop> - gets replaced with <icon-(stop|play)>
; <icon-random>
; <icon-repeat>
; <icon-repeatone> (deprecated)
; <icon-single> - Toggle playing only a single song. Replaces <icon-repeatone>
; <icon-consume>
; <icon-prev>
; <icon-stop>
; <icon-play>
; <icon-pause>
; <icon-next>
; <icon-seekb>
; <icon-seekf>
format-online = <icon-prev> <icon-seekb> <icon-stop> <toggle> <icon-seekf> <icon-next> <icon-repeat> <icon-random> <bar-progress> <label-time> <label-song>
;format-playing = ${self.format-online}
;format-paused = ${self.format-online}
;format-stopped = ${self.format-online}
; Available tags:
; <label-offline>
; Default: ""
;format-offline = <label-offline>
; Available tokens:
; %artist%
; %album-artist%
; %album%
; %date%
; %title%
; Default: %artist% - %title%
label-song = 𝄞 %artist% - %title%
; Available tokens:
; %elapsed%
; %total%
; Default: %elapsed% / %total%
;label-time = %elapsed% / %total%
; Available tokens:
; None
label-offline = 🎜 mpd is offline
; Only applies if <icon-X> is used
icon-play =
icon-pause =
icon-stop =
icon-prev =
icon-next =
icon-seekb =
icon-seekf =
icon-random = 🔀
icon-repeat = 🔁
icon-repeatone = 🔂
icon-single = 🔂
icon-consume =
; Used to display the state of random/repeat/repeatone/single
; Only applies if <icon-[random|repeat|repeatone|single]> is used
toggle-on-foreground = #ff
toggle-off-foreground = #55
; Only applies if <bar-progress> is used
bar-progress-width = 45
bar-progress-indicator = |
bar-progress-fill =
bar-progress-empty =
[module/github]
type = internal/github
; Accessing an access token stored in file
;token = ${file:/path/to/file/containing/github/access.token}
; Accessing an access token stored in an environment variable
token = ${env:GITHUB_ACCESS_TOKEN}
; The github user for the token
; Effectively required; otherwise the module uses a deprecated method of fetching
; notifications, which has stopped working
user = fscotto
; Whether empty notifications should be displayed or not
empty-notifications = false
; Number of seconds in between requests
interval = 10
; Github API URL
; Default: https://api.github.com/
;api-url = https://hub.example.org/api/v3/
; Available tags:
; <label> (default)
format = <label>
; Available tokens:
; %notifications% (default)
; Default: Notifications: %notifications%
label = %notifications%
; Used when GitHub can't be reached
; Available tags:
; <label-offline> (default)
format-offline = <label-offline>
; Available tokens:
; None
; Default: Offline
label-offline = Offline
[module/spotify]
type = custom/script
tail = true
interval = 1
; prefix symbol is shown before the text
format-prefix = "󰋄 "
format-prefix-foreground = ${colors.blue}
format = <label>
format-foreground = ${colors.sapphire}
exec = ~/.config/polybar/scripts/scroll_spotify_status.sh
[module/spotify-prev]
type = custom/script
exec = echo "󰙤 "
format = <label>
click-left = playerctl previous -p spotify
[module/spotify-play-pause]
type = custom/ipc
hook-0 = echo " "
hook-1 = echo " "
initial = 1
click-left = playerctl play-pause -p spotify
[module/spotify-next]
type = custom/script
exec = echo "󰙢 "
format = <label>
click-left = playerctl next -p spotify

View File

@@ -1,21 +0,0 @@
#!/bin/bash
# Paths to battery capacity files
battery0_capacity="/sys/class/power_supply/BAT0/capacity"
battery1_capacity="/sys/class/power_supply/BAT1/capacity"
# Check if the capacity files exist
if [[ -f "$battery0_capacity" && -f "$battery1_capacity" ]]; then
# Read the battery percentages
battery0_charge=$(cat "$battery0_capacity")
battery1_charge=$(cat "$battery1_capacity")
# Calculate the average charge
average_charge=$(( (battery0_charge + battery1_charge) / 2 ))
# Print the average percentage
echo "$average_charge%"
else
# If one of the files is missing, print an error
echo "Error: one or more battery capacity files not found."
fi

View File

@@ -1,51 +0,0 @@
#!/bin/bash
# The name of polybar bar which houses the main spotify module and the control modules.
PARENT_BAR="now-playing"
PARENT_BAR_PID=$(pgrep -a "polybar" | grep "$PARENT_BAR" | cut -d" " -f1)
# Set the source audio player here.
# Players supporting the MPRIS spec are supported.
# Examples: spotify, vlc, chrome, mpv and others.
# Use `playerctld` to always detect the latest player.
# See more here: https://github.com/altdesktop/playerctl/#selecting-players-to-control
PLAYER="playerctld"
# Format of the information displayed
# Eg. {{ artist }} - {{ album }} - {{ title }}
# See more attributes here: https://github.com/altdesktop/playerctl/#printing-properties-and-metadata
FORMAT="{{ title }} - {{ artist }}"
# Sends $2 as message to all polybar PIDs that are part of $1
update_hooks() {
while IFS= read -r id
do
polybar-msg -p "$id" hook spotify-play-pause $2 1>/dev/null 2>&1
done < <(echo "$1")
}
PLAYERCTL_STATUS=$(playerctl --player=$PLAYER status 2>/dev/null)
EXIT_CODE=$?
if [ $EXIT_CODE -eq 0 ]; then
STATUS=$PLAYERCTL_STATUS
else
STATUS="No player is running"
fi
if [ "$1" == "--status" ]; then
echo "$STATUS"
else
if [ "$STATUS" = "Stopped" ]; then
echo "No music is playing"
elif [ "$STATUS" = "Paused" ]; then
update_hooks "$PARENT_BAR_PID" 2
playerctl --player=$PLAYER metadata --format "$FORMAT"
elif [ "$STATUS" = "No player is running" ]; then
echo "$STATUS"
else
update_hooks "$PARENT_BAR_PID" 1
playerctl --player=$PLAYER metadata --format "$FORMAT"
fi
fi

View File

@@ -1,65 +0,0 @@
#!/usr/bin/env bash
DIR="$HOME/.config/polybar"
get_bars () {
find -H $DIR -name "config.ini" | xargs cat | grep -e "\[bar\/" | sort -u | sed "s/\[bar\// /g" | sed "s/.$//g"
}
error () {
cat <<- EOF
Usage : launch.sh [bar] [theme]
bars (defined in any config.ini):
EOF
get_bars
cat <<- EOF
themes:
rounded
grayblocks
EOF
exit 0
}
# Launch the bar
launch-bar () {
# Terminate already running bar instances
killall -q polybar
if [[ -f ~/.config/bspwm/bspwmrc ]]; then
sed -i -e "s/polybar.*/polybar\/launch\.sh $bar $style \&/g" ~/.config/bspwm/bspwmrc
fi
# Wait until the processes have been shut down
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
if type "xrandr"; then
for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
POLYBAR_MONITOR=$m polybar --reload $bar -c "$DIR"/"$style"/config.ini &
done
else
polybar --reload $bar -c "$DIR"/"$style"/config.ini &
fi
}
if [[ "$1" = "bspwm" ]]; then
bar="bspwm"
elif [[ "$1" = "awesomewm" ]]; then
bar="awesomewm"
else
error
fi
if [[ "$2" = "rounded" ]]; then
style="rounded"
launch-bar
elif [[ "$2" = "grayblocks" ]]; then
style="grayblocks"
launch-bar
else
error
fi

View File

@@ -1,13 +0,0 @@
#!/bin/bash
# see man zscroll for documentation of the following parameters
zscroll -l 30 \
--delay 0.1 \
--scroll-padding "  " \
--match-command "`dirname $0`/get_spotify_status.sh --status" \
--match-text "Playing" "--scroll 1" \
--match-text "Paused" "--scroll 0" \
--update-check true "`dirname $0`/get_spotify_status.sh" &
wait

View File

@@ -1,33 +0,0 @@
;-------------------------
; Catppuccin Frappé Palette
; Maintainer: justTOBBI
;--------------------------
[colors]
rosewater = #f2d5cf
flamingo = #eebebe
pink = #f4b8e4
mauve = #ca9ee6
red = #e78284
maroon = #ea999c
peach = #ef9f76
yellow = #e5c890
green = #a6d189
teal = #81c8be
sky = #99d1db
sapphire = #85c1dc
blue = #8caaee
lavender = #babbf1
text = #c6d0f5
subtext1 = #b5bfe2
subtext0 = #a5adce
overlay2 = #949cbb
overlay1 = #838ba7
overlay0 = #737994
surface2 = #626880
surface1 = #51576d
surface0 = #414559
base = #303446
mantle = #292c3c
crust = #232634
transparent = #FF00000

View File

@@ -1,33 +0,0 @@
;-------------------------
; Catppuccin Latte Palette
; Maintainer: justTOBBI
;--------------------------
[colors]
rosewater = #dc8a78
flamingo = #dd7878
pink = #ea76cb
mauve = #8839ef
red = #d20f39
maroon = #e64553
peach = #fe640b
yellow = #df8e1d
green = #40a02b
teal = #179299
sky = #04a5e5
sapphire = #209fb5
blue = #1e66f5
lavender = #7287fd
text = #4c4f69
subtext1 = #5c5f77
subtext0 = #6c6f85
overlay2 = #7c7f93
overlay1 = #8c8fa1
overlay0 = #9ca0b0
surface2 = #acb0be
surface1 = #bcc0cc
surface0 = #ccd0da
base = #eff1f5
mantle = #e6e9ef
crust = #dce0e8
transparent = #FF00000

View File

@@ -1,33 +0,0 @@
;-------------------------
; Catppuccin Macchiato Palette
; Maintainer: justTOBBI
;--------------------------
[colors]
rosewater = #f4dbd6
flamingo = #f0c6c6
pink = #f5bde6
mauve = #c6a0f6
red = #ed8796
maroon = #ee99a0
peach = #f5a97f
yellow = #eed49f
green = #a6da95
teal = #8bd5ca
sky = #91d7e3
sapphire = #7dc4e4
blue = #8aadf4
lavender = #b7bdf8
text = #cad3f5
subtext1 = #b8c0e0
subtext0 = #a5adcb
overlay2 = #939ab7
overlay1 = #8087a2
overlay0 = #6e738d
surface2 = #5b6078
surface1 = #494d64
surface0 = #363a4f
base = #24273a
mantle = #1e2030
crust = #181926
transparent = #FF00000

View File

@@ -1,33 +0,0 @@
;-------------------------
; Catppuccin Mocha Palette
; Maintainer: justTOBBI
;--------------------------
[colors]
rosewater = #f5e0dc
flamingo = #f2cdcd
pink = #f5c2e7
mauve = #cba6f7
red = #f38ba8
maroon = #eba0ac
peach = #fab387
yellow = #f9e2af
green = #a6e3a1
teal = #94e2d5
sky = #89dceb
sapphire = #74c7ec
blue = #89b4fa
lavender = #b4befe
text = #cdd6f4
subtext1 = #bac2de
subtext0 = #a6adc8
overlay2 = #9399b2
overlay1 = #7f849c
overlay0 = #6c7086
surface2 = #585b70
surface1 = #45475a
surface0 = #313244
base = #1e1e2e
mantle = #181825
crust = #11111b
transparent = #FF00000