Modernize i3 setup: alacritty, dunst, rofi, i3blocks, blurlock, picom updates

This commit is contained in:
2026-02-15 06:05:55 +01:00
parent a4dad1f508
commit 0b9647b407
17 changed files with 139 additions and 73 deletions

View File

@@ -0,0 +1,33 @@
[window]
opacity = 0.8
padding = { x = 5, y = 5 }
[font]
size = 11.0
[font.normal]
family = "monospace"
[colors.primary]
background = "#222D31"
foreground = "#F9FAF9"
[colors.normal]
black = "#2F3D44"
red = "#CB4B16"
green = "#1ABC9C"
yellow = "#FFBF00"
blue = "#268BD2"
magenta = "#D33682"
cyan = "#16a085"
white = "#EEE8D5"
[colors.bright]
black = "#556064"
red = "#FF6666"
green = "#33CC33"
yellow = "#FDF6E3"
blue = "#839496"
magenta = "#6C71C4"
cyan = "#93A1A1"
white = "#F9FAF9"

View File

@@ -14,7 +14,7 @@
# <http://developer.gnome.org/pango/stable/PangoMarkupFormat.html>. # <http://developer.gnome.org/pango/stable/PangoMarkupFormat.html>.
# If markup is not allowed, those tags will be stripped out of the # If markup is not allowed, those tags will be stripped out of the
# message. # message.
markup = yes markup = full
# The format of the message. Possible variables are: # The format of the message. Possible variables are:
# %a appname # %a appname
@@ -116,11 +116,10 @@
# Align icons left/right/off # Align icons left/right/off
icon_position = left icon_position = left
# Paths to default icons. # Icon lookup
icon_path = /usr/share/icons/Adwaita/16x16/status/:/usr/share/icons/Adwaita/16x16/devices/ enable_recursive_icon_lookup = true
icon_theme = Adwaita
# Limit icons size. icon_size = 64
max_icon_size = 64
# Note: [shortcuts] section was removed in dunst 1.7+ # Note: [shortcuts] section was removed in dunst 1.7+
# Use dunstctl for keyboard control instead: # Use dunstctl for keyboard control instead:
@@ -144,22 +143,4 @@
foreground = "#F9FAF9" foreground = "#F9FAF9"
timeout = 8 timeout = 8
[irc]
appname = weechat
timeout = 0
background = "#0033bb"
foreground = "#dddddd"
[weechat hl]
appname = weechat
category = weechat.HL
background = "#FF5C47"
foreground = "#FFFFFF"
[weechat pn]
appname = weechat
category = weechat.PM
background = "#D53B84"
foreground = "#FFFFFF"
# vim: ft=cfg # vim: ft=cfg

View File

@@ -24,15 +24,21 @@ label=
instance=0 instance=0
interval=10 interval=10
[iface] [myi3volume]
command=$HOME/opt/scripts/myi3blocks/myi3volume
label=
interval=5
signal=1
[myi3iface]
command=$HOME/opt/scripts/myi3blocks/myi3iface
label= label=
color=#33CCFF
interval=30 interval=30
[myi3weather-cam] [myi3weather]
command=$HOME/opt/scripts/myi3blocks/myi3weather command=$HOME/opt/scripts/myi3blocks/myi3weather
label= label=
instance=2653941 instance=2867543
interval=600 interval=600
[time] [time]

View File

@@ -37,12 +37,8 @@ invert-color-include = [ ];
glx-copy-from-front = false; glx-copy-from-front = false;
opacity-rule = [ opacity-rule = [
"80:class_g = 'Gnome-terminal'",
"80:class_g = 'Rofi'", "80:class_g = 'Rofi'",
"80:class_g = 'Mousepad'", "80:class_g = 'Mousepad'",
"80:class_g = 'Evolution'",
"80:class_g = 'Pcmanfm'",
"80:class_g = 'Virt-manager'",
"80:class_g = 'i3bar'" "80:class_g = 'i3bar'"
]; ];

View File

@@ -1,6 +1,8 @@
configuration { configuration {
theme: "android_notification"; theme: "gruvbox-dark-hard";
terminal: "gnome-terminal"; terminal: "alacritty";
ssh-client: "ssh"; font: "Noto Sans 12";
ssh-command: "{terminal} -- {ssh-client} {host}"; show-icons: true;
lines: 10;
drun-display-format: "{name}";
} }

View File

