Minimal i3 setup

This commit is contained in:
Fabio Scotto di Santolo
2026-03-15 22:00:35 +01:00
parent 6e0f5eb83b
commit 34276c2de1
33 changed files with 1034 additions and 52 deletions

View File

@@ -0,0 +1,125 @@
; thunar GtkAccelMap rc-file -*- scheme -*-
; this file is an automated accelerator map dump
;
; (gtk_accel_path "<Actions>/ThunarStandardView/sort-by-type" "")
; (gtk_accel_path "<Actions>/ThunarStatusBar/toggle-last-modified" "")
; (gtk_accel_path "<Actions>/Thunarwindow/menu" "")
; (gtk_accel_path "<Actions>/ThunarActionManager/cut" "<Primary>x")
; (gtk_accel_path "<Actions>/ThunarStandardView/sort-by-size" "")
; (gtk_accel_path "<Actions>/ThunarWindow/file-menu" "")
; (gtk_accel_path "<Actions>/ThunarWindow/close-tab" "<Primary>w")
; (gtk_accel_path "<Actions>/ThunarWindow/switch-previous-tab-alt" "<Primary><Shift>ISO_Left_Tab")
; (gtk_accel_path "<Actions>/ThunarStatusBar/toggle-size" "")
; (gtk_accel_path "<Actions>/ThunarWindow/new-window" "<Primary>n")
; (gtk_accel_path "<Actions>/ThunarWindow/clear-directory-specific-settings" "")
; (gtk_accel_path "<Actions>/ThunarWindow/close-window" "<Primary>q")
; (gtk_accel_path "<Actions>/ThunarWindow/open-parent" "<Alt>Up")
; (gtk_accel_path "<Actions>/ThunarWindow/view-side-pane-menu" "")
; (gtk_accel_path "<Actions>/ThunarStatusBar/toggle-size-in-bytes" "")
; (gtk_accel_path "<Actions>/ThunarWindow/switch-previous-tab" "<Primary>Page_Up")
; (gtk_accel_path "<Actions>/ThunarActionManager/open" "<Primary>o")
; (gtk_accel_path "<Actions>/ThunarStandardView/sort-ascending" "")
; (gtk_accel_path "<Actions>/ThunarWindow/toggle-split-view" "F3")
; (gtk_accel_path "<Actions>/ThunarActionManager/copy-2" "<Primary>Insert")
; (gtk_accel_path "<Actions>/ThunarActionManager/trash-delete" "Delete")
; (gtk_accel_path "<Actions>/ThunarWindow/open-recent" "")
; (gtk_accel_path "<Actions>/ThunarWindow/view-configure-toolbar" "")
; (gtk_accel_path "<Actions>/ThunarStandardView/forward" "<Alt>Right")
; (gtk_accel_path "<Actions>/ThunarActionManager/restore" "")
; (gtk_accel_path "<Actions>/ThunarWindow/open-location-alt" "<Alt>d")
; (gtk_accel_path "<Actions>/ThunarWindow/zoom-out-alt" "<Primary>KP_Subtract")
; (gtk_accel_path "<Actions>/ThunarStandardView/select-by-pattern" "<Primary>s")
; (gtk_accel_path "<Actions>/ThunarWindow/open-file-menu" "F10")
; (gtk_accel_path "<Actions>/ThunarWindow/contents" "F1")
; (gtk_accel_path "<Actions>/ThunarWindow/show-highlight" "")
; (gtk_accel_path "<Actions>/ThunarStandardView/sort-descending" "")
; (gtk_accel_path "<Actions>/ThunarStandardView/sort-by-name" "")
; (gtk_accel_path "<Actions>/ThunarStandardView/select-all-files" "<Primary>a")
; (gtk_accel_path "<Actions>/ThunarActionManager/execute" "")
; (gtk_accel_path "<Actions>/ThunarStandardView/properties" "<Alt>Return")
; (gtk_accel_path "<Actions>/ThunarActionManager/cut-2" "")
; (gtk_accel_path "<Actions>/ThunarStandardView/sort-by-dtime" "")
; (gtk_accel_path "<Actions>/ThunarWindow/switch-next-tab" "<Primary>Page_Down")
; (gtk_accel_path "<Actions>/ThunarWindow/open-templates" "")
; (gtk_accel_path "<Actions>/ThunarActionManager/paste-2" "<Shift>Insert")
; (gtk_accel_path "<Actions>/ThunarStatusBar/toggle-filetype" "")
; (gtk_accel_path "<Actions>/ThunarWindow/close-all-windows" "<Primary><Shift>w")
; (gtk_accel_path "<Actions>/ThunarStandardView/create-document" "")
; (gtk_accel_path "<Actions>/ThunarWindow/detach-tab" "")
; (gtk_accel_path "<Actions>/ThunarWindow/cancel-search" "Escape")
; (gtk_accel_path "<Actions>/ThunarWindow/zoom-in-alt2" "<Primary>equal")
; (gtk_accel_path "<Actions>/ThunarStatusBar/toggle-hidden-count" "")
; (gtk_accel_path "<Actions>/ThunarShortcutsPane/sendto-shortcuts" "<Primary>d")
; (gtk_accel_path "<Actions>/ThunarActionManager/undo" "<Primary>z")
; (gtk_accel_path "<Actions>/ThunarStandardView/toggle-sort-order" "")
; (gtk_accel_path "<Actions>/ThunarWindow/view-location-selector-entry" "")
; (gtk_accel_path "<Actions>/ThunarActionManager/paste" "<Primary>v")
; (gtk_accel_path "<Actions>/ThunarWindow/zoom-in-alt1" "<Primary>KP_Add")
; (gtk_accel_path "<Actions>/ThunarWindow/view-menubar" "<Primary>m")
; (gtk_accel_path "<Actions>/ThunarStandardView/back" "<Alt>Left")
; (gtk_accel_path "<Actions>/ThunarWindow/open-desktop" "")
; (gtk_accel_path "<Actions>/ThunarWindow/view-as-detailed-list" "<Primary>2")
; (gtk_accel_path "<Actions>/ThunarActionManager/restore-show" "")
; (gtk_accel_path "<Actions>/ThunarWindow/sendto-menu" "")
; (gtk_accel_path "<Actions>/ThunarStatusBar/toggle-display-name" "")
; (gtk_accel_path "<Actions>/ThunarWindow/go-menu" "")
; (gtk_accel_path "<Actions>/ThunarWindow/zoom-out" "<Primary>minus")
; (gtk_accel_path "<Actions>/ThunarWindow/remove-from-recent" "")
; (gtk_accel_path "<Actions>/ThunarActionManager/open-with-other" "")
; (gtk_accel_path "<Actions>/ThunarStandardView/invert-selection" "<Primary><Shift>i")
; (gtk_accel_path "<Actions>/ThunarWindow/view-side-pane-shortcuts" "<Primary>b")
; (gtk_accel_path "<Actions>/ThunarWindow/reload-alt-2" "Reload")
; (gtk_accel_path "<Actions>/ThunarWindow/view-location-selector-menu" "")
; (gtk_accel_path "<Actions>/ThunarWindow/reload" "<Primary>r")
; (gtk_accel_path "<Actions>/ThunarWindow/edit-menu" "")
; (gtk_accel_path "<Actions>/ThunarActionManager/copy" "<Primary>c")
; (gtk_accel_path "<Actions>/ThunarWindow/bookmarks-menu" "")
; (gtk_accel_path "<Actions>/ThunarStandardView/forward-alt" "Forward")
; (gtk_accel_path "<Actions>/ThunarActionManager/move-to-trash" "")
; (gtk_accel_path "<Actions>/ThunarWindow/reload-alt-1" "F5")
; (gtk_accel_path "<Actions>/ThunarActionManager/delete-3" "<Shift>KP_Delete")
; (gtk_accel_path "<Actions>/ThunarStandardView/unselect-all-files" "Escape")
; (gtk_accel_path "<Actions>/ThunarWindow/contents/help-menu" "")
; (gtk_accel_path "<Actions>/ThunarStandardView/arrange-items-menu" "")
; (gtk_accel_path "<Actions>/ThunarStandardView/sort-by-mtime" "")
; (gtk_accel_path "<Actions>/ThunarWindow/open-computer" "")
; (gtk_accel_path "<Actions>/ThunarWindow/toggle-image-preview" "")
; (gtk_accel_path "<Actions>/ThunarWindow/toggle-side-pane" "F9")
; (gtk_accel_path "<Actions>/ThunarWindow/view-as-icons" "<Primary>1")
; (gtk_accel_path "<Actions>/ThunarActionManager/delete-2" "<Shift>Delete")
; (gtk_accel_path "<Actions>/ThunarWindow/zoom-in" "<Primary>plus")
; (gtk_accel_path "<Actions>/ThunarStandardView/rename" "F2")
; (gtk_accel_path "<Actions>/ThunarWindow/open-location" "<Primary>l")
; (gtk_accel_path "<Actions>/ThunarWindow/view-as-compact-list" "<Primary>3")
; (gtk_accel_path "<Actions>/ThunarWindow/view-menu" "")
; (gtk_accel_path "<Actions>/ThunarWindow/search" "<Primary>f")
; (gtk_accel_path "<Actions>/ThunarWindow/new-tab" "<Primary>t")
; (gtk_accel_path "<Actions>/ThunarWindow/zoom-reset" "<Primary>0")
; (gtk_accel_path "<Actions>/ThunarStandardView/back-alt2" "Back")
; (gtk_accel_path "<Actions>/ThunarActionManager/open-in-new-tab" "<Primary><Shift>p")
; (gtk_accel_path "<Actions>/ThunarWindow/view-location-selector-buttons" "")
; (gtk_accel_path "<Actions>/ThunarActionManager/redo" "<Primary><Shift>z")
; (gtk_accel_path "<Actions>/ThunarWindow/open-trash" "")
; (gtk_accel_path "<Actions>/ThunarActionManager/open-in-new-window" "<Primary><Shift>o")
; (gtk_accel_path "<Actions>/ThunarWindow/view-statusbar" "")
; (gtk_accel_path "<Actions>/ThunarActionManager/open-location" "")
; (gtk_accel_path "<Actions>/ThunarStandardView/duplicate" "")
; (gtk_accel_path "<Actions>/ThunarActionManager/trash-delete-2" "KP_Delete")
; (gtk_accel_path "<Actions>/ThunarStandardView/back-alt1" "BackSpace")
; (gtk_accel_path "<Actions>/ThunarStandardView/create-folder" "<Primary><Shift>n")
; (gtk_accel_path "<Actions>/ThunarWindow/open-home" "<Alt>Home")
; (gtk_accel_path "<Actions>/ThunarWindow/switch-focused-split-view-pane" "")
; (gtk_accel_path "<Actions>/ThunarWindow/show-hidden" "<Primary>h")
; (gtk_accel_path "<Actions>/ThunarStandardView/set-default-app" "")
; (gtk_accel_path "<Actions>/ThunarWindow/empty-trash" "")
; (gtk_accel_path "<Actions>/ThunarWindow/preferences" "")
; (gtk_accel_path "<Actions>/ThunarActionManager/delete" "")
; (gtk_accel_path "<Actions>/ThunarWindow/open-network" "")
; (gtk_accel_path "<Actions>/ThunarWindow/view-side-pane-tree" "<Primary>e")
; (gtk_accel_path "<Actions>/ThunarWindow/open-file-system" "")
; (gtk_accel_path "<Actions>/ThunarWindow/search-alt" "Search")
; (gtk_accel_path "<Actions>/ThunarWindow/switch-next-tab-alt" "<Primary>Tab")
; (gtk_accel_path "<Actions>/ThunarActionManager/sendto-desktop" "")
; (gtk_accel_path "<Actions>/ThunarStandardView/make-link" "")
; (gtk_accel_path "<Actions>/ThunarWindow/zoom-reset-alt" "<Primary>KP_0")
; (gtk_accel_path "<Actions>/ThunarWindow/about" "")

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<actions>
<action>
<icon>utilities-terminal</icon>
<name>Open Terminal Here</name>
<submenu></submenu>
<unique-id>1773500783260441-1</unique-id>
<command>exo-open --working-directory %f --launch TerminalEmulator</command>
<description>Example for a custom action</description>
<range></range>
<patterns>*</patterns>
<startup-notify/>
<directories/>
</action>
</actions>

