Refactor: Overhaul for i3, kitty and polybar configs

This commit is contained in:
t0xa 2025-09-10 08:41:42 +03:00
parent 4bf6ff8f4c
commit 005fde3a35
3 changed files with 33 additions and 90 deletions

105
i3/config
View file

@ -1,69 +1,29 @@
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# Set env variables for the config
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
set $brave_browser_app brave-browser
set $obsidian_app obsidian
set $kitty_app ~/.local/kitty.app/bin/kitty
set $telegram_app Telegram
set $mod Mod4
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
# font pango:Terminus 18px
# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
# font pango:DejaVu Sans Mono 8
# Start XDG autostart .desktop files using dex. See also
# https://wiki.archlinux.org/index.php/XDG_Autostart
# Startup scripts
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
# Use pactl to adjust volume in PulseAudio.
set $refresh_i3status killall -SIGUSR1 i3status
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $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 && $refresh_i3status
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
# bindsym $mod+Return exec alacritty
# bindsym $mod+Return exec ~/.local/kitty.app/bin/kitty
# Screenshots
bindsym Mod1+Shift+A exec "/usr/bin/flameshot gui"
# kill focused window
bindsym $mod+Shift+q kill
# start dmenu (a program launcher)
bindsym $mod+d exec --no-startup-id rofi -show run
# bindsym $mod+s exec --no-startup-id rofi -show
# A more modern dmenu replacement is rofi:
# bindcode $mod+40 exec "rofi -modi drun,run -show drun"
# There also is i3-dmenu-desktop which only displays applications shipping a
# .desktop file. It is a wrapper around dmenu, so you need that installed.
# bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop
# bindsym Mod1+Shift+T exec --no-startup-id rofi -show
# change focus
bindsym $mod+h focus left
@ -160,25 +120,14 @@ bindsym $mod+Shift+r restart
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
# Section for manipulating the windows
# Browser
# bindsym Ctrl+Shift+B exec brave-browser
# Obsidian
# bindsym Ctrl+Shift+O exec obsidian
bindsym Ctrl+Shift+b exec --no-startup-id sh -c 'i3-msg "[class=\"Brave-browser\"] focus" || brave'
bindsym Ctrl+Shift+o exec --no-startup-id sh -c 'i3-msg "[class=\"obsidian\"] focus" || obsidian'
bindsym $mod+Return exec --no-startup-id sh -c 'i3-msg "[class=\"kitty\"] focus" || ~/.local/kitty.app/bin/kitty'
bindsym Ctrl+Shift+t exec --no-startup-id sh -c 'i3-msg "[class=\"Telegram\"] focus" || Telegram'
# bindsym Ctrl+Mod1+Shift+o [class="obsidian"] focus
# bindsym Ctrl+Mod1+Shift+d [class="Google-chrome"] focus
# bindsym Ctrl+Mod1+Shift+b [class="Chromium-browser"] focus
# bindsym Ctrl+Mod1+Shift+t [class="Telegram"] focus
# bindsym Ctrl+Mod1+Shift+k [class="kitty"] focus
# bindsym Ctrl+Mod1+Shift+Tab exec rofi -show window
bindsym Ctrl+Shift+b exec --no-startup-id sh -c 'i3-msg "[class=\"Brave-browser\"] focus" || $brave_browser_app'
bindsym Ctrl+Shift+o exec --no-startup-id sh -c 'i3-msg "[class=\"obsidian\"] focus" || $obsidian_app'
bindsym $mod+Return exec --no-startup-id sh -c 'i3-msg "[class=\"kitty\"] focus" || $kitty_app'
bindsym Ctrl+Shift+t exec --no-startup-id sh -c 'i3-msg "[class=\"Telegram\"] focus" || $telegram_app'
# resize window (you can also use the mouse for that)
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
@ -205,13 +154,6 @@ mode "resize" {
bindsym $mod+r mode "resize"
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
#bar {
# status_command i3status
# font pango:JetBrainsMonoNL Nerd Font Mono 10
#}
# Polybar settings. Allow obly i3bar or polybar at one time
exec_always --no-startup-id $HOME/.config/polybar/launch.sh
@ -228,16 +170,18 @@ title_align center
# Configure monitors (xrandr needed)
exec --no-startup-id xrandr --output DP-4 --mode 2560x1440 --rate 165.08
# Configure workspaces on monitors
workspace 1 output DP-4
workspace 2 output DP-4
workspace 3 output DP-4
workspace 4 output DP-4
workspace 5 output DP-4
workspace 6 output DP-4
workspace 7 output DP-4
workspace 8 output DP-2
workspace 9 output DP-2
workspace 10 output DP-2
set $mon_1 = "HDMI-A-0"
set $mon_2 = "DisplayPort-1"
workspace 1 output $mon_1
workspace 2 output $mon_1
workspace 3 output $mon_1
workspace 4 output $mon_1
workspace 5 output $mon_1
workspace 6 output $mon_1
workspace 7 output $mon_1
workspace 8 output $mon_2
workspace 9 output $mon_2
workspace 10 output $mon_2
# Set font
font pango:JetBrainsMonoNL Nerd Font Bold 10
@ -248,7 +192,6 @@ include ~/.config/i3/themes/cattpuccin.conf
# Lockscreen binding
bindsym Control+Shift+Q exec i3lock -c 000000 && xset dpms force off
# Wallpapers setup
# exec --no-startup-id feh --bg-scale --randomize ~/Pictures/Wallpapers/gruvbox/*
# exec --no-startup-id ~/Pictures/Wallpapers/wps.sh

View file

@ -1,4 +1,4 @@
include ./themes/gruvbox_dark_hard.conf
include ./themes/mocha.conf
# vim:fileencoding=utf-8:foldmethod=marker
#: Fonts {{{
@ -958,7 +958,7 @@ window_padding_width 5
#: Fade the text in inactive windows by the specified amount (a number
#: between zero and one, with zero being fully faded).
# hide_window_decorations no
hide_window_decorations yes
#: Hide the window decorations (title-bar and window borders) with
#: yes. On macOS, titlebar-only and titlebar-and-corners can be used

View file

@ -105,7 +105,7 @@ interval = 25
mount-0 = /
format-mounted-prefix = "/ "
format-mounted-prefix-foreground = ${colors.primary}
format-mounted-prefix-foreground = ${colors.secondary}
label-mounted = %percentage_used%%
@ -117,7 +117,7 @@ label-unmounted-foreground = ${colors.disabled}
type = internal/pulseaudio
format-volume-prefix = " "
format-volume-prefix-foreground = ${colors.primary}
format-volume-prefix-foreground = ${colors.secondary}
format-volume = <label-volume>
label-volume = %percentage%%
@ -131,7 +131,7 @@ blacklist-0 = num lock
; label-layout = %{T2}%{T-}
label-layout =  %name%
label-layout-foreground = ${colors.primary}
label-layout-foreground = ${colors.secondary}
layout-icon-0 = ru;ru
layout-icon-1 = us;us
@ -147,7 +147,7 @@ format = <label-indicator><label-layout>
type = internal/memory
interval = 2
format-prefix = " "
format-prefix-foreground = ${colors.primary}
format-prefix-foreground = ${colors.secondary}
label = %percentage_used:2%%
; type = internal/memory
; interval = 2
@ -159,7 +159,7 @@ label = %percentage_used:2%%
type = internal/cpu
interval = 2
format-prefix = " "
format-prefix-foreground = ${colors.primary}
format-prefix-foreground = ${colors.secondary}
label = %percentage:2%%
[network-base]
@ -182,7 +182,7 @@ date = %a %d-%b %H:%M:%S
date-alt = %Y-%m-%d %H:%M:%S
label = %date%
label-foreground = ${colors.primary}
label-foreground = ${colors.secondary}
[settings]
screenchange-reload = true
@ -318,5 +318,5 @@ label-low = %{F#f20202}󱊡%{F-} BATTERY LOW %percentage%%
type = internal/network
interface = wlp2s0
format-connected = <label-connected>
label-connected = %{F#f68c23}%{F-} %{T6}%essid% %signal%
label-connected = %{F#8ABEB7}%{F-} %{T6}%essid% %signal%