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