View File

@@ -0,0 +1,44 @@
[window]
padding = { x = 8, y = 8 }
opacity = 1.0
[font]
normal = { family = "Liberation Mono", style = "Regular" }
size = 10
[scrolling]
history = 10000
multiplier = 3
[cursor]
style = { shape = "Beam", blinking = "Off" }
[colors.primary]
background = "#000000"
foreground = "#c8c8c8"
[colors.normal]
black = "#1f1f28"
red = "#c7162b"
green = "#4caf50"
yellow = "#e95420"
blue = "#4a90d9"
magenta = "#7e57c2"
cyan = "#6daeea"
white = "#eeeeee"
[colors.bright]
black = "#3a3a46"
red = "#ff5c5c"
green = "#7ad97a"
yellow = "#ff8f40"
blue = "#6daeea"
magenta = "#9575cd"
cyan = "#8bd6ff"
white = "#ffffff"
[keyboard]
bindings = [
{ key = "V", mods = "Control|Shift", action = "Paste" },
{ key = "C", mods = "Control|Shift", action = "Copy" }
]

View File

@@ -0,0 +1,54 @@
[global]
monitor = 0
follow = mouse
gap_size = 10
width = 360
height = 120
origin = top-right
offset = 20x40
font = Liberation Sans 10
line_height = 2
padding = 12
horizontal_padding = 12
text_icon_padding = 8
separator_height = 2
frame_width = 2
corner_radius = 8
transparency = 0
background = "#1f1f28"
foreground = "#eeeeee"
frame_color = "#4a90d9"
separator_color = frame
timeout = 5
markup = full
format = "<b>%s</b>\n%b"
icon_position = left
min_icon_size = 24
max_icon_size = 32
[urgency_low]
background = "#1f1f28"
foreground = "#bcbcbc"
frame_color = "#3a3a46"
timeout = 3
[urgency_normal]
background = "#1f1f28"
foreground = "#eeeeee"
frame_color = "#4a90d9"
timeout = 5
[urgency_critical]
background = "#1f1f28"
foreground = "#ffffff"
frame_color = "#c7162b"
timeout = 0

