# Keyboard definition input "type:keyboard" { xkb_layout us xkb_variant intl xkb_options "compose:rwin" } ### Variables # # Logo key. Use Mod1 for Alt. set $mod Mod4 # Displays set $display1 HDMI-A-3 set $display2 DP-1 # Your preferred terminal emulator set $term /usr/bin/termite # Your preferred application launcher set $menu wofi -c ~/.config/wofi/config -s ~/.config/wofi/style.css -I # Screen capture set $ps1 Print set $ps2 Control+Print # Wallpaper set $wallpapers_path $HOME/Nextcloud/images/Wallpaper/Rotation # Modals set $modalWidth 1280 set $modalHeight 800 # Screens definitions output $display1 resolution 2560x1080@75Hz position 0,0 adaptive_sync on output $display2 resolution 1920x1080@75Hz position 2560,0 ### Gnome settings # TODO: à vérifier/modifier set $gnome-schema org.gnome.desktop.interface exec_always { gsettings set $gnome-schema gtk-theme 'NordSur-dark' gsettings set $gnome-schema icon-theme 'Tela-circle-grey-dark' gsettings set $gnome-schema font-name 'Roboto 10' gsettings set $gnome-schema monospace-font-name 'Roboto Mono 10' gsettings set $gnome-schema document-font-name 'Roboto 10' gsettings set org.gnome.desktop.wm.preferences titlebar-font 'Roboto Bold 10' gsettings set org.gnome.desktop.wm.preferences button-layout '' gsettings set org.gnome.desktop.default-applications.terminal exec $term gsettings set org.gnome.desktop.default-applications.terminal exec-arg '' } ### Idle configuration exec swayidle -w \ timeout 300 'swaylock -f' \ timeout 305 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \ before-sleep 'swaylock -f' ### Autostart exec dbus-daemon --session --address=unix:path=$XDG_RUNTIME_DIR/bus exec mako ### Window config for_window [app_id=".*"] border pixel 4 for_window [class="Spotify"] move container to workspace 4 for_window [class="Geeqie"] floating enable for_window [app_id="termite" title="Pulse Mixer"] floating enable, resize set $modalWidth $modalHeight for_window [app_id="termite" title="Calendar"] floating enable, resize set $modalWidth $modalHeight for_window [app_id="termite" title="File Browser"] floating enable, resize set $modalWidth $modalHeight for_window [app_id="termite" title="Ncdu"] floating enable, resize set $modalWidth $modalHeight for_window [app_id="termite" title="Top"] floating enable, resize set $modalWidth $modalHeight ### Key bindings # # Basics: # # Start a terminal bindsym $mod+Return exec $term # Kill focused window bindsym control+q kill # Start your launcher bindsym Alt+space exec $menu # lock screen bindsym $mod+Alt+l exec swaylock -f # Reload the configuration file bindsym $mod+Shift+r reload # Exit sway (logs you out of your Wayland session) bindsym $mod+Shift+x exec swaynag -t warning -m 'End session?' -b 'Yes, exit sway' 'swaymsg exit' # File Browser bindsym $mod+f exec "$term -t 'File Browser' -e ranger" # Disk Usage bindsym $mod+Shift+f exec "$term -t 'Ncdu' -e 'ncdu --color=dark'" # Top bindsym $mod+t exec "$term -t 'Top' -e bpytop" # Calendar bindsym $mod+c exec "$term -t 'Calendar' -e khal interactive" # # Multimedia keys # bindsym --locked XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5% bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5% bindsym --locked XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle bindsym $mod+shift+p exec "$term -t 'Pulse Mixer' -e pulsemixer" bindsym XF86MonBrightnessDown exec brightnessctl set 5%- bindsym XF86MonBrightnessUp exec brightnessctl set +5% # # Screenshots # bindsym $ps1 exec grim ~/Pictures/ps_$(date +"%Y%m%d%H%M%S").png bindsym $ps2 exec grim -g "$(slurp)" ~/Pictures/ps_$(date +"%Y%m%d%H%M%S").png # # Moving around: # bindsym $mod+h focus left bindsym $mod+j focus down bindsym $mod+k focus up bindsym $mod+l focus right # Move focussed workspace bindsym $mod+Shift+h move left bindsym $mod+Shift+j move down bindsym $mod+Shift+k move up bindsym $mod+Shift+l move right # # Workspaces: # bindsym $mod+1 workspace number 1 bindsym $mod+2 workspace number 2 bindsym $mod+3 workspace number 3 bindsym $mod+4 workspace number 4 bindsym $mod+5 workspace number 5 bindsym $mod+6 workspace number 6 bindsym $mod+7 workspace number 7 bindsym $mod+8 workspace number 8 bindsym $mod+9 workspace number 9 bindsym $mod+0 workspace number 10 # Move focused container to workspace bindsym $mod+Shift+1 move container to workspace number 1 bindsym $mod+Shift+2 move container to workspace number 2 bindsym $mod+Shift+3 move container to workspace number 3 bindsym $mod+Shift+4 move container to workspace number 4 bindsym $mod+Shift+5 move container to workspace number 5 bindsym $mod+Shift+6 move container to workspace number 6 bindsym $mod+Shift+7 move container to workspace number 7 bindsym $mod+Shift+8 move container to workspace number 8 bindsym $mod+Shift+9 move container to workspace number 9 bindsym $mod+Shift+0 move container to workspace number 10 # switch to previous/next workspace bindsym Mod1+Control+a workspace prev_on_output bindsym Mod1+Control+d workspace next_on_output # Default placement workspace 1 output $display1 # # Layout stuff: # bindsym $mod+backslash splith bindsym $mod+minus splitv # Switch the current container between different layout styles bindsym $mod+s layout stacking bindsym $mod+w layout tabbed bindsym $mod+e layout toggle split # Make the current focus fullscreen bindsym $mod+Mod1+f fullscreen # Toggle the current focus between tiling and floating mode bindsym $mod+Shift+space floating toggle # Swap focus between the tiling area and the floating area bindsym $mod+space focus mode_toggle # Toggle second screen (home / homeoffice mode) bindsym $mod+p output DP-1 toggle # # Resizing containers: # bindsym $mod+r mode "resize" mode "resize" { bindsym h resize shrink width 10px bindsym j resize grow height 10px bindsym k resize shrink height 10px bindsym l resize grow width 10px bindsym Return mode "default" bindsym Escape mode "default" } # # Status Bar: # bar { swaybar_command waybar } # # gaps # gaps inner 10 gaps outer -5 smart_gaps off # # Titlebars # default_border pixel 4 default_floating_border normal hide_edge_borders smart titlebar_padding 5 2 # # Colors # client.focused #5e81ac #2e3440 #d8dee9 #5e81ac #5e81ac client.focused_inactive #3b4252 #3b4252 #d8dee9 #4c566a #4c566a client.unfocused #434c5e #434c5e #d8dee9 #4c566a #4c566a client.urgent #bf616a #bf616a #d8dee9 #d08770 #d08770 # # Background # output * bg $(find $wallpapers_path -type f | shuf -n 1) fill include /etc/sway/config.d/*