diff --git a/config/sway/config b/config/sway/config index 1c522b5..0f3b698 100644 --- a/config/sway/config +++ b/config/sway/config @@ -5,8 +5,10 @@ input "type:keyboard" { xkb_options "compose:rwin" } + ### Variables # + # Logo key. Use Mod1 for Alt. set $mod Mod4 @@ -14,6 +16,36 @@ set $mod Mod4 set $display1 HDMI-A-3 set $display2 DP-1 +# Workspaces +set $wksp1 "1: Main" +set $wksp2 "2: Dev" +set $wksp3 "3: Social" +set $wksp4 "4: Music" +set $wksp5 "5: Graphics" +set $wksp6 "6: Games" +set $wksp7 "7: Remote" +set $wksp8 "8: -" +set $wksp9 "9: -" +set $wksp10 "10: -" + +# Colors +set $nord0 #2E3440 +set $nord1 #3B4252 +set $nord2 #434C5E +set $nord3 #4C566A +set $nord4 #D8DEE9 +set $nord5 #E5E9F0 +set $nord6 #ECEFF4 +set $nord7 #8FBCBB +set $nord8 #88C0D0 +set $nord9 #81A1C1 +set $nord10 #5E81AC +set $nord11 #BF616A +set $nord12 #D08770 +set $nord13 #EBCB8B +set $nord14 #A3BE8C +set $nord15 #B48EAD + # Your preferred terminal emulator set $term /usr/bin/termite @@ -35,16 +67,18 @@ set $modalHeight 800 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 $gnome-schema font-name 'DejaVu Sans Mono 9' + gsettings set $gnome-schema monospace-font-name 'DejaVu Sans Mono 9' + gsettings set $gnome-schema document-font-name 'DejaVu Sans Mono 9' + gsettings set org.gnome.desktop.wm.preferences titlebar-font 'DejaVu Sans Mono 9' 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 '' @@ -52,29 +86,49 @@ exec_always { ### 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 +exec nextcloud +exec remmina -i +exec $term +exec firefox +exec spotify +exec signal-desktop + ### Window config +# + for_window [app_id=".*"] border pixel 4 -for_window [class="Spotify"] move container to workspace 4 + +# Auto move on Workspace +for_window [class="Signal"] move container to workspace $wksp3 +for_window [class="Slack"] move container to workspace $wksp3 +for_window [class="Spotify"] move container to workspace $wksp4 + +# Open as floating for_window [class="Geeqie"] floating enable +for_window [class="JViewer"] 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 @@ -106,29 +160,24 @@ bindsym $mod+t exec "$term -t 'Top' -e bpytop" # Calendar bindsym $mod+c exec "$term -t 'Calendar' -e khal interactive" -# -# Multimedia keys -# +# Note +bindsym $mod+n exec "/home/dbroqua/Bin/zettlr" +# 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" +# Brightness 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 @@ -140,40 +189,35 @@ 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 +bindsym $mod+1 workspace $wksp1 +bindsym $mod+2 workspace $wksp2 +bindsym $mod+3 workspace $wksp3 +bindsym $mod+4 workspace $wksp4 +bindsym $mod+5 workspace $wksp5 +bindsym $mod+6 workspace $wksp6 +bindsym $mod+7 workspace $wksp7 +bindsym $mod+8 workspace $wksp8 +bindsym $mod+9 workspace $wksp9 +bindsym $mod+0 workspace $wksp10 + # 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 +# Move focused container to workspace +bindsym $mod+Shift+1 move container to workspace $wksp1 +bindsym $mod+Shift+2 move container to workspace $wksp2 +bindsym $mod+Shift+3 move container to workspace $wksp3 +bindsym $mod+Shift+4 move container to workspace $wksp4 +bindsym $mod+Shift+5 move container to workspace $wksp5 +bindsym $mod+Shift+6 move container to workspace $wksp6 +bindsym $mod+Shift+7 move container to workspace $wksp7 +bindsym $mod+Shift+8 move container to workspace $wksp8 +bindsym $mod+Shift+9 move container to workspace $wksp9 +bindsym $mod+Shift+0 move container to workspace $wksp10 -# # Layout stuff: -# bindsym $mod+backslash splith bindsym $mod+minus splitv @@ -194,9 +238,8 @@ 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" { @@ -209,39 +252,54 @@ mode "resize" { bindsym Escape mode "default" } + +### Default placement # -# Status Bar: + +workspace $wksp1 output $display1 + + +### Status Bar: # + bar { swaybar_command waybar } + +### gaps # -# gaps -# + gaps inner 10 gaps outer -5 smart_gaps off + +### Titlebars # -# 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 +### Colors # -# Background + +client.focused $nord10 $nord0 $nord4 $nord10 $nord10 +client.focused_inactive $nord1 $nord1 $nord4 $nord3 $nord3 +client.unfocused $nord2 $nord2 $nord4 $nord3 $nord3 +client.urgent $nord11 $nord11 $nord4 $nord12 $nord12 + + +### Background # + output * bg $(find $wallpapers_path -type f | shuf -n 1) fill + +### Include other +# + include /etc/sway/config.d/*