View File

@@ -0,0 +1,218 @@
# i3 config for nymph
set $mod Mod4
set $refresh_i3status killall -SIGUSR1 i3status
font pango:Liberation Mono 10
# Start XDG autostart entries (.desktop), useful on Void for pipewire/wireplumber/etc.
exec --no-startup-id dex --autostart --environment i3
exec --no-startup-id gnome-keyring-daemon --start --components=secrets
exec_always --no-startup-id feh --bg-fill ~/.config/i3/wallpapers/gargantua2.png
exec_always --no-startup-id ~/.config/i3/scripts/setup-gtk-theme.sh
exec --no-startup-id /usr/libexec/xdg-desktop-portal
# Audio
exec --no-startup-id pipewire
exec --no-startup-id pipewire-pulse
exec --no-startup-id wireplumber
# Tray services
exec --no-startup-id dunst
exec --no-startup-id xfce-polkit
exec --no-startup-id nm-applet
exec --no-startup-id blueman-applet
exec --no-startup-id udiskie --tray --automount
exec --no-startup-id volumeicon
exec --no-startup-id xfce4-power-manager
exec --no-startup-id xfce4-clipman
# Lock before suspend
exec --no-startup-id xss-lock --transfer-sleep-lock -- ~/.config/i3/scripts/lockscreen
# General behavior
focus_follows_mouse no
mouse_warping none
floating_modifier $mod
tiling_drag modifier titlebar
# Borders
default_border pixel 2
default_floating_border pixel 2
new_window pixel 2
new_float pixel 2
hide_edge_borders none
# vim-like directions
set $left h
set $down j
set $up k
set $right l
# Terminal
bindsym $mod+Return exec --no-startup-id /usr/bin/alacritty
# Emergency terminal fallback
bindsym $mod+Shift+Return exec --no-startup-id xterm
# Launcher
#bindsym $mod+d exec --no-startup-id "rofi -modi drun,run -show drun"
bindsym $mod+d exec --no-startup-id "rofi -show drun -theme ~/.config/rofi/config.rasi"
# Audio panel control
bindsym $mod+Shift+v exec --no-startup-id pavucontrol
# File manager
bindsym $mod+Shift+f exec thunar
# Manual lock screen
bindsym $mod+Shift+x exec ~/.config/i3/scripts/lockscreen
# Kill focused window
bindsym $mod+Shift+q kill
# Screenshot
bindsym Print exec xfce4-screenshooter
bindsym Shift+Print exec xfce4-screenshooter -r
bindsym Alt+Print exec xfce4-screenshooter -w
# Focus
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# Move windows
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# Split
bindsym $mod+b split h
bindsym $mod+v split v
# Layouts
bindsym $mod+f fullscreen toggle
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# Floating / focus mode
bindsym $mod+Shift+space floating toggle
bindsym $mod+space focus mode_toggle
bindsym $mod+a focus parent
# Scratchpad
bindsym $mod+Shift+minus move scratchpad
bindsym $mod+minus scratchpad show
# Volume (PipeWire / PulseAudio compatibility)
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5% && $refresh_i3status
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5% && $refresh_i3status
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle
# Brightness
bindsym XF86MonBrightnessUp exec --no-startup-id brightnessctl set +10% && pkill -RTMIN+5 i3blocks
bindsym XF86MonBrightnessDown exec --no-startup-id brightnessctl set 10%- && pkill -RTMIN+5 i3blocks
# Media keys
bindsym XF86AudioPlay exec --no-startup-id playerctl play-pause
bindsym XF86AudioNext exec --no-startup-id playerctl next
bindsym XF86AudioPrev exec --no-startup-id playerctl previous
# Workspaces
set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
set $ws5 "5"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
set $ws10 "10"
bindsym $mod+1 workspace number $ws1
bindsym $mod+2 workspace number $ws2
bindsym $mod+3 workspace number $ws3
bindsym $mod+4 workspace number $ws4
bindsym $mod+5 workspace number $ws5
bindsym $mod+6 workspace number $ws6
bindsym $mod+7 workspace number $ws7
bindsym $mod+8 workspace number $ws8
bindsym $mod+9 workspace number $ws9
bindsym $mod+0 workspace number $ws10
bindsym $mod+Shift+1 move container to workspace number $ws1
bindsym $mod+Shift+2 move container to workspace number $ws2
bindsym $mod+Shift+3 move container to workspace number $ws3
bindsym $mod+Shift+4 move container to workspace number $ws4
bindsym $mod+Shift+5 move container to workspace number $ws5
bindsym $mod+Shift+6 move container to workspace number $ws6
bindsym $mod+Shift+7 move container to workspace number $ws7
bindsym $mod+Shift+8 move container to workspace number $ws8
bindsym $mod+Shift+9 move container to workspace number $ws9
bindsym $mod+Shift+0 move container to workspace number $ws10
# Reload / restart / exit
bindsym $mod+Shift+c reload
bindsym $mod+Shift+r restart
bindsym $mod+Shift+BackSpace exec --no-startup-id i3-msg exit
bindsym $mod+Shift+Escape exec --no-startup-id ~/.config/i3/scripts/powermenu.sh
# Resize mode
mode "resize" {
bindsym $left resize shrink width 10 px or 10 ppt
bindsym $down resize grow height 10 px or 10 ppt
bindsym $up resize shrink height 10 px or 10 ppt
bindsym $right resize grow width 10 px or 10 ppt
bindsym Left resize shrink width 10 px or 10 ppt
bindsym Down resize grow height 10 px or 10 ppt
bindsym Up resize shrink height 10 px or 10 ppt
bindsym Right resize grow width 10 px or 10 ppt
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym $mod+r mode "default"
}
bindsym $mod+r mode "resize"
# i3bar + i3status
bar {
status_command i3blocks
position bottom
tray_output primary
font pango:Liberation Mono 10
colors {
background #1f1f28
statusline #d0d0d0
separator #3a3a46
focused_workspace #4a90d9 #4a90d9 #ffffff
active_workspace #3a3a46 #2b2b36 #d0d0d0
inactive_workspace #1f1f28 #1f1f28 #9a9a9a
urgent_workspace #c7162b #c7162b #ffffff
}
}
client.focused #4a90d9 #4a90d9 #ffffff #4a90d9 #4a90d9
client.focused_inactive #3a3a46 #2b2b36 #eeeeee #3a3a46 #3a3a46
client.unfocused #2b2b36 #1f1f28 #bcbcbc #2b2b36 #2b2b36
client.urgent #c7162b #c7162b #ffffff #c7162b #c7162b
client.placeholder #1f1f28 #1f1f28 #bcbcbc #1f1f28 #1f1f28
client.background #1f1f28

