diff --git a/ansible/inventory/group_vars/desktop.yml b/ansible/inventory/group_vars/desktop.yml index 28c7bad..196e50e 100644 --- a/ansible/inventory/group_vars/desktop.yml +++ b/ansible/inventory/group_vars/desktop.yml @@ -135,6 +135,10 @@ desktop_i3_dotfiles: src: .config/rofi/ dest: .config/rofi/ mode: preserve + - name: picom config + src: .config/picom/picom.conf + dest: .config/picom/picom.conf + mode: "0644" - name: .xinitrc src: .xinitrc dest: .xinitrc diff --git a/ansible/inventory/group_vars/void.yml b/ansible/inventory/group_vars/void.yml index cfd0491..1fc3822 100644 --- a/ansible/inventory/group_vars/void.yml +++ b/ansible/inventory/group_vars/void.yml @@ -163,6 +163,7 @@ desktop_i3_packages: - i3status - dunst - network-manager-applet + - picom - rofi - scrot - setxkbmap diff --git a/ansible/roles/profile_desktop_i3/tasks/main.yml b/ansible/roles/profile_desktop_i3/tasks/main.yml index 4e3c125..d8252b5 100644 --- a/ansible/roles/profile_desktop_i3/tasks/main.yml +++ b/ansible/roles/profile_desktop_i3/tasks/main.yml @@ -12,6 +12,7 @@ - "{{ user_home }}/.config/dunst" - "{{ user_home }}/.config/i3" - "{{ user_home }}/.config/i3blocks" + - "{{ user_home }}/.config/picom" - "{{ user_home }}/.config/rofi" when: "'i3' in (desktop_sessions_enabled | default([]))" diff --git a/dotfiles/desktop/.config/alacritty/alacritty.toml b/dotfiles/desktop/.config/alacritty/alacritty.toml index 8f19f0f..adfaf00 100644 --- a/dotfiles/desktop/.config/alacritty/alacritty.toml +++ b/dotfiles/desktop/.config/alacritty/alacritty.toml @@ -1,6 +1,6 @@ [window] padding = { x = 8, y = 8 } -opacity = 1.0 +opacity = 0.90 [font] normal = { family = "Hack Nerd Font", style = "Regular" } diff --git a/dotfiles/desktop/.config/dunst/dunstrc b/dotfiles/desktop/.config/dunst/dunstrc index 9cfda01..081cd39 100644 --- a/dotfiles/desktop/.config/dunst/dunstrc +++ b/dotfiles/desktop/.config/dunst/dunstrc @@ -4,9 +4,9 @@ follow = mouse gap_size = 10 width = 360 -height = 120 +height = (0, 120) origin = top-right -offset = 20x40 +offset = (20, 40) font = Liberation Sans 10 line_height = 2 @@ -19,7 +19,7 @@ separator_height = 2 frame_width = 2 corner_radius = 8 -transparency = 0 +transparency = 15 background = "#1f1f28" foreground = "#eeeeee" diff --git a/dotfiles/desktop/.config/i3/config b/dotfiles/desktop/.config/i3/config index 666febf..5c6baf9 100644 --- a/dotfiles/desktop/.config/i3/config +++ b/dotfiles/desktop/.config/i3/config @@ -18,6 +18,9 @@ exec --no-startup-id pipewire exec --no-startup-id pipewire-pulse exec --no-startup-id wireplumber +# Compositor +exec_always --no-startup-id picom -b + # Monitor configuration exec --no-startup-id autorandr --persistent --change @@ -46,6 +49,12 @@ new_window pixel 2 new_float pixel 2 hide_edge_borders none +# Gaps (i3 >= 4.22) +gaps inner 10 +gaps outer 4 +smart_gaps on +smart_borders on + # vim-like directions set $left h set $down j diff --git a/dotfiles/desktop/.config/picom/picom.conf b/dotfiles/desktop/.config/picom/picom.conf new file mode 100644 index 0000000..24251da --- /dev/null +++ b/dotfiles/desktop/.config/picom/picom.conf @@ -0,0 +1,57 @@ +backend = "glx"; +vsync = true; +use-damage = true; +detect-rounded-corners = true; +detect-client-opacity = true; +detect-transient = true; + +corner-radius = 10; +rounded-corners-exclude = [ + "window_type = 'dock'", + "window_type = 'desktop'", + "class_g = 'i3-frame'" +]; + +shadow = true; +shadow-radius = 18; +shadow-opacity = 0.55; +shadow-offset-x = -10; +shadow-offset-y = -10; +shadow-exclude = [ + "name = 'Notification'", + "class_g = 'Conky'", + "class_g ?= 'Notify-osd'", + "class_g = 'Cairo-clock'", + "_GTK_FRAME_EXTENTS@:c", + "window_type = 'dock'", + "window_type = 'desktop'" +]; + +fading = true; +fade-in-step = 0.05; +fade-out-step = 0.05; +fade-delta = 6; + +blur-method = "dual_kawase"; +blur-strength = 5; +blur-background = true; +blur-background-frame = true; +blur-background-fixed = false; +blur-background-exclude = [ + "window_type = 'dock'", + "window_type = 'desktop'", + "class_g = 'i3-frame'", + "class_g = 'Dunst'", + "_GTK_FRAME_EXTENTS@:c" +]; + +opacity-rule = []; + +wintypes: +{ + tooltip = { fade = true; shadow = true; opacity = 0.95; focus = true; }; + dock = { shadow = false; }; + dnd = { shadow = false; }; + popup_menu = { opacity = 0.95; }; + dropdown_menu = { opacity = 0.95; }; +}; diff --git a/dotfiles/desktop/.local/bin/update-turnstile-env b/dotfiles/desktop/.local/bin/update-turnstile-env index f2a79c7..ad3888f 100755 --- a/dotfiles/desktop/.local/bin/update-turnstile-env +++ b/dotfiles/desktop/.local/bin/update-turnstile-env @@ -8,11 +8,9 @@ fi turnstile-update-runit-env \ DISPLAY \ - WAYLAND_DISPLAY \ XAUTHORITY \ DBUS_SESSION_BUS_ADDRESS \ SSH_AUTH_SOCK \ XDG_CURRENT_DESKTOP \ XDG_SESSION_DESKTOP \ - XDG_SESSION_TYPE \ - SWAYSOCK >/dev/null 2>&1 || true + XDG_SESSION_TYPE >/dev/null 2>&1 || true