Update: Added new modules to polybar, edited i3 config, added rofi-powermenu and touchpad_toggle scripts.

This commit is contained in:
Keyitdev
2025-07-24 11:45:13 +02:00
parent 7dcd9a13ad
commit 7e2ab9aac4
4 changed files with 113 additions and 28 deletions
+10 -6
View File
@@ -7,8 +7,9 @@ tiling_drag modifier titlebar
font pango:Open sans 11 font pango:Open sans 11
exec --no-startup-id dex --autostart --environment i3 exec --no-startup-id dex --autostart --environment i3
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork exec --no-startup-id xss-lock --transfer-sleep-lock -- lock --nofork
exec_always --no-startup-id feh --no-fehbg --bg-scale $HOME/Pictures/wallpapers/background.png exec_always --no-startup-id xrandr --dpi 96
exec_always --no-startup-id feh --no-fehbg --bg-fill $HOME/Pictures/wallpapers/background.png
exec_always --no-startup-id $HOME/.config/polybar/launch.sh exec_always --no-startup-id $HOME/.config/polybar/launch.sh
exec_always --no-startup-id dunst & exec_always --no-startup-id dunst &
exec_always --no-startup-id /usr/lib/polkit-kde-authentication-agent-1 & exec_always --no-startup-id /usr/lib/polkit-kde-authentication-agent-1 &
@@ -17,18 +18,21 @@ bindsym XF86AudioRaiseVolume exec --no-startup-id volume_control -s +5 -m 125 &&
bindsym XF86AudioLowerVolume exec --no-startup-id volume_control -s -5 -m 125 && volume_level bindsym XF86AudioLowerVolume exec --no-startup-id volume_control -s -5 -m 125 && volume_level
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && volume_mute bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && volume_mute
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && microphone_mute bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && microphone_mute
# bindsym XF86ScreenSaver bindsym XF86ScreenSaver exec --no-startup-id xset dpms force off
bindsym XF86MonBrightnessDown exec --no-startup-id brightness_control -s -2 && brightness_level bindsym XF86MonBrightnessDown exec --no-startup-id brightness_control -s -2 && brightness_level
bindsym XF86MonBrightnessUp exec --no-startup-id brightness_control -s +2 && brightness_level bindsym XF86MonBrightnessUp exec --no-startup-id brightness_control -s +2 && brightness_level
# bindsym XF86TouchpadToggle bindsym XF86SplitScreen exec --no-startup-id touchpad_toggle
bindsym XF86TouchpadToggle exec --no-startup-id touchpad_toggle
# bindsym XF86RFKill # bindsym XF86RFKill
bindsym XF86Calculator exec --no-startup-id nemo # bindsym XF86Calculator exec --no-startup-id nemo
bindsym Ctrl+F5 exec --no-startup-id rofi -show drun
bindsym $mod+Return exec i3-sensible-terminal bindsym $mod+Return exec i3-sensible-terminal
# kill focused window # kill focused window
bindsym $mod+Shift+q kill bindsym $mod+Shift+q kill
bindsym $mod+d exec --no-startup-id dmenu_run bindsym $mod+d exec --no-startup-id rofi -show drun
# bindsym $mod+d exec --no-startup-id dmenu_run
# change focus # change focus
bindsym $mod+j focus left bindsym $mod+j focus left
+30 -22
View File
@@ -62,11 +62,15 @@ font-0 = "Iosevka Nerd Font:size=12;4"
font-1 = "Iosevka Nerd Font:style=Medium:size=18;4" font-1 = "Iosevka Nerd Font:style=Medium:size=18;4"
font-2 = "feather:size=13;5" font-2 = "feather:size=13;5"
modules-left = l i3 r s l mpd r s l wireless-network r ; modules-left = l menu r s l i3 r s l wireless-network r
; modules-center = l date r
; modules-right = l temperature s2 s2 cpu s2 s2 ram r s l backlight r s l pulseaudio r s l battery r s l tray r
modules-left = l menu r s l i3 r
modules-center = l date r modules-center = l date r
modules-right = l temperature s2 s2 cpu s2 s2 ram r s l backlight r s l pulseaudio r s l battery r s l tray r modules-right = l wireless-network r s l temperature s2 s2 ram r s l backlight s2 s2 pulseaudio r s l battery r s tray_transparent
; modules-right = l filesystem r s l ram r s l temperature s2 cpu r s l backlight s2 pulseaudio r s l battery r s l wattage r s l tray r
;s l title r ;l r s s2
; module-margin = ; module-margin =
; separator = ; separator =
@@ -132,6 +136,18 @@ tray-padding = 5px
tray-spacing = 0 tray-spacing = 0
tray-size = 66% tray-size = 66%
[module/tray_transparent]
type = internal/tray
format-background = ${color.transparent}
tray-foreground = ${color.transparent}
tray-background = ${color.transparent}
tray-padding = 5px
tray-spacing = 0
tray-size = 66%
[module/alsa] [module/alsa]
type = internal/alsa type = internal/alsa
interval = 5 interval = 5
@@ -612,28 +628,20 @@ label-urgent-background = ${color.background}
label-urgent-padding = 1 label-urgent-padding = 1
[module/my-text-label] [module/menu]
type = custom/text type = custom/text
; @deprecated Use format and/or label to define the module text
; content = Some random label
; Available tags:
; <label> (default)
; New in version 3.7.0
format = <label> format = <label>
format-background = #000 label = ""
format-foreground = #fff
format-padding = 4 format-background = ${color.background}
format-foreground = ${color.yellow}
; No tokens available
; New in version 3.7.0
label = Some random label
; "click-(left|middle|right)" will be executed using "/bin/sh -c $COMMAND"
click-left = rofi -show drun click-left = rofi -show drun
click-middle = notify-send middle ; create a new workspace (with the smallest possible number)
click-right = notify-send right click-middle = i3-msg workspace $(comm -23 <(seq 1 100) <(i3-msg -t get_workspaces | jq '.[].num' | sort -n) | head -n 1)
click-right = rofi-powermenu
; "scroll-(up|down)" will be executed using "/bin/sh -c $COMMAND" ; scroll-up = notify-send scroll up
scroll-up = notify-send scroll up ; scroll-down = notify-send scroll down
scroll-down = notify-send scroll down
+54
View File
@@ -0,0 +1,54 @@
#!/bin/sh
# rofi theme
theme="$HOME/.config/rofi/main_without_icons.rasi"
get_options() {
echo " Poweroff"
echo " Reboot"
echo " Reboot to Windows"
echo " Hibernate"
echo " Lock"
echo " Suspend"
echo " Log out"
}
main() {
# get choice from rofi
# choice=$( (get_options) | rofi -dmenu -i -fuzzy -p "" -theme "$theme")
choice=$( (get_options) | rofi -dmenu -i -fuzzy -p "")
# run the selected command
case $choice in
' Poweroff')
systemctl poweroff
;;
' Reboot')
systemctl reboot
;;
' Reboot to Windows')
pkexec grub-reboot 3 && systemctl reboot
;;
' Hibernate')
systemctl hibernate
;;
' Lock')
lock
;;
' Suspend')
systemctl suspend
;;
' Log out')
i3-msg exit
;;
esac
# done
set -e
}
main &
exit 0
+19
View File
@@ -0,0 +1,19 @@
#!/bin/bash
touchad_id=$(xinput list | grep -i 'touchpad' | grep -oP 'id=\K\d+')
if [ -z "$touchad_id" ]; then
dunstify -a "Touchpad" "Touchpad" "Touchpad not found" -r 100
exit 1
fi
state=$(xinput list-props "$touchad_id" | grep "Device Enabled" | grep -o "[01]$")
# Przełącz stan touchpada
if [ "$state" -eq 1 ]; then
xinput disable "$touchad_id"
dunstify -a "Touchpad" "Touchpad" "Touchpad is disabled" -r 100
else
xinput enable "$touchad_id"
dunstify -a "Touchpad" "Touchpad" "Touchpad is enabled" -r 100
fi