View File

@@ -0,0 +1,94 @@
#!/usr/bin/env bash
battery_json() {
local total_now=0
local total_full=0
local overall_status=""
local now full status bat capacity icon color
shopt -s nullglob
for bat in /sys/class/power_supply/BAT*; do
[[ -d "$bat" ]] || continue
if [[ -r "$bat/energy_now" && -r "$bat/energy_full" ]]; then
now=$(<"$bat/energy_now")
full=$(<"$bat/energy_full")
elif [[ -r "$bat/charge_now" && -r "$bat/charge_full" ]]; then
now=$(<"$bat/charge_now")
full=$(<"$bat/charge_full")
else
continue
fi
status=$(<"$bat/status")
(( total_now += now ))
(( total_full += full ))
case "$status" in
Charging)
overall_status="Charging"
;;
Discharging)
[[ "$overall_status" != "Charging" ]] && overall_status="Discharging"
;;
Full)
[[ -z "$overall_status" ]] && overall_status="Full"
;;
*)
[[ -z "$overall_status" ]] && overall_status="$status"
;;
esac
done
(( total_full > 0 )) || return 1
capacity=$(( 100 * total_now / total_full ))
case "$overall_status" in
Charging) icon="⚡" ;;
Discharging) icon="🔋" ;;
Full) icon="✔" ;;
*) icon="?" ;;
esac
if (( capacity <= 15 )); then
color="#ff5555"
elif (( capacity <= 30 )); then
color="#f1fa8c"
else
color="#ffffff"
fi
printf '{"full_text":"%s %s%%","name":"battery","color":"%s"}' \
"$icon" "$capacity" "$color"
}
i3status | while IFS= read -r line; do
case "$line" in
'{"version":'* | '[')
printf '%s\n' "$line"
;;
,*)
batt="$(battery_json)"
if [[ -n "$batt" ]]; then
line="${line#,}"
printf ',[%s,%s\n' "$batt" "${line#\[}"
else
printf '%s\n' "$line"
fi
;;
\[*)
batt="$(battery_json)"
if [[ -n "$batt" ]]; then
printf '[%s,%s\n' "$batt" "${line#\[}"
else
printf '%s\n' "$line"
fi
;;
*)
printf '%s\n' "$line"
;;
esac
done