@@ -28,19 +28,24 @@ bindsym $mod+d layout toggle split
# Enable touchpad natural scrolling # Enable touchpad natural scrolling
exec_always --no-startup-id xinput set-prop "bcm5974" "libinput Natural Scrolling Enabled" 1 exec_always --no-startup-id xinput set-prop "bcm5974" "libinput Natural Scrolling Enabled" 1
bindsym $mod+Shift+Return exec gnome-terminal bindsym $mod+Shift+Return exec alacritty
bindsym $mod+Shift+w exec vivaldi-stable bindsym $mod+Shift+w exec vivaldi-stable
bindsym $mod+Shift+f exec gnome-terminal -- ranger bindsym $mod+Shift+f exec alacritty -e ranger
bindsym $mod+Shift+e exec mousepad bindsym $mod+Shift+e exec mousepad
bindsym $mod+Shift+p exec keepassxc bindsym $mod+Shift+p exec keepassxc
bindsym $mod+space --release exec "rofi -combi-modi drun,window,ssh -show combi -modi combi" bindsym $mod+space --release exec "rofi -combi-modi drun,window -show combi -modi combi"
bindsym $mod+q kill bindsym $mod+q kill
bindsym $mod+Ctrl+p exec pavucontrol bindsym $mod+Ctrl+p exec pavucontrol
bindsym $mod+Ctrl+b exec gnome-terminal -- bmenu bindsym $mod+Ctrl+b exec alacritty -e bmenu
bindsym $mod+Print --release exec --no-startup-id flameshot gui bindsym $mod+Print --release exec --no-startup-id flameshot gui
# Dunst notification control
bindsym $mod+n exec dunstctl close
bindsym $mod+Shift+n exec dunstctl close-all
bindsym $mod+grave exec dunstctl history-pop
# Autostart applications # Autostart applications
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec --no-startup-id nitrogen --restore; sleep 1; picom -b exec --no-startup-id nitrogen --restore; sleep 1; picom -b

View File

@@ -1,8 +1,3 @@
#!/bin/bash #!/bin/bash
echo $(date '+%a, %b %d %I:%M %p') echo $(date '+%a, %b %d %I:%M %p')
case $BLOCK_BUTTON in
1) gsimplecal ;;
*) ;;
esac

View File

@@ -0,0 +1,16 @@
#!/bin/bash
IFACE=$(ip route | grep default | awk '{print $5}' | head -1)
if [[ -z "${IFACE}" ]]; then
echo "No connection"
echo "No connection"
echo "#FF6666"
exit 0
fi
IP=$(ip addr show "${IFACE}" | grep 'inet ' | awk '{print $2}' | cut -d/ -f1)
echo "${IFACE}: ${IP}"
echo "${IP}"
echo "#33CCFF"

View File

@@ -17,6 +17,6 @@ else
fi fi
case $BLOCK_BUTTON in case $BLOCK_BUTTON in
1) gnome-terminal -- htop ;; 1) alacritty -e htop ;;
*) ;; *) ;;
esac esac

View File

@@ -1,6 +1,8 @@
#!/bin/bash #!/bin/bash
MEM_STAT=$(free -m | grep Mem | awk '{print $2,$3}') MEM_STAT=$(free -m | grep Mem | awk '{print $2,$3}')
MEM_TOTAL_MB=${MEM_STAT%% *}
MEM_USED_MB=${MEM_STAT##* } MEM_USED_MB=${MEM_STAT##* }
MEM_USED_GB=$(echo "scale=2;$MEM_USED_MB/1024" | bc -l) MEM_TOTAL_GB=$(echo "scale=1;$MEM_TOTAL_MB/1024" | bc -l)
echo "$MEM_USED_GB GB" MEM_USED_GB=$(echo "scale=1;$MEM_USED_MB/1024" | bc -l)
echo "${MEM_USED_GB}/${MEM_TOTAL_GB} GB"

View File

@@ -0,0 +1,25 @@
#!/bin/bash
VOLUME=$(pactl get-sink-volume @DEFAULT_SINK@ | grep -o '[0-9]*%' | head -1)
MUTE=$(pactl get-sink-mute @DEFAULT_SINK@ | awk '{print $2}')
if [[ "${MUTE}" == "yes" ]]; then
echo " MUTE"
echo " MUTE"
echo "#FF6666"
else
VOL_NUM=${VOLUME%\%}
echo " ${VOLUME}"
echo " ${VOLUME}"
if (( VOL_NUM > 80 )); then
echo "#FFBF00"
else
echo "#33CC33"
fi
fi
case $BLOCK_BUTTON in
3) pactl set-sink-mute @DEFAULT_SINK@ toggle ;;
4) pactl set-sink-volume @DEFAULT_SINK@ +5% ;;
5) pactl set-sink-volume @DEFAULT_SINK@ -5% ;;
esac

View File

