From 1b31f4dd4da6f67b044046a331a4ab1440324f42 Mon Sep 17 00:00:00 2001 From: Dmitri Date: Fri, 7 Nov 2025 08:57:38 +0100 Subject: [PATCH] sway with notification center --- .zshrc | 4 ++-- nvim/lua/kanopo/plugins/lsp.lua | 2 +- sway/config | 5 +++-- waybar/config.jsonc | 27 ++++++++++++++++++++++++++- waybar/style.css | 15 +++++++++++++++ 5 files changed, 47 insertions(+), 6 deletions(-) diff --git a/.zshrc b/.zshrc index a905a14..c872adc 100644 --- a/.zshrc +++ b/.zshrc @@ -13,7 +13,7 @@ plug "zap-zsh/completions" plug "zsh-users/zsh-syntax-highlighting" plug "wintermi/zsh-lsd" plug "romkatv/powerlevel10k" -plug "zap-zsh/nvm" +# plug "zap-zsh/nvm" # # # # Load and initialise completion system @@ -22,7 +22,7 @@ plug "zap-zsh/nvm" # compinit # # nvm initialization -source /usr/share/nvm/init-nvm.sh +# source /usr/share/nvm/init-nvm.sh alias v="nvim" alias conservation-on="sudo ectool chargecontrol normal 80 80" diff --git a/nvim/lua/kanopo/plugins/lsp.lua b/nvim/lua/kanopo/plugins/lsp.lua index a498029..8911ea8 100644 --- a/nvim/lua/kanopo/plugins/lsp.lua +++ b/nvim/lua/kanopo/plugins/lsp.lua @@ -116,7 +116,7 @@ return { local servers = { texlab = {}, -- clangd = {}, - -- gopls = {}, + gopls = {}, -- nil_ls = {}, ts_ls = {}, lua_ls = { diff --git a/sway/config b/sway/config index 3e52a28..5851374 100644 --- a/sway/config +++ b/sway/config @@ -85,7 +85,7 @@ floating_modifier $mod normal bindsym $mod+Shift+c reload # Esci da Sway (con conferma tramite swaynag) -bindsym $mod+Shift+e exec swaynag -t warning -m 'Hai premuto la scorciatoia per uscire. Vuoi davvero uscire da Sway?' -B 'Sì, esci' 'swaymsg exit' +# bindsym $mod+Shift+e exec swaynag -t warning -m 'Hai premuto la scorciatoia per uscire. Vuoi davvero uscire da Sway?' -B 'Sì, esci' 'swaymsg exit' ### Navigazione e spostamento tra finestre # Sposta il focus @@ -286,7 +286,8 @@ exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CU exec dbus-update-activation-environment WAYLAND_DISPLAY DISPLAY XDG_CURRENT_DESKTOP SWAYSOCK I3SOCK XCURSOR_SIZE XCURSOR_THEME ### Notifiche Desktop e Clip History -exec mako +exec swaync +# exec mako exec wl-paste --type text --watch cliphist store exec wl-paste --type image --watch cliphist store diff --git a/waybar/config.jsonc b/waybar/config.jsonc index 6ced3ea..0726f67 100644 --- a/waybar/config.jsonc +++ b/waybar/config.jsonc @@ -1,7 +1,11 @@ // -*- mode: jsonc -*- { "height": 34, // Waybar height (to be removed for auto height) - "modules-left": ["sway/workspaces", "sway/mode", "sway/scratchpad"], + "modules-left": [ + // "hyprland/workspaces", + // // "hyprland/window", + "sway/workspaces", "sway/mode", "sway/scratchpad" + ], "modules-center": ["clock"], "modules-right": [ "idle_inhibitor", @@ -13,6 +17,7 @@ "backlight", "battery", "tray", + "custom/notification" ], "sway/mode": { "format": "{}", @@ -112,4 +117,24 @@ }, "on-click": "pavucontrol", }, + "custom/notification" : { + "tooltip" : false, + "format" : "{} {icon}", + "format-icons" : { + "notification" : "󱅫", + "none" : "", + "dnd-notification" : " ", + "dnd-none" : "󰂛", + "inhibited-notification" : " ", + "inhibited-none" : "", + "dnd-inhibited-notification" : " ", + "dnd-inhibited-none" : " ", + }, + "return-type" : "json", + "exec-if" : "which swaync-client", + "exec" : "swaync-client -swb", + "on-click" : "sleep 0.1 && swaync-client -t -sw", + "on-click-right" : "sleep 0.1 && swaync-client -d -sw", + "escape" : true, + } } diff --git a/waybar/style.css b/waybar/style.css index 9e1f70d..2e3f009 100644 --- a/waybar/style.css +++ b/waybar/style.css @@ -1,6 +1,8 @@ * { font-family: "Iosevka Nerd Font", "Font Awesome 6 Free", "monospace"; font-size: 16px; + margin: 0; + padding: 0; } @define-color background #282828; @@ -25,6 +27,18 @@ window#waybar { background-color: @background; padding: 0; margin: 0; + margin-right: 10px; +} + +.module-left * { + padding: 10px; +} + +#custom-notification { + /* padding: 0 20px; */ + padding-left: 10px; + padding-right: 20px; + font-size: 18px; } #custom-scratch { @@ -34,6 +48,7 @@ window#waybar { } #workspaces button { + padding: 0 10px; border-radius: 0px; color: @foreground; }