View File

@@ -0,0 +1,33 @@
#!/bin/sh
img=/tmp/lockscreen.png
# screenshot
scrot "$img"
# blur
convert "$img" -blur 0x8 "$img"
# lock
i3lock \
--image "$img" \
--clock \
--indicator \
--radius 100 \
--ring-width 8 \
--color=000000ff \
--ring-color=2f4058ff \
--inside-color=1f1f28ff \
--line-color=00000000 \
--separator-color=3a3a46ff \
--keyhl-color=6daeeaff \
--bshl-color=c7162bff \
--ringver-color=4a90d9ff \
--insidever-color=1f1f28ff \
--ringwrong-color=c7162bff \
--insidewrong-color=1f1f28ff \
--time-color=d0d0d0ff \
--date-color=9a9a9aff \
--layout-color=d0d0d0ff \
--verif-color=d0d0d0ff \
--wrong-color=d0d0d0ff

View File

@@ -0,0 +1,29 @@
#!/bin/sh
choice="$(printf "⏻ Shutdown\n Reboot\n Logout\n Lock\n⏾ Suspend" \
| rofi -dmenu \
-i \
-p "Power" \
-theme ~/.config/rofi/config.rasi \
-theme-str 'window { width: 20%; location: center; anchor: center; } listview { columns: 1; spacing: 6px; }')"
[ -z "$choice" ] && exit 0
case "$choice" in
*Lock)
~/.config/i3/scripts/lockscreen
;;
*Logout)
i3-msg exit
;;
*Suspend)
~/.config/i3/scripts/lockscreen
loginctl suspend
;;
*Reboot)
loginctl reboot
;;
*Shutdown)
loginctl poweroff
;;
esac