@@ -9,18 +9,18 @@ CITY_ID="${BLOCK_INSTANCE}"
URGENT_LOWER=0 URGENT_LOWER=0
URGENT_HIGHER=30 URGENT_HIGHER=30
ICON_SUNNY="" ICON_SUNNY=""
ICON_CLOUDY="" ICON_CLOUDY=""
ICON_RAINY="" ICON_RAINY=""
ICON_STORM="" ICON_STORM=""
ICON_SNOW="" ICON_SNOW=""
ICON_FOG="" ICON_FOG=""
SYMBOL_CELSIUS="℃" SYMBOL_CELSIUS="℃"
WEATHER_URL="http://api.openweathermap.org/data/2.5/weather?id=${CITY_ID}&appid=${API_KEY}&units=metric" WEATHER_URL="http://api.openweathermap.org/data/2.5/weather?id=${CITY_ID}&appid=${API_KEY}&units=metric"
WEATHER_INFO=$(wget -qO- "${WEATHER_URL}") WEATHER_INFO=$(curl -s "${WEATHER_URL}")
WEATHER_MAIN=$(echo "${WEATHER_INFO}" | grep -o -e '\"main\":\"[a-Z]*\"' | awk -F ':' '{print $2}' | tr -d '"') WEATHER_MAIN=$(echo "${WEATHER_INFO}" | grep -o -e '\"main\":\"[a-Z]*\"' | awk -F ':' '{print $2}' | tr -d '"')
WEATHER_TEMP=$(echo "${WEATHER_INFO}" | grep -o -e '\"temp\":\-\?[0-9]*' | awk -F ':' '{print $2}' | tr -d '"') WEATHER_TEMP=$(echo "${WEATHER_INFO}" | grep -o -e '\"temp\":\-\?[0-9]*' | awk -F ':' '{print $2}' | tr -d '"')
@@ -34,7 +34,7 @@ elif [[ "${WEATHER_MAIN}" = *Rain* ]] || [[ "${WEATHER_MAIN}" = *Drizzle* ]]; th
echo "" echo ""
elif [[ "${WEATHER_MAIN}" = *Thunderstorm* ]]; then elif [[ "${WEATHER_MAIN}" = *Thunderstorm* ]]; then
echo "${ICON_STORM} ${WEATHER_TEMP}${SYMBOL_CELSIUS}" echo "${ICON_STORM} ${WEATHER_TEMP}${SYMBOL_CELSIUS}"
echo "${ICON_STORM} ${WEATHER_TEMP}${SYMBOL_CELSIUS}" echo "${ICON_STORM} ${WEATHER_TEMP}${SYMBOL_CELSIUS}"
echo "" echo ""
elif [[ "${WEATHER_MAIN}" = *Cloud* ]]; then elif [[ "${WEATHER_MAIN}" = *Cloud* ]]; then
echo "${ICON_CLOUDY} ${WEATHER_TEMP}${SYMBOL_CELSIUS}" echo "${ICON_CLOUDY} ${WEATHER_TEMP}${SYMBOL_CELSIUS}"

View File

@@ -1,19 +1,12 @@
#!/bin/bash #!/bin/bash
# /usr/bin/blurlock # /usr/bin/blurlock
# take screenshot i3lock --blur 12 --clock --indicator \
scrot /tmp/screenshot.png --inside-color=00000080 \
--ring-color=16a08580 \
# blur it --keyhl-color=F9FAF9FF \
convert /tmp/screenshot.png -blur 0x12 /tmp/screenshotblur.png --bshl-color=D62929FF \
rm /tmp/screenshot.png --time-color=F9FAF9FF \
--date-color=F9FAF9FF
# lock the screen
i3lock -i /tmp/screenshotblur.png
# sleep 1 adds a small delay to prevent possible race conditions with suspend
sleep 1
xset dpms force off
exit 0 exit 0

View File

@@ -10,6 +10,18 @@
src: "files/configs/i3/i3/config" src: "files/configs/i3/i3/config"
dest: "{{ userhome }}/.i3/config" dest: "{{ userhome }}/.i3/config"
- name: i3 Configuration - Create alacritty directory
become_user: "{{ username }}"
file:
path: "{{ userhome }}/.config/alacritty"
state: directory
- name: i3 Configuration - Copy "{{ userhome }}/.config/alacritty/alacritty.toml"
become_user: "{{ username }}"
copy:
src: "files/configs/alacritty/alacritty.toml"
dest: "{{ userhome }}/.config/alacritty/alacritty.toml"
- name: i3 Configuration - Copy "{{ userhome }}/.config/picom.conf" - name: i3 Configuration - Copy "{{ userhome }}/.config/picom.conf"
become_user: "{{ username }}" become_user: "{{ username }}"
copy: copy:

View File

@@ -1,6 +1,6 @@
- name: Package Installation - Productivity Tools - name: Package Installation - Productivity Tools
package: package:
name: ["gnome-terminal", "ranger", "mousepad"] name: ["alacritty", "ranger", "mousepad"]
state: present state: present
- name: Package Installation - Development Tools - name: Package Installation - Development Tools

View File

@@ -5,7 +5,7 @@
- name: Package Installation - Productivity Tools - name: Package Installation - Productivity Tools
package: package:
name: ["gnome-terminal", "ranger", "mousepad"] name: ["alacritty", "ranger", "mousepad"]
state: present state: present
- name: Package Installation - Development Tools - name: Package Installation - Development Tools

View File

@@ -5,7 +5,7 @@
- name: Package Installation - Productivity Tools - name: Package Installation - Productivity Tools
package: package:
name: ["gnome-terminal", "ranger", "mousepad"] name: ["alacritty", "ranger", "mousepad"]
state: present state: present
- name: Package Installation - Development Tools - name: Package Installation - Development Tools