diff --git a/.config/sway/app-focus b/.config/sway/app-focus index cc4efc8..05128c2 100755 --- a/.config/sway/app-focus +++ b/.config/sway/app-focus @@ -3,28 +3,29 @@ app="$1" command="$2" -# Récupère les conteneurs correspondant à l'application. -windows=$(swaymsg -t get_tree | jq -r --arg app "$app" ' +tree=$(swaymsg -t get_tree) || exit 1 + +# Identifiants complets, sans distinction de casse ; "|" permet les alias. +windows=$(printf '%s\n' "$tree" | jq -r --arg app "$app" ' recurse(.nodes[], .floating_nodes[]) | select( - (.app_id == $app) or - (.window_properties.class == $app) + ((.app_id // "") | test("^(" + $app + ")$"; "i")) or + ((.window_properties.class // "") | test("^(" + $app + ")$"; "i")) ) | .id -') +') || exit 1 # Aucune fenêtre : lancer l'application if [ -z "$windows" ]; then - swaymsg exec "$command" - exit 0 + exec swaymsg exec "$command" fi # Récupère la fenêtre actuellement focalisée -focused=$(swaymsg -t get_tree | jq -r ' +focused=$(printf '%s\n' "$tree" | jq -r ' recurse(.nodes[], .floating_nodes[]) | select(.focused == true) | .id -') +') || exit 1 # Transforme la liste en tableau set -- $windows @@ -50,4 +51,3 @@ if [ -z "$next" ]; then fi swaymsg "[con_id=$next] focus" - diff --git a/.config/sway/config.d/00-vars.conf b/.config/sway/config.d/00-vars.conf index a01bfa0..9349588 100644 --- a/.config/sway/config.d/00-vars.conf +++ b/.config/sway/config.d/00-vars.conf @@ -15,15 +15,15 @@ set $right l set $ws1 "1:" set $ws2 "2:" set $ws3 "3:" -set $ws4 "4:" -set $ws5 "5:" -set $ws6 "6:" -set $ws7 "7:" -set $ws8 "8:" -set $ws9 "9:" -set $ws10 "10:" +set $ws4 "4:Fichiers" +set $ws5 "5:Vidéo" +set $ws6 "6:Visio" +set $ws7 "7:Jeux" +set $ws8 "8:Divers devs" +set $ws9 "9:Chat" +set $ws10 "10:Agentique" set $ws11 "11:" -set $ws12 "12:" +set $ws12 "12:Musique" # default apps set $term "footclient" diff --git a/.config/sway/config.d/07-window-rules.conf b/.config/sway/config.d/07-window-rules.conf index 0147c72..dc32e76 100644 --- a/.config/sway/config.d/07-window-rules.conf +++ b/.config/sway/config.d/07-window-rules.conf @@ -36,29 +36,35 @@ for_window [class="Sxiv|Nsxiv|Gimp"] title_format " %title" # assign clients to specific workspace # ws1 mail -assign [app_id="thunderbird*|Mattermost*"] $ws1 +assign [app_id="thunderbird*"] $ws1 # ws2 web assign [app_id="firefox"] $ws2 # ws3 dev assign [app_id="irc|xmpp|jetbrains-idea"] $ws3 -# ws4 edit -assign [app_id="geany|libreoffice*"] $ws4 -# ws5 media -assign [app_id="fr.handbrake.ghb"] $ws5 -assign [class="avidemux3_*|Pitivi|openshot|Flowblade"] $ws5 -# ws6 gfx -assign [app_id="gimp|org.gnome.gThumb|org.inkscape.Inkscape"] $ws6 -# ws7 vbox -assign [class="VirtualBox Manager|VirtualBox Machine|Qemu-system-x86_64"] $ws7 -assign [app_id="qemu"] $ws7 -# ws8 bkp +# ws4 files +assign [app_id="(?i)^org[.]gnome[.]Nautilus$"] $ws4 +assign [class="(?i)^org[.]gnome[.]Nautilus$"] $ws4 +# ws5 video +assign [app_id="(?i)^freetube$"] $ws5 +assign [class="(?i)^freetube$"] $ws5 +# ws6 meetings +assign [app_id="(?i)^(chromium|chromium-browser|google-chrome|google-chrome-stable|jitsi-meet)$"] $ws6 +assign [class="(?i)^(chromium|chromium-browser|google-chrome|google-chrome-stable|jitsi-meet)$"] $ws6 +# ws7 games +assign [app_id="(?i)^steam$"] $ws7 +assign [class="(?i)^steam$"] $ws7 +# ws8 dev tools assign [app_id="foot|footclient"] $ws8 -# ws9 p2p -assign [app_id="discord"] $ws9 -# ws10 top -assign [app_id="btop"] $ws10 -assign [class="Psensor"] $ws10 +assign [app_id="(?i)^(bruno|parsec|parsecd)$"] $ws8 +assign [class="(?i)^(bruno|parsec|parsecd)$"] $ws8 +# ws9 chat +assign [app_id="(?i)^(Mattermost[.]Desktop|Mattermost|discord)$"] $ws9 +assign [class="(?i)^(Mattermost[.]Desktop|Mattermost|discord)$"] $ws9 +# ws10 agentic +assign [app_id="(?i)^github$"] $ws10 +assign [class="(?i)^github$"] $ws10 # ws11 deb -# ws12 zik +# ws12 music assign [app_id="player"] $ws12 - +assign [app_id="(?i)^spotify$"] $ws12 +assign [class="(?i)^spotify$"] $ws12 diff --git a/.config/sway/config.d/08-launchers.conf b/.config/sway/config.d/08-launchers.conf index ba90616..6c1dd5b 100644 --- a/.config/sway/config.d/08-launchers.conf +++ b/.config/sway/config.d/08-launchers.conf @@ -4,12 +4,6 @@ #bindsym $mod+d exec $menud #bindsym $mod+p exec $menup -# terminal -bindsym $mod+ctrl+t exec $term - -# help center -bindsym $mad+F1 exec "nakedhelp" - # infos system #bindsym $mad+m exec "$term --title=btop --app-id=btop btop" #bindsym $mad+i exec "$infosbox" @@ -23,24 +17,24 @@ bindsym $mad+y exec 'grim -g "$(slurp)" - | wl-copy' # apps launchers keybinds bindsym $mad+r exec "$term --title=filer --app-id=filer lf" -bindsym $mad+Shift+r exec "pcmanfm --no-desktop" #bindsym $mad+e exec "$term --title=vim --app-id=vim vim" #bindsym $mad+Shift+e exec "geany" -bindsym $mad+x exec "foot --title=irc --app-id=irc weechat-curses" bindsym $mad+Shift+x exec "$mailer" -bindsym $mad+w exec "$browser" -bindsym $mad+Shift+w exec "$browser" # Applications +bindsym $mad+a exec ~/.config/sway/app-focus "github" "/home/gil/.local/bin/GitHub-Copilot-linux-x64.AppImage" bindsym $mad+f exec ~/.config/sway/app-focus "firefox" "firefox" -bindsym $mad+m exec ~/.config/sway/app-focus "Mattermost.Desktop" "mattermost" +bindsym $mad+m exec ~/.config/sway/app-focus "Mattermost[.]Desktop|Mattermost" "mattermost-desktop" bindsym $mad+i exec ~/.config/sway/app-focus "jetbrains-idea" "idea" -bindsym $mad+j exec ~/.config/sway/app-focus "jitsi-meet" "jitsi-meet" +bindsym $mad+j exec ~/.config/sway/app-focus "chromium|chromium-browser" "chromium" bindsym $mad+v exec ~/.config/sway/app-focus "freetube" "freetube" bindsym $mad+s exec ~/.config/sway/app-focus "Spotify" "spotify" bindsym $mad+d exec ~/.config/sway/app-focus "discord" "discord" bindsym $mad+t exec ~/.config/sway/app-focus "foot" "foot" bindsym $mad+b exec ~/.config/sway/app-focus "bruno" "bruno" +bindsym $mad+e exec ~/.config/sway/app-focus "org[.]gnome[.]Nautilus" "nautilus" +bindsym $mad+g exec ~/.config/sway/app-focus "steam" "steam" +bindsym $mad+p exec ~/.config/sway/app-focus "parsec|parsecd" "parsecd" # audio bindings #bindsym $mad+v exec "$mixer" @@ -89,4 +83,3 @@ bindsym $mod+comma exec $ipc settings-toggle #bindsym --locked XF86AudioMute exec $ipc volume-mute #bindsym --locked XF86MonBrightnessUp exec $ipc brightness-up #bindsym --locked XF86MonBrightnessDown exec $ipc brightness-down - diff --git a/.config/sway/config.d/09-controls.conf b/.config/sway/config.d/09-controls.conf index a63be6a..34db4a3 100644 --- a/.config/sway/config.d/09-controls.conf +++ b/.config/sway/config.d/09-controls.conf @@ -6,8 +6,6 @@ # Drag floating windows by holding down $mod and left mouse button. # Resize them with right mouse button + $mod. floating_modifier $mod normal - # Edit configuration files - bindsym $mod+Shift+c exec "$term lf -command cd $HOME/.config/sway/" # Reload the configuration file bindsym $mod+Shift+r reload diff --git a/.local/state/noctalia/settings.toml b/.local/state/noctalia/settings.toml index 14f7ef0..7fbada2 100644 --- a/.local/state/noctalia/settings.toml +++ b/.local/state/noctalia/settings.toml @@ -1,4 +1,4 @@ -config_version = 14 +config_version = 16 [bar.default] start = [ "launcher", "wallpaper", "workspaces", "cpu" ] @@ -14,6 +14,9 @@ enabled = true type = "caldav" username = "gil" +[control_center.calendar] +show_week_numbers = true + [desktop_widgets] schema_version = 2 widget_order = [ "desktop-widget-0000000000000001", "desktop-widget-0000000000000002" ] @@ -81,13 +84,13 @@ widget_order = [ cx = 1280.0 cy = 1258.0 output = "DP-3" - placement_height = 0.0 - placement_width = 0.0 + placement_height = 1440.0 + placement_width = 2560.0 rotation = 0.0 type = "login_box" [lockscreen_widgets.widget."lockscreen-login-box@DP-3".settings] - background_color = "surface_variant" + background_color = "surface_container" background_opacity = 0.88 background_radius = 12.0 center_password_text = false @@ -114,7 +117,7 @@ widget_order = [ type = "login_box" [lockscreen_widgets.widget."lockscreen-login-box@DP-4".settings] - background_color = "surface_variant" + background_color = "surface_container" background_opacity = 0.88 background_radius = 12.0 center_password_text = false @@ -141,7 +144,7 @@ widget_order = [ type = "login_box" [lockscreen_widgets.widget."lockscreen-login-box@DP-5".settings] - background_color = "surface_variant" + background_color = "surface_container" background_opacity = 0.88 background_radius = 12.0 center_password_text = false @@ -162,13 +165,13 @@ widget_order = [ cx = 540.0 cy = 1738.0 output = "HDMI-A-1" - placement_height = 0.0 - placement_width = 0.0 + placement_height = 1920.0 + placement_width = 1080.0 rotation = 0.0 type = "login_box" [lockscreen_widgets.widget."lockscreen-login-box@HDMI-A-1".settings] - background_color = "surface_variant" + background_color = "surface_container" background_opacity = 0.88 background_radius = 12.0 center_password_text = false @@ -195,7 +198,7 @@ widget_order = [ type = "login_box" [lockscreen_widgets.widget."lockscreen-login-box@eDP-1".settings] - background_color = "surface_variant" + background_color = "surface_container" background_opacity = 0.88 background_radius = 12.0 center_password_text = false