View File

@@ -0,0 +1,37 @@
#!/bin/sh
THEME="Yaru-blue-dark"
ICONS="Yaru-blue-dark"
CURSOR="Yaru"
FONT_UI="Liberation Sans 10"
mkdir -p "$HOME/.config/gtk-3.0"
mkdir -p "$HOME/.config/gtk-4.0"
cat > "$HOME/.config/gtk-3.0/settings.ini" <<EOF
[Settings]
gtk-theme-name=$THEME
gtk-icon-theme-name=$ICONS
gtk-cursor-theme-name=$CURSOR
gtk-font-name=$FONT_UI
gtk-application-prefer-dark-theme=1
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle=hintslight
gtk-xft-rgba=rgb
EOF
cat > "$HOME/.config/gtk-4.0/settings.ini" <<EOF
[Settings]
gtk-theme-name=$THEME
gtk-icon-theme-name=$ICONS
gtk-cursor-theme-name=$CURSOR
gtk-font-name=$FONT_UI
gtk-application-prefer-dark-theme=1
EOF
# esporta variabili utili
export GTK_THEME=$THEME
export XCURSOR_THEME=$CURSOR
export XCURSOR_SIZE=24

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 553 KiB

View File

@@ -0,0 +1,27 @@
separator=true
separator_block_width=15
[memory]
command=~/.config/i3blocks/scripts/memory
interval=10
color=#d0d0d0
[temperature]
command=~/.config/i3blocks/scripts/temperature
interval=10
[backlight]
command=~/.config/i3blocks/scripts/backlight
interval=once
signal=5
color=#7dcfff
[essid]
command=~/.config/i3blocks/scripts/wifi
interval=10
color=#4a90d9
[time]
command=date '+%Y-%m-%d %H:%M'
interval=60
color=#d0d0d0

View File

@@ -0,0 +1,14 @@
#!/bin/sh
cur="$(brightnessctl g 2>/dev/null)"
max="$(brightnessctl m 2>/dev/null)"
[ -n "$cur" ] || exit 0
[ -n "$max" ] || exit 0
[ "$max" -gt 0 ] || exit 0
pct=$((100 * cur / max))
echo "BL ${pct}%"
echo "BL ${pct}%"
echo "#6daeea"

View File

@@ -0,0 +1,47 @@
#!/bin/sh
total_now=0
total_full=0
status=""
for bat in /sys/class/power_supply/BAT*; do
[ -d "$bat" ] || continue
if [ -r "$bat/energy_now" ] && [ -r "$bat/energy_full" ]; then
now=$(cat "$bat/energy_now")
full=$(cat "$bat/energy_full")
elif [ -r "$bat/charge_now" ] && [ -r "$bat/charge_full" ]; then
now=$(cat "$bat/charge_now")
full=$(cat "$bat/charge_full")
else
continue
fi
st=$(cat "$bat/status" 2>/dev/null)
total_now=$((total_now + now))
total_full=$((total_full + full))
case "$st" in
Charging) status="⚡" ;;
Discharging) [ -z "$status" ] && status="🔋" ;;
Full) [ -z "$status" ] && status="✔" ;;
esac
done
[ "$total_full" -gt 0 ] || exit 0
pct=$((100 * total_now / total_full))
[ -n "$status" ] || status="BAT"
text="$status $pct%"
if [ "$pct" -le 15 ]; then
color="#ff5555"
elif [ "$pct" -le 30 ]; then
color="#f1fa8c"
else
color="#9ece6a"
fi
printf '%s\n%s\n%s\n' "$text" "$text" "$color"

View File

@@ -0,0 +1,17 @@
#!/bin/sh
state="$(xset q 2>/dev/null)"
caps="$(printf '%s\n' "$state" | grep 'Caps Lock:' | awk '{print $4}')"
num="$(printf '%s\n' "$state" | grep 'Num Lock:' | awk '{print $8}')"
out=""
[ "$caps" = "on" ] && out="${out} CAPS"
[ "$num" = "on" ] && out="${out} NUM"
[ -n "$out" ] || exit 0
echo "$out"
echo "$out"
echo "#9a9a9a"

View File

@@ -0,0 +1,19 @@
#!/bin/sh
mem=$(free | awk '/^Mem:/ {print $3/$2 * 100.0}')
mem=${mem%.*}
if [ "$mem" -ge 90 ]; then
color="#c7162b"
elif [ "$mem" -ge 70 ]; then
color="#e95420"
else
color="#d0d0d0"
fi
used=$(free -h | awk '/^Mem:/ {print $3}')
total=$(free -h | awk '/^Mem:/ {print $2}')
echo "RAM $used/$total"
echo "RAM $used/$total"
echo "$color"

View File

@@ -0,0 +1,18 @@
#!/bin/sh
t=$(cat /sys/class/thermal/thermal_zone0/temp 2>/dev/null)
[ -n "$t" ] || exit 0
temp=$((t / 1000))
if [ "$temp" -ge 85 ]; then
color="#c7162b"
elif [ "$temp" -ge 70 ]; then
color="#e95420"
else
color="#d0d0d0"
fi
echo "CPU ${temp}°C"
echo "CPU ${temp}°C"
echo "$color"

View File

@@ -0,0 +1,16 @@
#!/bin/sh
mute=$(pactl get-sink-mute @DEFAULT_SINK@ 2>/dev/null | awk '{print $2}')
vol=$(pactl get-sink-volume @DEFAULT_SINK@ 2>/dev/null | awk '/Volume:/ {print $5; exit}')
[ -n "$vol" ] || exit 0
if [ "$mute" = "yes" ]; then
text="VOL mute"
color="#7aa2f7"
else
text="VOL $vol"
color="#c0caf5"
fi
printf '%s\n%s\n%s\n' "$text" "$text" "$color"

View File

@@ -0,0 +1,9 @@
#!/bin/sh
ssid=$(nmcli -t -f active,ssid dev wifi | awk -F: '$1=="yes"{print $2}')
[ -n "$ssid" ] || exit 0
echo "WIFI $ssid"
echo "WIFI $ssid"
echo "#4a90d9"

9
dotfiles/desktop/.xinitrc Executable file
View File

@@ -0,0 +1,9 @@
#!/bin/sh
# dbus session
export XDG_CURRENT_DESKTOP=i3
exec dbus-run-session sh -c "
eval \$(ssh-agent -s)
gpgconf --launch gpg-agent
exec i3
"