separated sway config files into sub config files

This commit is contained in:
ohinh 2026-09-09 19:37:40 +02:00
parent eda7906264
commit 5232518141
16 changed files with 186 additions and 3735 deletions

View file

@ -1,346 +1,21 @@
# Default config for sway
# Copy this to ~/.config/sway/config and edit it to your liking.
# Read `man 5 sway` for a complete reference.
include /home/oh/.config/sway/basic_key_bindings for_window [app_id=.*] focus
include /home/oh/.config/sway/windows_rules assign [app_id="foot"] 01
include /home/oh/.config/sway/input_config assign [app_id="foot"] 1
include /home/oh/.config/sway/colors assign [app_id="zen"] 02
include /home/oh/.config/sway/workspaces_rules assign [app_id="zen"] 2
include /home/oh/.config/sway/app_assignment assign [app_id="anki"] 02
include /home/oh/.config/sway/layout assign [app_id="anytype"] 03
include /home/oh/.config/sway/utilities assign [app_id="libreoffice"] 03
assign [app_id="signal"] 04
assign [app_id="thunderbird"] 04
### Variables assign [app_id="thunderbird"] 4
assign [app_id="mpv"] 05
assign [app_id="mpv"] 5
# Logo key. Use Mod1 for Alt. assign [app_id="vlc"] 05
set $mod Mod4 assign [app_id="vlc"] 5
assign [app_id="steam"] 06
# Home row direction keys, like vim assign [app_id="steam"] 6
set $left k assign [app_id="kde-connect"] 07
set $down l assign [app_id="nextcloud"] 07
set $up o assign [app_id="Zotero"] 07
set $right m
# screens
set $laptop eDP-1
set $external HDMI-A-1
## Preferred apps
set $term foot
set $menu wofi --show drun
set $file nautilus
set $browser flatpak run app.zen_browser.zen
include /etc/sway/config-vars.d/*
# autoload when start wm
exec waybar
exec /usr/libexec/polkit-mate-authentication-agent-1
exec wlsunset
exec wl-paste --watch cliphist store
### Output configuration
# using "swaybg" just put file path as below and end with 'fill'
output * background ~/.config/sway/wallpapers/frieren.png fill
#
output HDMI-A-1 resolution 1920x1080 position 1920,0
#
#exec swayidle -w \
# timeout 300 'swaylock -f -c 000000' \
# timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
# before-sleep 'swaylock -f -c 000000'
# This will lock your screen after 300 seconds of inactivity, then turn off
# your displays after another 300 seconds, and turn your screens back on when
# resumed. It will also lock your screen before your computer goes to sleep.
### Input configuration
input "2:14:ETPS/2_Elantech_Touchpad" {
dwt enabled
tap enabled
natural_scroll enabled
middle_emulation enabled
}
input type:keyboard {
xkb_options caps:escape
xkb_layout fr
repeat_delay 300
repeat_rate 50
}
input "6058:20564:ThinkPad_Extra_Buttons" {
}
# window gaps
smart_borders on
default_border pixel 2
default_floating_border pixel 3
gaps inner 1
gaps outer 1
# Window borders
# Colors: border background text indicator child_border
client.focused #9932cc #285577 #ffffff #2e9ef4 #2e9ef4
client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a
client.unfocused #333333 #222222 #888888 #292d2e #222222
client.urgent #2f343a #900000 #ffffff #900000 #900000
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
# Background color for inactive tabs in tabbed/stacked layout
client.background #000000
# faire disparaître le titlebar
font pango:monospace 0.001
titlebar_border_thickness 1
### Key bindings
#
# Basics:
#
# Start a terminal
bindsym $mod+Enter exec $term
# Kill focused window
bindsym $mod+q kill
# Start your launcher
bindsym $mod+space exec $menu
bindsym $mod+shift+d exec wofi --show run
# Start a file manager
bindsym $mod+e exec $file
# Start browser
bindsym $mod+a exec $browser
# Drag floating windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod.
# Despite the name, also works for non-floating windows.
# Change normal to inverse to use left mouse button for resizing and right
# mouse button for dragging.
floating_modifier $mod normal
# clipboard manager
bindsym $mod+w exec cliphist list | wofi | cliphist decode | wl-copy
# Reload the configuration file
bindsym $mod+Shift+r reload
# Exit sway (logs you out of your Wayland session)
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
#
# Moving around:
#
# Move your focus around
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
# Or use $mod+[up|down|left|right]
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# Move the focused window with the same, but add Shift
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
# Ditto, with arrow keys
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
#
# Workspaces:
#
# Switch to workspace
bindsym Mod4+ampersand workspace 1
bindsym Mod4+eacute workspace 2
bindsym Mod4+quotedbl workspace 3
bindsym Mod4+apostrophe workspace 4
bindsym Mod4+parenleft workspace 5
bindsym Mod4+minus workspace 6
bindsym Mod4+egrave workspace 7
bindsym Mod4+underscore workspace 8
bindsym Mod4+ccedilla workspace 9
bindsym Mod4+agrave workspace 10
# Move focused container to workspace
bindsym Mod4+Shift+ampersand workspace 01
bindsym Mod4+Shift+eacute workspace 02
bindsym Mod4+Shift+quotedbl workspace 03
bindsym Mod4+Shift+apostrophe workspace 04
bindsym Mod4+Shift+parenleft workspace 05
bindsym Mod4+Shift+minus workspace 06
bindsym Mod4+Shift+egrave workspace 07
bindsym Mod4+Shift+underscore workspace 08
bindsym Mod4+Shift+ccedilla workspace 09
bindsym Mod4+Shift+agrave workspace 010
bindsym Mod4+tab workspace next
bindsym Mod4+Shift+tab workspace prev
# external screen
# on laptop monitor
workspace 1 output $laptop
workspace 2 output $laptop
workspace 3 output $laptop
workspace 4 output $laptop
workspace 5 output $laptop
workspace 6 output $laptop
workspace 7 output $laptop
workspace 8 output $laptop
workspace 9 output $laptop
workspace 10 output $laptop
# on external monitor
workspace 01 output $external
workspace 02 output $external
workspace 03 output $external
workspace 04 output $external
workspace 05 output $external
workspace 06 output $external
workspace 07 output $external
workspace 08 output $external
workspace 09 output $external
workspace 010 output $external
# assignment
for_window [app_id=.*] focus
assign [app_id="foot"] 01
assign [app_id="foot"] 1
assign [app_id="zen"] 02
assign [app_id="zen"] 2
assign [app_id="anki"] 02
assign [app_id="anytype"] 3
assign [app_id="libreoffice"] 3
assign [app_id="signal"] 4
assign [app_id="thunderbird"] 04
assign [app_id="thunderbird"] 4
assign [app_id="mpv"] 05
assign [app_id="mpv"] 5
assign [app_id="vlc"] 05
assign [app_id="vlc"] 5
assign [app_id="steam"] 06
assign [app_id="steam"] 6
assign [app_id="kde-connect"] 7
#
# Layout stuff:
#
# You can "split" the current object of your focus with
# $mod+b or $mod+v, for horizontal and vertical splits
# respectively.
bindsym $mod+b splith
bindsym $mod+v splitv
# Switch the current container between different layout styles
# bindsym $mod+s layout stacking
# bindsym $mod+w layout tabbed
bindsym $mod+s layout toggle split
# Make the current focus fullscreen
bindsym $mod+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+u focus mode_toggle
# Move focus to the parent container
# bindsym $mod+a focus parent
#
# Scratchpad:
#
# Sway has a "scratchpad", which is a bag of holding for windows.
# You can send windows there and get them back later.
# Move the currently focused window to the scratchpad
# bindsym $mod+Shift+minus move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
# bindsym $mod+minus scratchpad show
#
# Resizing containers:
#
mode "resize" {
# left will shrink the containers width
# right will grow the containers width
# up will shrink the containers height
# down will grow the containers height
bindsym $left resize shrink width 10px
bindsym $down resize grow height 10px
bindsym $up resize shrink height 10px
bindsym $right resize grow width 10px
# Ditto, with arrow keys
bindsym Left resize shrink width 10px
bindsym Down resize grow height 10px
bindsym Up resize shrink height 10px
bindsym Right resize grow width 10px
# Return to default mode
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+alt+r mode "resize"
#
# Utilities:
#
# Special keys to adjust volume via PulseAudio
bindsym --locked XF86AudioMute exec amixer sset Master toggle
bindsym --locked XF86AudioLowerVolume exec amixer sset Master 5%-
bindsym --locked XF86AudioRaiseVolume exec amixer sset Master 5%+
bindsym --locked XF86AudioMicMute exec pactl set-source-mute \@DEFAULT_SOURCE@ toggle
# Special keys to adjust brightness via brightnessctl
bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%-
bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+
# Special key to take a screenshot with grim
bindsym Print exec grim
bindsym $mod+Print exec grim -g "$(slurp)"
#power
bindsym Mod4+Escape exec wlogout
bindsym Mod4+Shift+x exec swaylock
#
# Status Bar disable because of use waybar instead if you not use waybar just uncomment those below:
#
# Read `man 5 sway-bar` for more information about this section.
# bar {
# position top
# When the status_command prints a new line to stdout, swaybar updates.
# The default just shows the current date and time.
# status_command while date +'%Y-%m-%d %X'; do sleep 1; done
# colors {
# statusline #ffffff
# background #323232
# inactive_workspace #32323200 #32323200 #5c5c5c
# }
#}
include /etc/sway/config.d/*

View file

@ -1,132 +1,66 @@
# Default config for sway ### gestures
# Copy this to ~/.config/sway/config and edit it to your liking.
# Read `man 5 sway` for a complete reference.
include /home/oh/.config/sway/basic_key_bindings bindgesture swipe:up workspace prev
include /home/oh/.config/sway/windows_rules bindgesture swipe:down workspace next
include /home/oh/.config/sway/input_config
include /home/oh/.config/sway/colors ### sets
include /home/oh/.config/sway/workspaces_rules
include /home/oh/.config/sway/app_assignment # Noctalia
include /home/oh/.config/sway/layout set $ipc noctalia msg
include /home/oh/.config/sway/utilities
# Logo key. Use Mod1 for Alt.
set $mod Mod4
set $mod1 Alt
# Home row direction keys, like vim
set $left k
set $down l
set $up o
set $right m
# screens
set $laptop eDP-1
set $external HDMI-A-1
# Preferred apps
set $term foot
# set $menu wofi --show drun
set $file nautilus
set $browser flatpak run app.zen_browser.zen
### Variables
### keybindings
# Logo key. Use Mod1 for Alt.
set $mod Mod4
# Home row direction keys, like vim
set $left k
set $down l
set $up o
set $right m
# screens
set $laptop eDP-1
set $external HDMI-A-1
## Preferred apps
set $term foot
set $menu wofi --show drun
set $file nautilus
set $browser flatpak run app.zen_browser.zen
include /etc/sway/config-vars.d/*
# autoload when start wm
exec waybar
exec /usr/libexec/polkit-mate-authentication-agent-1
exec wlsunset
exec wl-paste --watch cliphist store
### Output configuration
# using "swaybg" just put file path as below and end with 'fill'
output * background ~/.config/sway/wallpapers/frieren.png fill
#
output HDMI-A-1 resolution 1920x1080 position 1920,0
# #
#exec swayidle -w \ # basics
# timeout 300 'swaylock -f -c 000000' \
# timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
# before-sleep 'swaylock -f -c 000000'
# This will lock your screen after 300 seconds of inactivity, then turn off
# your displays after another 300 seconds, and turn your screens back on when
# resumed. It will also lock your screen before your computer goes to sleep.
### Input configuration
input "2:14:ETPS/2_Elantech_Touchpad" {
dwt enabled
tap enabled
natural_scroll enabled
middle_emulation enabled
}
input type:keyboard {
xkb_options caps:escape
xkb_layout fr
repeat_delay 300
repeat_rate 50
}
input "6058:20564:ThinkPad_Extra_Buttons" {
}
# window gaps
smart_borders on
default_border pixel 2
default_floating_border pixel 3
gaps inner 1
gaps outer 1
# Window borders
# Colors: border background text indicator child_border
client.focused #9932cc #285577 #ffffff #2e9ef4 #2e9ef4
client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a
client.unfocused #333333 #222222 #888888 #292d2e #222222
client.urgent #2f343a #900000 #ffffff #900000 #900000
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
# Background color for inactive tabs in tabbed/stacked layout
client.background #000000
# faire disparaître le titlebar
font pango:monospace 0.001
titlebar_border_thickness 1
### Key bindings
#
# Basics:
# #
# Noctalia
bindsym $mod+z exec $ipc panel-toggle control-center
bindsym $mod+comma exec $ipc settings-toggle
bindsym $mod+exclam exec $ipc panel-toggle control-center weather
bindsym $mod+colon exec $ipc panel-toggle control-center calendar
bindsym $mod+b exec $ipc bar-toggle
# Start a terminal # Start a terminal
bindsym $mod+Enter exec $term bindsym $mod+Return exec $term
# Kill focused window # Kill focused window
bindsym $mod+q kill bindsym $mod+q kill
# Start your launcher # Start your launcher
bindsym $mod+space exec $menu bindsym $mod+space exec $ipc panel-toggle launcher
bindsym $mod+shift+d exec wofi --show run # bindsym $mod+space exec $menu bindsym $mod+shift+d exec wofi --show run
# Start a file manager # Start a file manager
bindsym $mod+e exec $file # bindsym $mod+e exec $file
# test of yazi as a CLI file manager
bindsym $mod+e exec --no-startup-id foot -e yazi
# Start browser # Start browser
bindsym $mod+a exec $browser bindsym $mod+a exec $browser
# 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.
# Despite the name, also works for non-floating windows. # Despite the name, also works for non-floating windows.
@ -135,16 +69,23 @@ titlebar_border_thickness 1
floating_modifier $mod normal floating_modifier $mod normal
# clipboard manager # clipboard manager
bindsym $mod+w exec cliphist list | wofi | cliphist decode | wl-copy # bindsym $mod+semicolon exec clipman pick --tool wofi -T'--prompt=clipboard-history -i'
bindsym $mod+semicolon exec $ipc panel-toggle clipboard
# notification center
# bindsym $mod+Shift+n exec swaync-client -t -sw
bindsym $mod+n exec $ipc panel-toggle control-center notifications
# Reload the configuration file # Reload the configuration file
bindsym $mod+Shift+r reload bindsym $mod+Shift+r reload
# Exit sway (logs you out of your Wayland session) # Exit sway (logs you out of your Wayland session)
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit' bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
# #
# Moving around: # Moving around:
# #
# Move your focus around # Move your focus around
bindsym $mod+$left focus left bindsym $mod+$left focus left
bindsym $mod+$down focus down bindsym $mod+$down focus down
@ -166,181 +107,33 @@ titlebar_border_thickness 1
bindsym $mod+Shift+Down move down bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right bindsym $mod+Shift+Right move right
# #
# Workspaces: # Workspaces:
# #
# Switch to workspace # Switch to workspace
bindsym Mod4+ampersand workspace 1 bindsym $mod+ampersand workspace 01
bindsym Mod4+eacute workspace 2 bindsym $mod+eacute workspace 02
bindsym Mod4+quotedbl workspace 3 bindsym $mod+quotedbl workspace 03
bindsym Mod4+apostrophe workspace 4 bindsym $mod+apostrophe workspace 04
bindsym Mod4+parenleft workspace 5 bindsym $mod+parenleft workspace 05
bindsym Mod4+minus workspace 6 bindsym $mod+minus workspace 06
bindsym Mod4+egrave workspace 7 bindsym $mod+egrave workspace 07
bindsym Mod4+underscore workspace 8 bindsym $mod+underscore workspace 08
bindsym Mod4+ccedilla workspace 9 bindsym $mod+ccedilla workspace 09
bindsym Mod4+agrave workspace 10 bindsym $mod+agrave workspace 010
# Move focused container to workspace # Move focused container to workspace
bindsym Mod4+Shift+ampersand workspace 01 bindsym $mod+Shift+ampersand move container to workspace 01
bindsym Mod4+Shift+eacute workspace 02 bindsym $mod+Shift+eacute move container to workspace 02
bindsym Mod4+Shift+quotedbl workspace 03 bindsym $mod+Shift+quotedbl move container to workspace 03
bindsym Mod4+Shift+apostrophe workspace 04 bindsym $mod+Shift+apostrophe move container to workspace 04
bindsym Mod4+Shift+parenleft workspace 05 bindsym $mod+Shift+parenleft move container to workspace 05
bindsym Mod4+Shift+minus workspace 06 bindsym $mod+Shift+minus move container to workspace 06
bindsym Mod4+Shift+egrave workspace 07 bindsym $mod+Shift+egrave move container to workspace 07
bindsym Mod4+Shift+underscore workspace 08 bindsym $mod+Shift+underscore move container to workspace 08
bindsym Mod4+Shift+ccedilla workspace 09 bindsym $mod+Shift+ccedilla move container to workspace 09
bindsym Mod4+Shift+agrave workspace 010 bindsym $mod+Shift+agrave move container to workspace 010
bindsym Mod4+tab workspace next bindsym $mod+tab workspace next
bindsym Mod4+Shift+tab workspace prev bindsym $mod1+tab workspace prev
# external screen
# on laptop monitor
workspace 1 output $laptop
workspace 2 output $laptop
workspace 3 output $laptop
workspace 4 output $laptop
workspace 5 output $laptop
workspace 6 output $laptop
workspace 7 output $laptop
workspace 8 output $laptop
workspace 9 output $laptop
workspace 10 output $laptop
# on external monitor
workspace 01 output $external
workspace 02 output $external
workspace 03 output $external
workspace 04 output $external
workspace 05 output $external
workspace 06 output $external
workspace 07 output $external
workspace 08 output $external
workspace 09 output $external
workspace 010 output $external
# assignment
for_window [app_id=.*] focus
assign [app_id="foot"] 01
assign [app_id="foot"] 1
assign [app_id="zen"] 02
assign [app_id="zen"] 2
assign [app_id="anki"] 02
assign [app_id="anytype"] 3
assign [app_id="libreoffice"] 3
assign [app_id="signal"] 4
assign [app_id="thunderbird"] 04
assign [app_id="thunderbird"] 4
assign [app_id="mpv"] 05
assign [app_id="mpv"] 5
assign [app_id="vlc"] 05
assign [app_id="vlc"] 5
assign [app_id="steam"] 06
assign [app_id="steam"] 6
assign [app_id="kde-connect"] 7
#
# Layout stuff:
#
# You can "split" the current object of your focus with
# $mod+b or $mod+v, for horizontal and vertical splits
# respectively.
bindsym $mod+b splith
bindsym $mod+v splitv
# Switch the current container between different layout styles
# bindsym $mod+s layout stacking
# bindsym $mod+w layout tabbed
bindsym $mod+s layout toggle split
# Make the current focus fullscreen
bindsym $mod+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+u focus mode_toggle
# Move focus to the parent container
# bindsym $mod+a focus parent
#
# Scratchpad:
#
# Sway has a "scratchpad", which is a bag of holding for windows.
# You can send windows there and get them back later.
# Move the currently focused window to the scratchpad
# bindsym $mod+Shift+minus move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
# bindsym $mod+minus scratchpad show
#
# Resizing containers:
#
mode "resize" {
# left will shrink the containers width
# right will grow the containers width
# up will shrink the containers height
# down will grow the containers height
bindsym $left resize shrink width 10px
bindsym $down resize grow height 10px
bindsym $up resize shrink height 10px
bindsym $right resize grow width 10px
# Ditto, with arrow keys
bindsym Left resize shrink width 10px
bindsym Down resize grow height 10px
bindsym Up resize shrink height 10px
bindsym Right resize grow width 10px
# Return to default mode
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+alt+r mode "resize"
#
# Utilities:
#
# Special keys to adjust volume via PulseAudio
bindsym --locked XF86AudioMute exec amixer sset Master toggle
bindsym --locked XF86AudioLowerVolume exec amixer sset Master 5%-
bindsym --locked XF86AudioRaiseVolume exec amixer sset Master 5%+
bindsym --locked XF86AudioMicMute exec pactl set-source-mute \@DEFAULT_SOURCE@ toggle
# Special keys to adjust brightness via brightnessctl
bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%-
bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+
# Special key to take a screenshot with grim
bindsym Print exec grim
bindsym $mod+Print exec grim -g "$(slurp)"
#power
bindsym Mod4+Escape exec wlogout
bindsym Mod4+Shift+x exec swaylock
#
# Status Bar disable because of use waybar instead if you not use waybar just uncomment those below:
#
# Read `man 5 sway-bar` for more information about this section.
# bar {
# position top
# When the status_command prints a new line to stdout, swaybar updates.
# The default just shows the current date and time.
# status_command while date +'%Y-%m-%d %X'; do sleep 1; done
# colors {
# statusline #ffffff
# background #323232
# inactive_workspace #32323200 #32323200 #5c5c5c
# }
#}
include /etc/sway/config.d/*

View file

@ -1,3 +0,0 @@
bindsym $mod+P exec $term

View file

@ -1,346 +1,9 @@
# Default config for sway # Colors: border background text indicator child_border
# Copy this to ~/.config/sway/config and edit it to your liking. client.focused #000000 #285577 #ffffff #2e9ef4 #2e9ef4
# Read `man 5 sway` for a complete reference. client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a
client.unfocused #333333 #222222 #888888 #292d2e #222222
client.urgent #2f343a #900000 #ffffff #900000 #900000
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
include /home/oh/.config/sway/basic_key_bindings # Background color for inactive tabs in tabbed/stacked layout
include /home/oh/.config/sway/windows_rules client.background #000000
include /home/oh/.config/sway/input_config
include /home/oh/.config/sway/colors
include /home/oh/.config/sway/workspaces_rules
include /home/oh/.config/sway/app_assignment
include /home/oh/.config/sway/layout
include /home/oh/.config/sway/utilities
### Variables
# Logo key. Use Mod1 for Alt.
set $mod Mod4
# Home row direction keys, like vim
set $left k
set $down l
set $up o
set $right m
# screens
set $laptop eDP-1
set $external HDMI-A-1
## Preferred apps
set $term foot
set $menu wofi --show drun
set $file nautilus
set $browser flatpak run app.zen_browser.zen
include /etc/sway/config-vars.d/*
# autoload when start wm
exec waybar
exec /usr/libexec/polkit-mate-authentication-agent-1
exec wlsunset
exec wl-paste --watch cliphist store
### Output configuration
# using "swaybg" just put file path as below and end with 'fill'
output * background ~/.config/sway/wallpapers/frieren.png fill
#
output HDMI-A-1 resolution 1920x1080 position 1920,0
#
#exec swayidle -w \
# timeout 300 'swaylock -f -c 000000' \
# timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
# before-sleep 'swaylock -f -c 000000'
# This will lock your screen after 300 seconds of inactivity, then turn off
# your displays after another 300 seconds, and turn your screens back on when
# resumed. It will also lock your screen before your computer goes to sleep.
### Input configuration
input "2:14:ETPS/2_Elantech_Touchpad" {
dwt enabled
tap enabled
natural_scroll enabled
middle_emulation enabled
}
input type:keyboard {
xkb_options caps:escape
xkb_layout fr
repeat_delay 300
repeat_rate 50
}
input "6058:20564:ThinkPad_Extra_Buttons" {
}
# window gaps
smart_borders on
default_border pixel 2
default_floating_border pixel 3
gaps inner 1
gaps outer 1
# Window borders
# Colors: border background text indicator child_border
client.focused #9932cc #285577 #ffffff #2e9ef4 #2e9ef4
client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a
client.unfocused #333333 #222222 #888888 #292d2e #222222
client.urgent #2f343a #900000 #ffffff #900000 #900000
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
# Background color for inactive tabs in tabbed/stacked layout
client.background #000000
# faire disparaître le titlebar
font pango:monospace 0.001
titlebar_border_thickness 1
### Key bindings
#
# Basics:
#
# Start a terminal
bindsym $mod+Enter exec $term
# Kill focused window
bindsym $mod+q kill
# Start your launcher
bindsym $mod+space exec $menu
bindsym $mod+shift+d exec wofi --show run
# Start a file manager
bindsym $mod+e exec $file
# Start browser
bindsym $mod+a exec $browser
# Drag floating windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod.
# Despite the name, also works for non-floating windows.
# Change normal to inverse to use left mouse button for resizing and right
# mouse button for dragging.
floating_modifier $mod normal
# clipboard manager
bindsym $mod+w exec cliphist list | wofi | cliphist decode | wl-copy
# Reload the configuration file
bindsym $mod+Shift+r reload
# Exit sway (logs you out of your Wayland session)
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
#
# Moving around:
#
# Move your focus around
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
# Or use $mod+[up|down|left|right]
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# Move the focused window with the same, but add Shift
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
# Ditto, with arrow keys
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
#
# Workspaces:
#
# Switch to workspace
bindsym Mod4+ampersand workspace 1
bindsym Mod4+eacute workspace 2
bindsym Mod4+quotedbl workspace 3
bindsym Mod4+apostrophe workspace 4
bindsym Mod4+parenleft workspace 5
bindsym Mod4+minus workspace 6
bindsym Mod4+egrave workspace 7
bindsym Mod4+underscore workspace 8
bindsym Mod4+ccedilla workspace 9
bindsym Mod4+agrave workspace 10
# Move focused container to workspace
bindsym Mod4+Shift+ampersand workspace 01
bindsym Mod4+Shift+eacute workspace 02
bindsym Mod4+Shift+quotedbl workspace 03
bindsym Mod4+Shift+apostrophe workspace 04
bindsym Mod4+Shift+parenleft workspace 05
bindsym Mod4+Shift+minus workspace 06
bindsym Mod4+Shift+egrave workspace 07
bindsym Mod4+Shift+underscore workspace 08
bindsym Mod4+Shift+ccedilla workspace 09
bindsym Mod4+Shift+agrave workspace 010
bindsym Mod4+tab workspace next
bindsym Mod4+Shift+tab workspace prev
# external screen
# on laptop monitor
workspace 1 output $laptop
workspace 2 output $laptop
workspace 3 output $laptop
workspace 4 output $laptop
workspace 5 output $laptop
workspace 6 output $laptop
workspace 7 output $laptop
workspace 8 output $laptop
workspace 9 output $laptop
workspace 10 output $laptop
# on external monitor
workspace 01 output $external
workspace 02 output $external
workspace 03 output $external
workspace 04 output $external
workspace 05 output $external
workspace 06 output $external
workspace 07 output $external
workspace 08 output $external
workspace 09 output $external
workspace 010 output $external
# assignment
for_window [app_id=.*] focus
assign [app_id="foot"] 01
assign [app_id="foot"] 1
assign [app_id="zen"] 02
assign [app_id="zen"] 2
assign [app_id="anki"] 02
assign [app_id="anytype"] 3
assign [app_id="libreoffice"] 3
assign [app_id="signal"] 4
assign [app_id="thunderbird"] 04
assign [app_id="thunderbird"] 4
assign [app_id="mpv"] 05
assign [app_id="mpv"] 5
assign [app_id="vlc"] 05
assign [app_id="vlc"] 5
assign [app_id="steam"] 06
assign [app_id="steam"] 6
assign [app_id="kde-connect"] 7
#
# Layout stuff:
#
# You can "split" the current object of your focus with
# $mod+b or $mod+v, for horizontal and vertical splits
# respectively.
bindsym $mod+b splith
bindsym $mod+v splitv
# Switch the current container between different layout styles
# bindsym $mod+s layout stacking
# bindsym $mod+w layout tabbed
bindsym $mod+s layout toggle split
# Make the current focus fullscreen
bindsym $mod+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+u focus mode_toggle
# Move focus to the parent container
# bindsym $mod+a focus parent
#
# Scratchpad:
#
# Sway has a "scratchpad", which is a bag of holding for windows.
# You can send windows there and get them back later.
# Move the currently focused window to the scratchpad
# bindsym $mod+Shift+minus move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
# bindsym $mod+minus scratchpad show
#
# Resizing containers:
#
mode "resize" {
# left will shrink the containers width
# right will grow the containers width
# up will shrink the containers height
# down will grow the containers height
bindsym $left resize shrink width 10px
bindsym $down resize grow height 10px
bindsym $up resize shrink height 10px
bindsym $right resize grow width 10px
# Ditto, with arrow keys
bindsym Left resize shrink width 10px
bindsym Down resize grow height 10px
bindsym Up resize shrink height 10px
bindsym Right resize grow width 10px
# Return to default mode
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+alt+r mode "resize"
#
# Utilities:
#
# Special keys to adjust volume via PulseAudio
bindsym --locked XF86AudioMute exec amixer sset Master toggle
bindsym --locked XF86AudioLowerVolume exec amixer sset Master 5%-
bindsym --locked XF86AudioRaiseVolume exec amixer sset Master 5%+
bindsym --locked XF86AudioMicMute exec pactl set-source-mute \@DEFAULT_SOURCE@ toggle
# Special keys to adjust brightness via brightnessctl
bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%-
bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+
# Special key to take a screenshot with grim
bindsym Print exec grim
bindsym $mod+Print exec grim -g "$(slurp)"
#power
bindsym Mod4+Escape exec wlogout
bindsym Mod4+Shift+x exec swaylock
#
# Status Bar disable because of use waybar instead if you not use waybar just uncomment those below:
#
# Read `man 5 sway-bar` for more information about this section.
# bar {
# position top
# When the status_command prints a new line to stdout, swaybar updates.
# The default just shows the current date and time.
# status_command while date +'%Y-%m-%d %X'; do sleep 1; done
# colors {
# statusline #ffffff
# background #323232
# inactive_workspace #32323200 #32323200 #5c5c5c
# }
#}
include /etc/sway/config.d/*

View file

@ -1,369 +1,27 @@
#include /home/oh/.config/sway/basic_key_bindings # ~/.config/sway/config
#include /home/oh/.config/sway/windows_rules
#include /home/oh/.config/sway/input_config
#include /home/oh/.config/sway/colors
#include /home/oh/.config/sway/workspaces_rules
#include /home/oh/.config/sway/app_assignment
# include /home/oh/.config/sway/layout
# include /home/oh/.config/sway/utilities
# 1. Chargement des raccourcis de base (avant tout, car utilisé par d'autres)
include ~/.config/sway/basic_key_bindings
### Variables # 2. Configuration des entrées (clavier, souris, pavé tactile)
bindgesture swipe:up workspace prev include ~/.config/sway/input_config
bindgesture swipe:down workspace next
# pour Noctalia # 3. Règles de gestion des fenêtres (floating, workspace, focus)
set $ipc noctalia msg include ~/.config/sway/windows_rules
# Logo key. Use Mod1 for Alt. # 4. Assignation des applications (où lancer quel programme)
set $mod Mod4 include ~/.config/sway/app_assignment
set $mod1 Alt
# Home row direction keys, like vim
set $left k
set $down l
set $up o
set $right m
# screens # 5. Configuration des espaces de travail (workspaces)
set $laptop eDP-1 include ~/.config/sway/workspaces_rules
set $external HDMI-A-1
## Preferred apps # 6. Configuration du layout (barres, bordures, etc.)
set $term foot include ~/.config/sway/layout
set $menu wofi --show drun
set $file nautilus
set $browser flatpak run app.zen_browser.zen
include /etc/sway/config-vars.d/* # 7. Couleurs et thèmes (si vous utilisez des variables de couleurs)
include ~/.config/sway/colors
# 8. Utilitaires et scripts de démarrage
include ~/.config/sway/utilities
# autoload when start wm
# exec /usr/libexec/polkit-mate-authentication-agent-1
# exec wlsunset
# exec wl-paste -t text --watch clipman store
# exec wl-paste -p -t text --watch clipman store -P --histpath="~/.local/share/clipman-primary.json"
# exec clipman restore
# exec swaync
exec noctalia exec noctalia
### Output configuration
# using "swaybg" just put file path as below and end with 'fill'
## output * background ~/.config/sway/wallpapers/frieren.png fill
## remplacé par des trucs noctalia
# exec swayidle -w \
# timeout 300 'swaylock -f -c 000000' \
# timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"'
# before-sleep 'swaylock -f -c 000000'
# This will lock your screen after 300 seconds of inactivity, then turn off
# your displays after another 300 seconds, and turn your screens back on when
# resumed. It will also lock your screen before your computer goes to sleep.
# Inhibit idle when any window is fullscreen
for_window [class=".*"] inhibit_idle fullscreen
for_window [app_id=".*"] inhibit_idle fullscreen
### Input configuration
input "2:14:ETPS/2_Elantech_Touchpad" {
dwt enabled
dwtp enabled
tap_button_map lrm
tap enabled
natural_scroll enabled
middle_emulation enabled
}
input type:keyboard {
xkb_options caps:escape
xkb_layout fr
repeat_delay 300
repeat_rate 50
}
input "6058:20564:ThinkPad_Extra_Buttons" {
}
# window gaps
smart_borders on
default_border pixel 3
default_floating_border pixel 3
gaps inner 0
gaps outer 0
# Window borders
# Colors: border background text indicator child_border
client.focused #000000 #285577 #ffffff #2e9ef4 #2e9ef4
client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a
client.unfocused #333333 #222222 #888888 #292d2e #222222
client.urgent #2f343a #900000 #ffffff #900000 #900000
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
# Background color for inactive tabs in tabbed/stacked layout
client.background #000000
# thème du curseur de souris
seat seat0 xcursor_theme Bibata-Modern-Ice
# faire disparaître le titlebar
font pango:monospace 0.001
titlebar_border_thickness 1
### Key bindings
#
# Basics:
#
bindsym $mod+z exec $ipc panel-toggle control-center
bindsym $mod+comma exec $ipc settings-toggle
bindsym $mod+exclam exec $ipc panel-toggle control-center weather
bindsym $mod+colon exec $ipc panel-toggle control-center calendar
# Start a terminal
bindsym $mod+Return exec $term
# Kill focused window
bindsym $mod+q kill
# Start your launcher
bindsym $mod+space exec $ipc panel-toggle launcher
# bindsym $mod+space exec $menu bindsym $mod+shift+d exec wofi --show run
# Start a file manager
# bindsym $mod+e exec $file
# test of yazi as a CLI file manager
bindsym $mod+e exec --no-startup-id foot -e yazi
# Start browser
bindsym $mod+a exec $browser
# Drag floating windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod.
# Despite the name, also works for non-floating windows.
# Change normal to inverse to use left mouse button for resizing and right
# mouse button for dragging.
floating_modifier $mod normal
# clipboard manager
# bindsym $mod+semicolon exec clipman pick --tool wofi -T'--prompt=clipboard-history -i'
bindsym $mod+semicolon exec $ipc panel-toggle clipboard
# notification center
# bindsym $mod+Shift+n exec swaync-client -t -sw
bindsym $mod+n exec $ipc panel-toggle control-center notifications
# Reload the configuration file
bindsym $mod+Shift+r reload
# Exit sway (logs you out of your Wayland session)
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
#
# Moving around:
#
# Move your focus around
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
# Or use $mod+[up|down|left|right]
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# Move the focused window with the same, but add Shift
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
# Ditto, with arrow keys
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
#
# Workspaces:
#
# Switch to workspace
bindsym $mod+ampersand workspace 01
bindsym $mod+eacute workspace 02
bindsym $mod+quotedbl workspace 03
bindsym $mod+apostrophe workspace 04
bindsym $mod+parenleft workspace 05
bindsym $mod+minus workspace 06
bindsym $mod+egrave workspace 07
bindsym $mod+underscore workspace 08
bindsym $mod+ccedilla workspace 09
bindsym $mod+agrave workspace 010
# Move focused container to workspace
bindsym $mod+Shift+ampersand move container to workspace 01
bindsym $mod+Shift+eacute move container to workspace 02
bindsym $mod+Shift+quotedbl move container to workspace 03
bindsym $mod+Shift+apostrophe move container to workspace 04
bindsym $mod+Shift+parenleft move container to workspace 05
bindsym $mod+Shift+minus move container to workspace 06
bindsym $mod+Shift+egrave move container to workspace 07
bindsym $mod+Shift+underscore move container to workspace 08
bindsym $mod+Shift+ccedilla move container to workspace 09
bindsym $mod+Shift+agrave move container to workspace 010
bindsym $mod+tab workspace next
bindsym $mod1+tab workspace prev
# external screen
# on laptop monitor
workspace 1 output $laptop
workspace 2 output $laptop
workspace 3 output $laptop
workspace 4 output $laptop
workspace 5 output $laptop
workspace 6 output $laptop
workspace 7 output $laptop
workspace 8 output $laptop
workspace 9 output $laptop
workspace 10 output $laptop
# on external monitor
workspace 01 output $external
workspace 02 output $external
workspace 03 output $external
workspace 04 output $external
workspace 05 output $external
workspace 06 output $external
workspace 07 output $external
workspace 08 output $external
workspace 09 output $external
workspace 010 output $external
# assignment
for_window [app_id=.*] focus
assign [app_id="foot"] 01
assign [app_id="foot"] 1
assign [app_id="zen"] 02
assign [app_id="zen"] 2
assign [app_id="anki"] 02
assign [app_id="anytype"] 03
assign [app_id="libreoffice"] 03
assign [app_id="signal"] 04
assign [app_id="thunderbird"] 04
assign [app_id="thunderbird"] 4
assign [app_id="mpv"] 05
assign [app_id="mpv"] 5
assign [app_id="vlc"] 05
assign [app_id="vlc"] 5
assign [app_id="steam"] 06
assign [app_id="steam"] 6
assign [app_id="kde-connect"] 07
assign [app_id="nextcloud"] 07
assign [app_id="Zotero"] 07
#
# Layout stuff:
#
# You can "split" the current object of your focus with
# $mod+b or $mod+v, for horizontal and vertical splits
# respectively.
# bindsym $mod+b splith
# bindsym $mod+v splitv
# Switch the current container between different layout styles
# bindsym $mod+s layout stacking
# bindsym $mod+w layout tabbed
bindsym $mod+s layout toggle split
# Make the current focus fullscreen
bindsym $mod+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+u focus mode_toggle
# Move focus to the parent container
# bindsym $mod+a focus parent
#
# Resizing containers:
#
mode "resize" {
# left will shrink the containers width
# right will grow the containers width
# up will shrink the containers height
# down will grow the containers height
bindsym $left resize shrink width 10px
bindsym $down resize grow height 10px
bindsym $up resize shrink height 10px
bindsym $right resize grow width 10px
# Ditto, with arrow keys
bindsym Left resize shrink width 10px
bindsym Down resize grow height 10px
bindsym Up resize shrink height 10px
bindsym Right resize grow width 10px
# Return to default mode
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+$mod1+r mode "resize"
#
# Utilities:
#
# Special keys to adjust volume via PulseAudio
bindsym --locked XF86AudioMute exec amixer sset Master toggle
bindsym --locked XF86AudioLowerVolume exec amixer sset Master 5%-
bindsym --locked XF86AudioRaiseVolume exec amixer sset Master 5%+
bindsym --locked XF86AudioMicMute exec pactl set-source-mute \@DEFAULT_SOURCE@ toggle
# Special keys to adjust brightness via brightnessctl
bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%-
bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+
# Special key to take a screenshot with grim
bindsym Print exec grim
# bindsym $mod+Shift+s exec grim -g "$(slurp)"
bindsym $mod+Shift+s exec $ipc screenshot-region
# Noctalia, media control
bindsym --locked XF86PickupPhone exec $ipc media toggle
bindsym --locked XF86NotificationCenter exec $ipc media previous
bindsym --locked XF86HangupPhone exec $ipc media next
# Noctalia, theme
# bindsym $mod+p exec $ipc theme-mode-toggle
# Noctalia, idle
bindsym --locked XF86Favorites exec $ipc caffeine-toggle
# power
# bindsym $mod+Escape exec wlogout
# bindsym $mod+Shift+x exec swaylock
bindsym $mod+Escape exec $ipc panel-toggle session
bindsym $mod+Shift+x exec $ipc session lock
#
# Status Bar disable because of use waybar instead if you not use waybar just uncomment those below:
#
###
# bar {
# swaybar_command waybar
# position top
# hidden_state show
# mode hide
# modifier $mod
# }
bindsym $mod+b exec $ipc bar-toggle
include /etc/sway/config.d/*
include ~/.config/sway/noctalia

View file

@ -1,351 +0,0 @@
#include /home/oh/.config/sway/basic_key_bindings
#include /home/oh/.config/sway/windows_rules
#include /home/oh/.config/sway/input_config
#include /home/oh/.config/sway/colors
#include /home/oh/.config/sway/workspaces_rules
#include /home/oh/.config/sway/app_assignment
#include /home/oh/.config/sway/layout
# include /home/oh/.config/sway/utilities
### Variables
bindgesture swipe:up workspace prev
bindgesture swipe:down workspace next
# Logo key. Use Mod1 for Alt.
set $mod Mod4
set $mod1 Alt
# Home row direction keys, like vim
set $left k
set $down l
set $up o
set $right m
# screens
set $laptop eDP-1
set $external HDMI-A-1
## Preferred apps
set $term foot
set $menu wofi --show drun
set $file nautilus
set $browser flatpak run app.zen_browser.zen
include /etc/sway/config-vars.d/*
# autoload when start wm
exec waybar
exec /usr/libexec/polkit-mate-authentication-agent-1
exec wlsunset
exec wl-paste --watch cliphist store
exec swaync
### Output configuration
# using "swaybg" just put file path as below and end with 'fill'
output * background ~/.config/sway/wallpapers/frieren.png fill
#
output HDMI-A-1 resolution 1920x1080 position 1920,0
#exec swayidle -w \
# timeout 300 'swaylock -f -c 000000' \
# timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
# before-sleep 'swaylock -f -c 000000'
# This will lock your screen after 300 seconds of inactivity, then turn off
# your displays after another 300 seconds, and turn your screens back on when
# resumed. It will also lock your screen before your computer goes to sleep.
### Input configuration
input "2:14:ETPS/2_Elantech_Touchpad" {
dwt enabled
dwtp enabled
tap_button_map lrm
tap enabled
natural_scroll enabled
middle_emulation enabled
}
input type:keyboard {
xkb_options caps:escape
xkb_layout fr
repeat_delay 300
repeat_rate 50
}
input "6058:20564:ThinkPad_Extra_Buttons" {
}
# window gaps
smart_borders on
default_border pixel 2
default_floating_border pixel 3
gaps inner 1
gaps outer 1
# Window borders
# Colors: border background text indicator child_border
client.focused #9932cc #285577 #ffffff #2e9ef4 #2e9ef4
client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a
client.unfocused #333333 #222222 #888888 #292d2e #222222
client.urgent #2f343a #900000 #ffffff #900000 #900000
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
# Background color for inactive tabs in tabbed/stacked layout
client.background #000000
# thème du curseur de souris
seat seat0 xcursor_theme Bibata-Modern-Ice
# faire disparaître le titlebar
font pango:monospace 0.001
titlebar_border_thickness 1
### Key bindings
#
# Basics:
#
# Start a terminal
bindsym $mod+Return exec $term
# Kill focused window
bindsym $mod+q kill
# Start your launcher
bindsym $mod+space exec $menu
bindsym $mod+shift+d exec wofi --show run
# Start a file manager
bindsym $mod+e exec $file
# Start browser
bindsym $mod+a exec $browser
# Drag floating windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod.
# Despite the name, also works for non-floating windows.
# Change normal to inverse to use left mouse button for resizing and right
# mouse button for dragging.
floating_modifier $mod normal
# clipboard manager
bindsym $mod+w exec cliphist list | wofi | cliphist decode | wl-copy
# notification center
bindsym $mod+Shift+n exec swaync-client -t -sw
# Reload the configuration file
bindsym $mod+Shift+r reload
# Exit sway (logs you out of your Wayland session)
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
#
# Moving around:
#
# Move your focus around
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
# Or use $mod+[up|down|left|right]
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# Move the focused window with the same, but add Shift
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
# Ditto, with arrow keys
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
#
# Workspaces:
#
# Switch to workspace
bindsym $mod+ampersand workspace 1
bindsym $mod+eacute workspace 2
bindsym $mod+quotedbl workspace 3
bindsym $mod+apostrophe workspace 4
bindsym $mod+parenleft workspace 5
bindsym $mod+minus workspace 6
bindsym $mod+egrave workspace 7
bindsym $mod+underscore workspace 8
bindsym $mod+ccedilla workspace 9
bindsym $mod+agrave workspace 10
# Move focused container to workspace
bindsym $mod+Shift+ampersand workspace 01
bindsym $mod+Shift+eacute workspace 02
bindsym $mod+Shift+quotedbl workspace 03
bindsym $mod+Shift+apostrophe workspace 04
bindsym $mod+Shift+parenleft workspace 05
bindsym $mod+Shift+minus workspace 06
bindsym $mod+Shift+egrave workspace 07
bindsym $mod+Shift+underscore workspace 08
bindsym $mod+Shift+ccedilla workspace 09
bindsym $mod+Shift+agrave workspace 010
bindsym $mod+tab workspace next
bindsym $mod1+tab workspace prev
# external screen
# on laptop monitor
workspace 1 output $laptop
workspace 2 output $laptop
workspace 3 output $laptop
workspace 4 output $laptop
workspace 5 output $laptop
workspace 6 output $laptop
workspace 7 output $laptop
workspace 8 output $laptop
workspace 9 output $laptop
workspace 10 output $laptop
# on external monitor
workspace 01 output $external
workspace 02 output $external
workspace 03 output $external
workspace 04 output $external
workspace 05 output $external
workspace 06 output $external
workspace 07 output $external
workspace 08 output $external
workspace 09 output $external
workspace 010 output $external
# assignment
for_window [app_id=.*] focus
assign [app_id="foot"] 01
assign [app_id="foot"] 1
assign [app_id="zen"] 02
assign [app_id="zen"] 2
assign [app_id="anki"] 02
assign [app_id="anytype"] 3
assign [app_id="libreoffice"] 3
assign [app_id="signal"] 4
assign [app_id="thunderbird"] 04
assign [app_id="thunderbird"] 4
assign [app_id="mpv"] 05
assign [app_id="mpv"] 5
assign [app_id="vlc"] 05
assign [app_id="vlc"] 5
assign [app_id="steam"] 06
assign [app_id="steam"] 6
assign [app_id="kde-connect"] 7
assign [app_id="nextcloud"] 7
#
# Layout stuff:
#
# You can "split" the current object of your focus with
# $mod+b or $mod+v, for horizontal and vertical splits
# respectively.
bindsym $mod+b splith
bindsym $mod+v splitv
# Switch the current container between different layout styles
# bindsym $mod+s layout stacking
# bindsym $mod+w layout tabbed
bindsym $mod+s layout toggle split
# Make the current focus fullscreen
bindsym $mod+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+u focus mode_toggle
# Move focus to the parent container
# bindsym $mod+a focus parent
#
# Scratchpad:
#
# Sway has a "scratchpad", which is a bag of holding for windows.
# You can send windows there and get them back later.
# Move the currently focused window to the scratchpad
# bindsym $mod+Shift+minus move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
# bindsym $mod+minus scratchpad show
#
# Resizing containers:
#
mode "resize" {
# left will shrink the containers width
# right will grow the containers width
# up will shrink the containers height
# down will grow the containers height
bindsym $left resize shrink width 10px
bindsym $down resize grow height 10px
bindsym $up resize shrink height 10px
bindsym $right resize grow width 10px
# Ditto, with arrow keys
bindsym Left resize shrink width 10px
bindsym Down resize grow height 10px
bindsym Up resize shrink height 10px
bindsym Right resize grow width 10px
# Return to default mode
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+$mod1+r mode "resize"
#
# Utilities:
#
# Special keys to adjust volume via PulseAudio
bindsym --locked XF86AudioMute exec amixer sset Master toggle
bindsym --locked XF86AudioLowerVolume exec amixer sset Master 5%-
bindsym --locked XF86AudioRaiseVolume exec amixer sset Master 5%+
bindsym --locked XF86AudioMicMute exec pactl set-source-mute \@DEFAULT_SOURCE@ toggle
# Special keys to adjust brightness via brightnessctl
bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%-
bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+
# Special key to take a screenshot with grim
bindsym Print exec grim
bindsym $mod+Print exec grim -g "$(slurp)"
#power
bindsym $mod+Escape exec wlogout
bindsym $mod+Shift+x exec swaylock
#
# Status Bar disable because of use waybar instead if you not use waybar just uncomment those below:
#
# Read `man 5 sway-bar` for more information about this section.
# bar {
# position top
# When the status_command prints a new line to stdout, swaybar updates.
# The default just shows the current date and time.
# status_command while date +'%Y-%m-%d %X'; do sleep 1; done
# colors {
# statusline #ffffff
# background #323232
# inactive_workspace #32323200 #32323200 #5c5c5c
# }
#}
include /etc/sway/config.d/*

View file

@ -1,351 +0,0 @@
#include /home/oh/.config/sway/basic_key_bindings
#include /home/oh/.config/sway/windows_rules
#include /home/oh/.config/sway/input_config
#include /home/oh/.config/sway/colors
#include /home/oh/.config/sway/workspaces_rules
#include /home/oh/.config/sway/app_assignment
#include /home/oh/.config/sway/layout
# include /home/oh/.config/sway/utilities
### Variables
bindgesture swipe:up workspace prev
bindgesture swipe:down workspace next
# Logo key. Use Mod1 for Alt.
set $mod Mod4
set $mod1 Alt
# Home row direction keys, like vim
set $left k
set $down l
set $up o
set $right m
# screens
set $laptop eDP-1
set $external HDMI-A-1
## Preferred apps
set $term foot
set $menu wofi --show drun
set $file nautilus
set $browser flatpak run app.zen_browser.zen
include /etc/sway/config-vars.d/*
# autoload when start wm
exec /usr/libexec/polkit-mate-authentication-agent-1
exec wlsunset
exec wl-paste -t text --watch clipman store
exec wl-paste -p -t text --watch clipman store -P --histpath="~/.local/share/clipman-primary.json"
exec clipman restore
exec swaync
### Output configuration
# using "swaybg" just put file path as below and end with 'fill'
output * background ~/.config/sway/wallpapers/frieren.png fill
#
output HDMI-A-1 resolution 1920x1080 position 1920,0
exec swayidle -w \
timeout 300 'swaylock -f -c 000000' \
timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
before-sleep 'swaylock -f -c 000000'
# This will lock your screen after 300 seconds of inactivity, then turn off
# your displays after another 300 seconds, and turn your screens back on when
# resumed. It will also lock your screen before your computer goes to sleep.
# Inhibit idle when any window is fullscreen
for_window [class=".*"] inhibit_idle fullscreen
for_window [app_id=".*"] inhibit_idle fullscreen
### Input configuration
input "2:14:ETPS/2_Elantech_Touchpad" {
dwt enabled
dwtp enabled
tap_button_map lrm
tap enabled
natural_scroll enabled
middle_emulation enabled
}
input type:keyboard {
xkb_options caps:escape
xkb_layout fr
repeat_delay 300
repeat_rate 50
}
input "6058:20564:ThinkPad_Extra_Buttons" {
}
# window gaps
smart_borders on
default_border pixel 3
default_floating_border pixel 3
gaps inner 0
gaps outer 0
# Window borders
# Colors: border background text indicator child_border
client.focused #9932cc #285577 #ffffff #2e9ef4 #2e9ef4
client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a
client.unfocused #333333 #222222 #888888 #292d2e #222222
client.urgent #2f343a #900000 #ffffff #900000 #900000
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
# Background color for inactive tabs in tabbed/stacked layout
client.background #000000
# thème du curseur de souris
seat seat0 xcursor_theme Bibata-Modern-Ice
# faire disparaître le titlebar
font pango:monospace 0.001
titlebar_border_thickness 1
### Key bindings
#
# Basics:
#
# Start a terminal
bindsym $mod+Return exec $term
# Kill focused window
bindsym $mod+q kill
# Start your launcher
bindsym $mod+space exec $menu
bindsym $mod+shift+d exec wofi --show run
# Start a file manager
bindsym $mod+e exec $file
# Start browser
bindsym $mod+a exec $browser
# Drag floating windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod.
# Despite the name, also works for non-floating windows.
# Change normal to inverse to use left mouse button for resizing and right
# mouse button for dragging.
floating_modifier $mod normal
# clipboard manager
bindsym $mod+semicolon exec clipman pick --tool wofi -T'--prompt=clipboard-history -i'
bindsym $mod+x exec "clipman pick -t wofi --err-on-no-selection && wtype -M ctrl -M shift v"
# notification center
bindsym $mod+Shift+n exec swaync-client -t -sw
# Reload the configuration file
bindsym $mod+Shift+r reload
# Exit sway (logs you out of your Wayland session)
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
#
# Moving around:
#
# Move your focus around
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
# Or use $mod+[up|down|left|right]
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# Move the focused window with the same, but add Shift
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
# Ditto, with arrow keys
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
#
# Workspaces:
#
# Switch to workspace
bindsym $mod+ampersand workspace 01
bindsym $mod+eacute workspace 02
bindsym $mod+quotedbl workspace 03
bindsym $mod+apostrophe workspace 04
bindsym $mod+parenleft workspace 05
bindsym $mod+minus workspace 06
bindsym $mod+egrave workspace 07
bindsym $mod+underscore workspace 08
bindsym $mod+ccedilla workspace 09
bindsym $mod+agrave workspace 010
# Move focused container to workspace
bindsym $mod+Shift+ampersand move container to workspace 01
bindsym $mod+Shift+eacute move container to workspace 02
bindsym $mod+Shift+quotedbl move container to workspace 03
bindsym $mod+Shift+apostrophe move container to workspace 04
bindsym $mod+Shift+parenleft move container to workspace 05
bindsym $mod+Shift+minus move container to workspace 06
bindsym $mod+Shift+egrave move container to workspace 07
bindsym $mod+Shift+underscore move container to workspace 08
bindsym $mod+Shift+ccedilla move container to workspace 09
bindsym $mod+Shift+agrave move container to workspace 010
bindsym $mod+tab workspace next
bindsym $mod1+tab workspace prev
# external screen
# on laptop monitor
workspace 1 output $laptop
workspace 2 output $laptop
workspace 3 output $laptop
workspace 4 output $laptop
workspace 5 output $laptop
workspace 6 output $laptop
workspace 7 output $laptop
workspace 8 output $laptop
workspace 9 output $laptop
workspace 10 output $laptop
# on external monitor
workspace 01 output $external
workspace 02 output $external
workspace 03 output $external
workspace 04 output $external
workspace 05 output $external
workspace 06 output $external
workspace 07 output $external
workspace 08 output $external
workspace 09 output $external
workspace 010 output $external
# assignment
for_window [app_id=.*] focus
assign [app_id="foot"] 01
assign [app_id="foot"] 1
assign [app_id="zen"] 02
assign [app_id="zen"] 2
assign [app_id="anki"] 02
assign [app_id="anytype"] 03
assign [app_id="libreoffice"] 03
assign [app_id="signal"] 04
assign [app_id="thunderbird"] 04
assign [app_id="thunderbird"] 4
assign [app_id="mpv"] 05
assign [app_id="mpv"] 5
assign [app_id="vlc"] 05
assign [app_id="vlc"] 5
assign [app_id="steam"] 06
assign [app_id="steam"] 6
assign [app_id="kde-connect"] 07
assign [app_id="nextcloud"] 07
assign [app_id="Zotero"] 07
#
# Layout stuff:
#
# You can "split" the current object of your focus with
# $mod+b or $mod+v, for horizontal and vertical splits
# respectively.
bindsym $mod+b splith
bindsym $mod+v splitv
# Switch the current container between different layout styles
# bindsym $mod+s layout stacking
# bindsym $mod+w layout tabbed
bindsym $mod+s layout toggle split
# Make the current focus fullscreen
bindsym $mod+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+u focus mode_toggle
# Move focus to the parent container
# bindsym $mod+a focus parent
#
# Scratchpad:
#
# Sway has a "scratchpad", which is a bag of holding for windows.
# You can send windows there and get them back later.
# Move the currently focused window to the scratchpad
# bindsym $mod+Shift+minus move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
# bindsym $mod+minus scratchpad show
#
# Resizing containers:
#
mode "resize" {
# left will shrink the containers width
# right will grow the containers width
# up will shrink the containers height
# down will grow the containers height
bindsym $left resize shrink width 10px
bindsym $down resize grow height 10px
bindsym $up resize shrink height 10px
bindsym $right resize grow width 10px
# Ditto, with arrow keys
bindsym Left resize shrink width 10px
bindsym Down resize grow height 10px
bindsym Up resize shrink height 10px
bindsym Right resize grow width 10px
# Return to default mode
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+$mod1+r mode "resize"
#
# Utilities:
#
# Special keys to adjust volume via PulseAudio
bindsym --locked XF86AudioMute exec amixer sset Master toggle
bindsym --locked XF86AudioLowerVolume exec amixer sset Master 5%-
bindsym --locked XF86AudioRaiseVolume exec amixer sset Master 5%+
bindsym --locked XF86AudioMicMute exec pactl set-source-mute \@DEFAULT_SOURCE@ toggle
# Special keys to adjust brightness via brightnessctl
bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%-
bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+
# Special key to take a screenshot with grim
bindsym Print exec grim
bindsym $mod+Shift+s exec grim -g "$(slurp)"
#power
bindsym $mod+Escape exec wlogout
bindsym $mod+Shift+x exec swaylock
#
# Status Bar disable because of use waybar instead if you not use waybar just uncomment those below:
#
bar {
swaybar_command waybar
position top
hidden_state show
mode hide
modifier $mod
}
include /etc/sway/config.d/*

View file

@ -1,13 +1,3 @@
#include /home/oh/.config/sway/basic_key_bindings
#include /home/oh/.config/sway/windows_rules
#include /home/oh/.config/sway/input_config
#include /home/oh/.config/sway/colors
#include /home/oh/.config/sway/workspaces_rules
#include /home/oh/.config/sway/app_assignment
# include /home/oh/.config/sway/layout
# include /home/oh/.config/sway/utilities
### Variables ### Variables
bindgesture swipe:up workspace prev bindgesture swipe:up workspace prev
bindgesture swipe:down workspace next bindgesture swipe:down workspace next
@ -121,7 +111,8 @@ titlebar_border_thickness 1
bindsym $mod+z exec $ipc panel-toggle control-center bindsym $mod+z exec $ipc panel-toggle control-center
bindsym $mod+comma exec $ipc settings-toggle bindsym $mod+comma exec $ipc settings-toggle
bindsym $mod+w exec $ipc weather-toggle bindsym $mod+exclam exec $ipc panel-toggle control-center weather
bindsym $mod+colon exec $ipc panel-toggle control-center calendar
# Start a terminal # Start a terminal
bindsym $mod+Return exec $term bindsym $mod+Return exec $term
@ -131,11 +122,13 @@ titlebar_border_thickness 1
# Start your launcher # Start your launcher
bindsym $mod+space exec $ipc panel-toggle launcher bindsym $mod+space exec $ipc panel-toggle launcher
# bindsym $mod+space exec $menu # bindsym $mod+space exec $menu bindsym $mod+shift+d exec wofi --show run
# bindsym $mod+shift+d exec wofi --show run
# Start a file manager # Start a file manager
bindsym $mod+e exec $file # bindsym $mod+e exec $file
# test of yazi as a CLI file manager
bindsym $mod+e exec --no-startup-id foot -e yazi
# Start browser # Start browser
bindsym $mod+a exec $browser bindsym $mod+a exec $browser

View file

@ -1,70 +1,7 @@
# Default config for sway
# Copy this to ~/.config/sway/config and edit it to your liking.
# Read `man 5 sway` for a complete reference.
include /home/oh/.config/sway/basic_key_bindings
include /home/oh/.config/sway/windows_rules
include /home/oh/.config/sway/input_config
include /home/oh/.config/sway/colors
include /home/oh/.config/sway/workspaces_rules
include /home/oh/.config/sway/app_assignment
include /home/oh/.config/sway/layout
include /home/oh/.config/sway/utilities
### Variables
# Logo key. Use Mod1 for Alt.
set $mod Mod4
# Home row direction keys, like vim
set $left k
set $down l
set $up o
set $right m
# screens
set $laptop eDP-1
set $external HDMI-A-1
## Preferred apps
set $term foot
set $menu wofi --show drun
set $file nautilus
set $browser flatpak run app.zen_browser.zen
include /etc/sway/config-vars.d/*
# autoload when start wm
exec waybar
exec /usr/libexec/polkit-mate-authentication-agent-1
exec wlsunset
exec wl-paste --watch cliphist store
### Output configuration
# using "swaybg" just put file path as below and end with 'fill'
output * background ~/.config/sway/wallpapers/frieren.png fill
#
output HDMI-A-1 resolution 1920x1080 position 1920,0
#
#exec swayidle -w \
# timeout 300 'swaylock -f -c 000000' \
# timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
# before-sleep 'swaylock -f -c 000000'
# This will lock your screen after 300 seconds of inactivity, then turn off
# your displays after another 300 seconds, and turn your screens back on when
# resumed. It will also lock your screen before your computer goes to sleep.
### Input configuration
input "2:14:ETPS/2_Elantech_Touchpad" { input "2:14:ETPS/2_Elantech_Touchpad" {
dwt enabled dwt enabled
dwtp enabled
tap_button_map lrm
tap enabled tap enabled
natural_scroll enabled natural_scroll enabled
middle_emulation enabled middle_emulation enabled
@ -78,269 +15,4 @@ input type:keyboard {
} }
input "6058:20564:ThinkPad_Extra_Buttons" { input "6058:20564:ThinkPad_Extra_Buttons" {
} }
# window gaps
smart_borders on
default_border pixel 2
default_floating_border pixel 3
gaps inner 1
gaps outer 1
# Window borders
# Colors: border background text indicator child_border
client.focused #9932cc #285577 #ffffff #2e9ef4 #2e9ef4
client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a
client.unfocused #333333 #222222 #888888 #292d2e #222222
client.urgent #2f343a #900000 #ffffff #900000 #900000
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
# Background color for inactive tabs in tabbed/stacked layout
client.background #000000
# faire disparaître le titlebar
font pango:monospace 0.001
titlebar_border_thickness 1
### Key bindings
#
# Basics:
#
# Start a terminal
bindsym $mod+Enter exec $term
# Kill focused window
bindsym $mod+q kill
# Start your launcher
bindsym $mod+space exec $menu
bindsym $mod+shift+d exec wofi --show run
# Start a file manager
bindsym $mod+e exec $file
# Start browser
bindsym $mod+a exec $browser
# Drag floating windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod.
# Despite the name, also works for non-floating windows.
# Change normal to inverse to use left mouse button for resizing and right
# mouse button for dragging.
floating_modifier $mod normal
# clipboard manager
bindsym $mod+w exec cliphist list | wofi | cliphist decode | wl-copy
# Reload the configuration file
bindsym $mod+Shift+r reload
# Exit sway (logs you out of your Wayland session)
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
#
# Moving around:
#
# Move your focus around
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
# Or use $mod+[up|down|left|right]
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# Move the focused window with the same, but add Shift
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
# Ditto, with arrow keys
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
#
# Workspaces:
#
# Switch to workspace
bindsym Mod4+ampersand workspace 1
bindsym Mod4+eacute workspace 2
bindsym Mod4+quotedbl workspace 3
bindsym Mod4+apostrophe workspace 4
bindsym Mod4+parenleft workspace 5
bindsym Mod4+minus workspace 6
bindsym Mod4+egrave workspace 7
bindsym Mod4+underscore workspace 8
bindsym Mod4+ccedilla workspace 9
bindsym Mod4+agrave workspace 10
# Move focused container to workspace
bindsym Mod4+Shift+ampersand workspace 01
bindsym Mod4+Shift+eacute workspace 02
bindsym Mod4+Shift+quotedbl workspace 03
bindsym Mod4+Shift+apostrophe workspace 04
bindsym Mod4+Shift+parenleft workspace 05
bindsym Mod4+Shift+minus workspace 06
bindsym Mod4+Shift+egrave workspace 07
bindsym Mod4+Shift+underscore workspace 08
bindsym Mod4+Shift+ccedilla workspace 09
bindsym Mod4+Shift+agrave workspace 010
bindsym Mod4+tab workspace next
bindsym Mod4+Shift+tab workspace prev
# external screen
# on laptop monitor
workspace 1 output $laptop
workspace 2 output $laptop
workspace 3 output $laptop
workspace 4 output $laptop
workspace 5 output $laptop
workspace 6 output $laptop
workspace 7 output $laptop
workspace 8 output $laptop
workspace 9 output $laptop
workspace 10 output $laptop
# on external monitor
workspace 01 output $external
workspace 02 output $external
workspace 03 output $external
workspace 04 output $external
workspace 05 output $external
workspace 06 output $external
workspace 07 output $external
workspace 08 output $external
workspace 09 output $external
workspace 010 output $external
# assignment
for_window [app_id=.*] focus
assign [app_id="foot"] 01
assign [app_id="foot"] 1
assign [app_id="zen"] 02
assign [app_id="zen"] 2
assign [app_id="anki"] 02
assign [app_id="anytype"] 3
assign [app_id="libreoffice"] 3
assign [app_id="signal"] 4
assign [app_id="thunderbird"] 04
assign [app_id="thunderbird"] 4
assign [app_id="mpv"] 05
assign [app_id="mpv"] 5
assign [app_id="vlc"] 05
assign [app_id="vlc"] 5
assign [app_id="steam"] 06
assign [app_id="steam"] 6
assign [app_id="kde-connect"] 7
#
# Layout stuff:
#
# You can "split" the current object of your focus with
# $mod+b or $mod+v, for horizontal and vertical splits
# respectively.
bindsym $mod+b splith
bindsym $mod+v splitv
# Switch the current container between different layout styles
# bindsym $mod+s layout stacking
# bindsym $mod+w layout tabbed
bindsym $mod+s layout toggle split
# Make the current focus fullscreen
bindsym $mod+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+u focus mode_toggle
# Move focus to the parent container
# bindsym $mod+a focus parent
#
# Scratchpad:
#
# Sway has a "scratchpad", which is a bag of holding for windows.
# You can send windows there and get them back later.
# Move the currently focused window to the scratchpad
# bindsym $mod+Shift+minus move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
# bindsym $mod+minus scratchpad show
#
# Resizing containers:
#
mode "resize" {
# left will shrink the containers width
# right will grow the containers width
# up will shrink the containers height
# down will grow the containers height
bindsym $left resize shrink width 10px
bindsym $down resize grow height 10px
bindsym $up resize shrink height 10px
bindsym $right resize grow width 10px
# Ditto, with arrow keys
bindsym Left resize shrink width 10px
bindsym Down resize grow height 10px
bindsym Up resize shrink height 10px
bindsym Right resize grow width 10px
# Return to default mode
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+alt+r mode "resize"
#
# Utilities:
#
# Special keys to adjust volume via PulseAudio
bindsym --locked XF86AudioMute exec amixer sset Master toggle
bindsym --locked XF86AudioLowerVolume exec amixer sset Master 5%-
bindsym --locked XF86AudioRaiseVolume exec amixer sset Master 5%+
bindsym --locked XF86AudioMicMute exec pactl set-source-mute \@DEFAULT_SOURCE@ toggle
# Special keys to adjust brightness via brightnessctl
bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%-
bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+
# Special key to take a screenshot with grim
bindsym Print exec grim
bindsym $mod+Print exec grim -g "$(slurp)"
#power
bindsym Mod4+Escape exec wlogout
bindsym Mod4+Shift+x exec swaylock
#
# Status Bar disable because of use waybar instead if you not use waybar just uncomment those below:
#
# Read `man 5 sway-bar` for more information about this section.
# bar {
# position top
# When the status_command prints a new line to stdout, swaybar updates.
# The default just shows the current date and time.
# status_command while date +'%Y-%m-%d %X'; do sleep 1; done
# colors {
# statusline #ffffff
# background #323232
# inactive_workspace #32323200 #32323200 #5c5c5c
# }
#}
include /etc/sway/config.d/*

View file

@ -1,257 +1,39 @@
# Default config for sway
# Copy this to ~/.config/sway/config and edit it to your liking.
# Read `man 5 sway` for a complete reference.
include /home/oh/.config/sway/basic_key_bindings
include /home/oh/.config/sway/windows_rules
include /home/oh/.config/sway/input_config
include /home/oh/.config/sway/colors
include /home/oh/.config/sway/workspaces_rules
include /home/oh/.config/sway/app_assignment
include /home/oh/.config/sway/layout
include /home/oh/.config/sway/utilities
### Variables
# Logo key. Use Mod1 for Alt.
set $mod Mod4
# Home row direction keys, like vim
set $left k
set $down l
set $up o
set $right m
# screens
set $laptop eDP-1
set $external HDMI-A-1
## Preferred apps
set $term foot
set $menu wofi --show drun
set $file nautilus
set $browser flatpak run app.zen_browser.zen
include /etc/sway/config-vars.d/*
# autoload when start wm
exec waybar
exec /usr/libexec/polkit-mate-authentication-agent-1
exec wlsunset
exec wl-paste --watch cliphist store
### Output configuration
# using "swaybg" just put file path as below and end with 'fill'
output * background ~/.config/sway/wallpapers/frieren.png fill
# #
# Resizing containers:
output HDMI-A-1 resolution 1920x1080 position 1920,0
# #
#exec swayidle -w \ mode "resize" {
# timeout 300 'swaylock -f -c 000000' \ # left will shrink the containers width
# timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \ # right will grow the containers width
# before-sleep 'swaylock -f -c 000000' # up will shrink the containers height
# down will grow the containers height
bindsym $left resize shrink width 10px
bindsym $down resize grow height 10px
bindsym $up resize shrink height 10px
bindsym $right resize grow width 10px
# This will lock your screen after 300 seconds of inactivity, then turn off # Ditto, with arrow keys
# your displays after another 300 seconds, and turn your screens back on when bindsym Left resize shrink width 10px
# resumed. It will also lock your screen before your computer goes to sleep. bindsym Down resize grow height 10px
bindsym Up resize shrink height 10px
bindsym Right resize grow width 10px
### Input configuration # Return to default mode
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+$mod1+r mode "resize"
input "2:14:ETPS/2_Elantech_Touchpad" {
dwt enabled
tap enabled
natural_scroll enabled
middle_emulation enabled
}
input type:keyboard {
xkb_options caps:escape
xkb_layout fr
repeat_delay 300
repeat_rate 50
}
input "6058:20564:ThinkPad_Extra_Buttons" {
}
# window gaps
smart_borders on
default_border pixel 2
default_floating_border pixel 3
gaps inner 1
gaps outer 1
# Window borders
# Colors: border background text indicator child_border
client.focused #9932cc #285577 #ffffff #2e9ef4 #2e9ef4
client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a
client.unfocused #333333 #222222 #888888 #292d2e #222222
client.urgent #2f343a #900000 #ffffff #900000 #900000
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
# Background color for inactive tabs in tabbed/stacked layout
client.background #000000
# faire disparaître le titlebar
font pango:monospace 0.001
titlebar_border_thickness 1
### Key bindings
#
# Basics:
#
# Start a terminal
bindsym $mod+Enter exec $term
# Kill focused window
bindsym $mod+q kill
# Start your launcher
bindsym $mod+space exec $menu
bindsym $mod+shift+d exec wofi --show run
# Start a file manager
bindsym $mod+e exec $file
# Start browser
bindsym $mod+a exec $browser
# Drag floating windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod.
# Despite the name, also works for non-floating windows.
# Change normal to inverse to use left mouse button for resizing and right
# mouse button for dragging.
floating_modifier $mod normal
# clipboard manager
bindsym $mod+w exec cliphist list | wofi | cliphist decode | wl-copy
# Reload the configuration file
bindsym $mod+Shift+r reload
# Exit sway (logs you out of your Wayland session)
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
#
# Moving around:
#
# Move your focus around
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
# Or use $mod+[up|down|left|right]
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# Move the focused window with the same, but add Shift
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
# Ditto, with arrow keys
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
#
# Workspaces:
#
# Switch to workspace
bindsym Mod4+ampersand workspace 1
bindsym Mod4+eacute workspace 2
bindsym Mod4+quotedbl workspace 3
bindsym Mod4+apostrophe workspace 4
bindsym Mod4+parenleft workspace 5
bindsym Mod4+minus workspace 6
bindsym Mod4+egrave workspace 7
bindsym Mod4+underscore workspace 8
bindsym Mod4+ccedilla workspace 9
bindsym Mod4+agrave workspace 10
# Move focused container to workspace
bindsym Mod4+Shift+ampersand workspace 01
bindsym Mod4+Shift+eacute workspace 02
bindsym Mod4+Shift+quotedbl workspace 03
bindsym Mod4+Shift+apostrophe workspace 04
bindsym Mod4+Shift+parenleft workspace 05
bindsym Mod4+Shift+minus workspace 06
bindsym Mod4+Shift+egrave workspace 07
bindsym Mod4+Shift+underscore workspace 08
bindsym Mod4+Shift+ccedilla workspace 09
bindsym Mod4+Shift+agrave workspace 010
bindsym Mod4+tab workspace next
bindsym Mod4+Shift+tab workspace prev
# external screen
# on laptop monitor
workspace 1 output $laptop
workspace 2 output $laptop
workspace 3 output $laptop
workspace 4 output $laptop
workspace 5 output $laptop
workspace 6 output $laptop
workspace 7 output $laptop
workspace 8 output $laptop
workspace 9 output $laptop
workspace 10 output $laptop
# on external monitor
workspace 01 output $external
workspace 02 output $external
workspace 03 output $external
workspace 04 output $external
workspace 05 output $external
workspace 06 output $external
workspace 07 output $external
workspace 08 output $external
workspace 09 output $external
workspace 010 output $external
# assignment
for_window [app_id=.*] focus
assign [app_id="foot"] 01
assign [app_id="foot"] 1
assign [app_id="zen"] 02
assign [app_id="zen"] 2
assign [app_id="anki"] 02
assign [app_id="anytype"] 3
assign [app_id="libreoffice"] 3
assign [app_id="signal"] 4
assign [app_id="thunderbird"] 04
assign [app_id="thunderbird"] 4
assign [app_id="mpv"] 05
assign [app_id="mpv"] 5
assign [app_id="vlc"] 05
assign [app_id="vlc"] 5
assign [app_id="steam"] 06
assign [app_id="steam"] 6
assign [app_id="kde-connect"] 7
# #
# Layout stuff: # Layout stuff:
# #
# You can "split" the current object of your focus with # You can "split" the current object of your focus with
# $mod+b or $mod+v, for horizontal and vertical splits # $mod+b or $mod+v, for horizontal and vertical splits
# respectively. # respectively.
bindsym $mod+b splith # bindsym $mod+b splith
bindsym $mod+v splitv # bindsym $mod+v splitv
# Switch the current container between different layout styles # Switch the current container between different layout styles
# bindsym $mod+s layout stacking # bindsym $mod+s layout stacking
@ -269,78 +51,3 @@ assign [app_id="kde-connect"] 7
# Move focus to the parent container # Move focus to the parent container
# bindsym $mod+a focus parent # bindsym $mod+a focus parent
#
# Scratchpad:
#
# Sway has a "scratchpad", which is a bag of holding for windows.
# You can send windows there and get them back later.
# Move the currently focused window to the scratchpad
# bindsym $mod+Shift+minus move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
# bindsym $mod+minus scratchpad show
#
# Resizing containers:
#
mode "resize" {
# left will shrink the containers width
# right will grow the containers width
# up will shrink the containers height
# down will grow the containers height
bindsym $left resize shrink width 10px
bindsym $down resize grow height 10px
bindsym $up resize shrink height 10px
bindsym $right resize grow width 10px
# Ditto, with arrow keys
bindsym Left resize shrink width 10px
bindsym Down resize grow height 10px
bindsym Up resize shrink height 10px
bindsym Right resize grow width 10px
# Return to default mode
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+alt+r mode "resize"
#
# Utilities:
#
# Special keys to adjust volume via PulseAudio
bindsym --locked XF86AudioMute exec amixer sset Master toggle
bindsym --locked XF86AudioLowerVolume exec amixer sset Master 5%-
bindsym --locked XF86AudioRaiseVolume exec amixer sset Master 5%+
bindsym --locked XF86AudioMicMute exec pactl set-source-mute \@DEFAULT_SOURCE@ toggle
# Special keys to adjust brightness via brightnessctl
bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%-
bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+
# Special key to take a screenshot with grim
bindsym Print exec grim
bindsym $mod+Print exec grim -g "$(slurp)"
#power
bindsym Mod4+Escape exec wlogout
bindsym Mod4+Shift+x exec swaylock
#
# Status Bar disable because of use waybar instead if you not use waybar just uncomment those below:
#
# Read `man 5 sway-bar` for more information about this section.
# bar {
# position top
# When the status_command prints a new line to stdout, swaybar updates.
# The default just shows the current date and time.
# status_command while date +'%Y-%m-%d %X'; do sleep 1; done
# colors {
# statusline #ffffff
# background #323232
# inactive_workspace #32323200 #32323200 #5c5c5c
# }
#}
include /etc/sway/config.d/*

View file

@ -1,18 +0,0 @@
set $primary #fff59b
set $on_primary #0e0e43
set $secondary #a9aefe
set $tertiary #9bfece
set $error #fd4663
set $surface #070722
set $on_surface #f3edf7
set $on_surface_variant #7c80b4
set $outline #51589b
## Window Colours
# class border backgr. text indicator child_border
client.focused $primary $surface $on_surface $primary $primary
client.focused_inactive $outline $surface $on_surface_variant $outline $outline
client.unfocused $outline $surface $on_surface_variant $outline $outline
client.urgent $error $surface $on_surface $error $error
client.placeholder $surface $surface $on_surface_variant $surface $surface
client.background $surface

View file

@ -1,22 +0,0 @@
# Désactiver la tablette en tant qu'écran (si elle est détectée comme HDMI-A-1)
# Souvent, les tablettes connectées en HDMI sont vues comme des écrans.
# Il faut désactiver l'output HDMI-A-1 si ce n'est pas votre écran principal,
# ou configurer la tablette comme un périphérique d'entrée uniquement.
# Si la tablette est détectée comme un périphérique d'entrée (Input) :
input 9580:8200:HUION_Huion_Tablet_GS1333_Pen map_to_output HDMI-A-1
workspace Tablet output HDMI-A-1
seat tablet {
hide_cursor 200
attach 9580:8200:HUION_Huion_Tablet_GS1333
attach 9580:8200:HUION_Huion_Tablet_GS1333_Pen
attach 9580:8200:HUION_Huion_Tablet_GS1333_Pad
attach 9580:8200:HUION_Huion_Tablet_GS1333_Keyboard
attach 9580:8200:HUION_Huion_Tablet_GS1333_Consumer_Control
attach 9580:8200:HUION_Huion_Tablet_GS1333_System_Control
}
output HDMI-A-1 transform 180

View file

@ -1 +0,0 @@
/home/oh/.dotfiles/.config/sway

View file

@ -1,314 +1,7 @@
# Default config for sway
# Copy this to ~/.config/sway/config and edit it to your liking.
# Read `man 5 sway` for a complete reference.
include /home/oh/.config/sway/basic_key_bindings
include /home/oh/.config/sway/windows_rules
include /home/oh/.config/sway/input_config
include /home/oh/.config/sway/colors
include /home/oh/.config/sway/workspaces_rules
include /home/oh/.config/sway/app_assignment
include /home/oh/.config/sway/layout
include /home/oh/.config/sway/utilities
### Variables
# Logo key. Use Mod1 for Alt.
set $mod Mod4
# Home row direction keys, like vim
set $left k
set $down l
set $up o
set $right m
# screens
set $laptop eDP-1
set $external HDMI-A-1
## Preferred apps
set $term foot
set $menu wofi --show drun
set $file nautilus
set $browser flatpak run app.zen_browser.zen
include /etc/sway/config-vars.d/*
# autoload when start wm
exec waybar
exec /usr/libexec/polkit-mate-authentication-agent-1
exec wlsunset
exec wl-paste --watch cliphist store
### Output configuration
# using "swaybg" just put file path as below and end with 'fill'
output * background ~/.config/sway/wallpapers/frieren.png fill
#
output HDMI-A-1 resolution 1920x1080 position 1920,0
#
#exec swayidle -w \
# timeout 300 'swaylock -f -c 000000' \
# timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
# before-sleep 'swaylock -f -c 000000'
# This will lock your screen after 300 seconds of inactivity, then turn off
# your displays after another 300 seconds, and turn your screens back on when
# resumed. It will also lock your screen before your computer goes to sleep.
### Input configuration
input "2:14:ETPS/2_Elantech_Touchpad" {
dwt enabled
tap enabled
natural_scroll enabled
middle_emulation enabled
}
input type:keyboard {
xkb_options caps:escape
xkb_layout fr
repeat_delay 300
repeat_rate 50
}
input "6058:20564:ThinkPad_Extra_Buttons" {
}
# window gaps
smart_borders on
default_border pixel 2
default_floating_border pixel 3
gaps inner 1
gaps outer 1
# Window borders
# Colors: border background text indicator child_border
client.focused #9932cc #285577 #ffffff #2e9ef4 #2e9ef4
client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a
client.unfocused #333333 #222222 #888888 #292d2e #222222
client.urgent #2f343a #900000 #ffffff #900000 #900000
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
# Background color for inactive tabs in tabbed/stacked layout
client.background #000000
# faire disparaître le titlebar
font pango:monospace 0.001
titlebar_border_thickness 1
### Key bindings
#
# Basics:
#
# Start a terminal
bindsym $mod+Enter exec $term
# Kill focused window
bindsym $mod+q kill
# Start your launcher
bindsym $mod+space exec $menu
bindsym $mod+shift+d exec wofi --show run
# Start a file manager
bindsym $mod+e exec $file
# Start browser
bindsym $mod+a exec $browser
# Drag floating windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod.
# Despite the name, also works for non-floating windows.
# Change normal to inverse to use left mouse button for resizing and right
# mouse button for dragging.
floating_modifier $mod normal
# clipboard manager
bindsym $mod+w exec cliphist list | wofi | cliphist decode | wl-copy
# Reload the configuration file
bindsym $mod+Shift+r reload
# Exit sway (logs you out of your Wayland session)
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
#
# Moving around:
#
# Move your focus around
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
# Or use $mod+[up|down|left|right]
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# Move the focused window with the same, but add Shift
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
# Ditto, with arrow keys
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
#
# Workspaces:
#
# Switch to workspace
bindsym Mod4+ampersand workspace 1
bindsym Mod4+eacute workspace 2
bindsym Mod4+quotedbl workspace 3
bindsym Mod4+apostrophe workspace 4
bindsym Mod4+parenleft workspace 5
bindsym Mod4+minus workspace 6
bindsym Mod4+egrave workspace 7
bindsym Mod4+underscore workspace 8
bindsym Mod4+ccedilla workspace 9
bindsym Mod4+agrave workspace 10
# Move focused container to workspace
bindsym Mod4+Shift+ampersand workspace 01
bindsym Mod4+Shift+eacute workspace 02
bindsym Mod4+Shift+quotedbl workspace 03
bindsym Mod4+Shift+apostrophe workspace 04
bindsym Mod4+Shift+parenleft workspace 05
bindsym Mod4+Shift+minus workspace 06
bindsym Mod4+Shift+egrave workspace 07
bindsym Mod4+Shift+underscore workspace 08
bindsym Mod4+Shift+ccedilla workspace 09
bindsym Mod4+Shift+agrave workspace 010
bindsym Mod4+tab workspace next
bindsym Mod4+Shift+tab workspace prev
# external screen
# on laptop monitor
workspace 1 output $laptop
workspace 2 output $laptop
workspace 3 output $laptop
workspace 4 output $laptop
workspace 5 output $laptop
workspace 6 output $laptop
workspace 7 output $laptop
workspace 8 output $laptop
workspace 9 output $laptop
workspace 10 output $laptop
# on external monitor
workspace 01 output $external
workspace 02 output $external
workspace 03 output $external
workspace 04 output $external
workspace 05 output $external
workspace 06 output $external
workspace 07 output $external
workspace 08 output $external
workspace 09 output $external
workspace 010 output $external
# assignment
for_window [app_id=.*] focus
assign [app_id="foot"] 01
assign [app_id="foot"] 1
assign [app_id="zen"] 02
assign [app_id="zen"] 2
assign [app_id="anki"] 02
assign [app_id="anytype"] 3
assign [app_id="libreoffice"] 3
assign [app_id="signal"] 4
assign [app_id="thunderbird"] 04
assign [app_id="thunderbird"] 4
assign [app_id="mpv"] 05
assign [app_id="mpv"] 5
assign [app_id="vlc"] 05
assign [app_id="vlc"] 5
assign [app_id="steam"] 06
assign [app_id="steam"] 6
assign [app_id="kde-connect"] 7
#
# Layout stuff:
#
# You can "split" the current object of your focus with
# $mod+b or $mod+v, for horizontal and vertical splits
# respectively.
bindsym $mod+b splith
bindsym $mod+v splitv
# Switch the current container between different layout styles
# bindsym $mod+s layout stacking
# bindsym $mod+w layout tabbed
bindsym $mod+s layout toggle split
# Make the current focus fullscreen
bindsym $mod+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+u focus mode_toggle
# Move focus to the parent container
# bindsym $mod+a focus parent
#
# Scratchpad:
#
# Sway has a "scratchpad", which is a bag of holding for windows.
# You can send windows there and get them back later.
# Move the currently focused window to the scratchpad
# bindsym $mod+Shift+minus move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
# bindsym $mod+minus scratchpad show
#
# Resizing containers:
#
mode "resize" {
# left will shrink the containers width
# right will grow the containers width
# up will shrink the containers height
# down will grow the containers height
bindsym $left resize shrink width 10px
bindsym $down resize grow height 10px
bindsym $up resize shrink height 10px
bindsym $right resize grow width 10px
# Ditto, with arrow keys
bindsym Left resize shrink width 10px
bindsym Down resize grow height 10px
bindsym Up resize shrink height 10px
bindsym Right resize grow width 10px
# Return to default mode
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+alt+r mode "resize"
# #
# Utilities: # Utilities:
# #
# Special keys to adjust volume via PulseAudio # Special keys to adjust volume via PulseAudio
bindsym --locked XF86AudioMute exec amixer sset Master toggle bindsym --locked XF86AudioMute exec amixer sset Master toggle
bindsym --locked XF86AudioLowerVolume exec amixer sset Master 5%- bindsym --locked XF86AudioLowerVolume exec amixer sset Master 5%-
@ -319,28 +12,25 @@ bindsym $mod+alt+r mode "resize"
bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+ bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+
# Special key to take a screenshot with grim # Special key to take a screenshot with grim
bindsym Print exec grim bindsym Print exec grim
bindsym $mod+Print exec grim -g "$(slurp)" # bindsym $mod+Shift+s exec grim -g "$(slurp)"
bindsym $mod+Shift+s exec $ipc screenshot-region
# Noctalia, media control
bindsym --locked XF86PickupPhone exec $ipc media toggle
bindsym --locked XF86NotificationCenter exec $ipc media previous
bindsym --locked XF86HangupPhone exec $ipc media next
# Noctalia, theme
# bindsym $mod+p exec $ipc theme-mode-toggle
# Noctalia, idle
bindsym --locked XF86Favorites exec $ipc caffeine-toggle
#power
bindsym Mod4+Escape exec wlogout
bindsym Mod4+Shift+x exec swaylock
# #
# Status Bar disable because of use waybar instead if you not use waybar just uncomment those below: # power
# #
# Read `man 5 sway-bar` for more information about this section.
# bar {
# position top
# When the status_command prints a new line to stdout, swaybar updates. # bindsym $mod+Escape exec wlogout
# The default just shows the current date and time. # bindsym $mod+Shift+x exec swaylock
# status_command while date +'%Y-%m-%d %X'; do sleep 1; done bindsym $mod+Escape exec $ipc panel-toggle session
bindsym $mod+Shift+x exec $ipc session lock
# colors {
# statusline #ffffff
# background #323232
# inactive_workspace #32323200 #32323200 #5c5c5c
# }
#}
include /etc/sway/config.d/*

View file

@ -1,346 +1,14 @@
# Default config for sway # bords des fenêtres
# Copy this to ~/.config/sway/config and edit it to your liking. smart_borders on
# Read `man 5 sway` for a complete reference. default_border pixel 3
default_floating_border pixel 3
include /home/oh/.config/sway/basic_key_bindings gaps inner 0
include /home/oh/.config/sway/windows_rules gaps outer 0
include /home/oh/.config/sway/input_config
include /home/oh/.config/sway/colors
include /home/oh/.config/sway/workspaces_rules
include /home/oh/.config/sway/app_assignment
include /home/oh/.config/sway/layout
include /home/oh/.config/sway/utilities
### Variables # thème du curseur de souris
seat seat0 xcursor_theme Bibata-Modern-Ice
# faire disparaître le titlebar
# Logo key. Use Mod1 for Alt. font pango:monospace 0.001
set $mod Mod4 titlebar_border_thickness 1
# Home row direction keys, like vim
set $left k
set $down l
set $up o
set $right m
# screens
set $laptop eDP-1
set $external HDMI-A-1
## Preferred apps
set $term foot
set $menu wofi --show drun
set $file nautilus
set $browser flatpak run app.zen_browser.zen
include /etc/sway/config-vars.d/*
# autoload when start wm
exec waybar
exec /usr/libexec/polkit-mate-authentication-agent-1
exec wlsunset
exec wl-paste --watch cliphist store
### Output configuration
# using "swaybg" just put file path as below and end with 'fill'
output * background ~/.config/sway/wallpapers/frieren.png fill
#
output HDMI-A-1 resolution 1920x1080 position 1920,0
#
#exec swayidle -w \
# timeout 300 'swaylock -f -c 000000' \
# timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
# before-sleep 'swaylock -f -c 000000'
# This will lock your screen after 300 seconds of inactivity, then turn off
# your displays after another 300 seconds, and turn your screens back on when
# resumed. It will also lock your screen before your computer goes to sleep.
### Input configuration
input "2:14:ETPS/2_Elantech_Touchpad" {
dwt enabled
tap enabled
natural_scroll enabled
middle_emulation enabled
}
input type:keyboard {
xkb_options caps:escape
xkb_layout fr
repeat_delay 300
repeat_rate 50
}
input "6058:20564:ThinkPad_Extra_Buttons" {
}
# window gaps
smart_borders on
default_border pixel 2
default_floating_border pixel 3
gaps inner 1
gaps outer 1
# Window borders
# Colors: border background text indicator child_border
client.focused #9932cc #285577 #ffffff #2e9ef4 #2e9ef4
client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a
client.unfocused #333333 #222222 #888888 #292d2e #222222
client.urgent #2f343a #900000 #ffffff #900000 #900000
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
# Background color for inactive tabs in tabbed/stacked layout
client.background #000000
# faire disparaître le titlebar
font pango:monospace 0.001
titlebar_border_thickness 1
### Key bindings
#
# Basics:
#
# Start a terminal
bindsym $mod+Enter exec $term
# Kill focused window
bindsym $mod+q kill
# Start your launcher
bindsym $mod+space exec $menu
bindsym $mod+shift+d exec wofi --show run
# Start a file manager
bindsym $mod+e exec $file
# Start browser
bindsym $mod+a exec $browser
# Drag floating windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod.
# Despite the name, also works for non-floating windows.
# Change normal to inverse to use left mouse button for resizing and right
# mouse button for dragging.
floating_modifier $mod normal
# clipboard manager
bindsym $mod+w exec cliphist list | wofi | cliphist decode | wl-copy
# Reload the configuration file
bindsym $mod+Shift+r reload
# Exit sway (logs you out of your Wayland session)
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
#
# Moving around:
#
# Move your focus around
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
# Or use $mod+[up|down|left|right]
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# Move the focused window with the same, but add Shift
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
# Ditto, with arrow keys
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
#
# Workspaces:
#
# Switch to workspace
bindsym Mod4+ampersand workspace 1
bindsym Mod4+eacute workspace 2
bindsym Mod4+quotedbl workspace 3
bindsym Mod4+apostrophe workspace 4
bindsym Mod4+parenleft workspace 5
bindsym Mod4+minus workspace 6
bindsym Mod4+egrave workspace 7
bindsym Mod4+underscore workspace 8
bindsym Mod4+ccedilla workspace 9
bindsym Mod4+agrave workspace 10
# Move focused container to workspace
bindsym Mod4+Shift+ampersand workspace 01
bindsym Mod4+Shift+eacute workspace 02
bindsym Mod4+Shift+quotedbl workspace 03
bindsym Mod4+Shift+apostrophe workspace 04
bindsym Mod4+Shift+parenleft workspace 05
bindsym Mod4+Shift+minus workspace 06
bindsym Mod4+Shift+egrave workspace 07
bindsym Mod4+Shift+underscore workspace 08
bindsym Mod4+Shift+ccedilla workspace 09
bindsym Mod4+Shift+agrave workspace 010
bindsym Mod4+tab workspace next
bindsym Mod4+Shift+tab workspace prev
# external screen
# on laptop monitor
workspace 1 output $laptop
workspace 2 output $laptop
workspace 3 output $laptop
workspace 4 output $laptop
workspace 5 output $laptop
workspace 6 output $laptop
workspace 7 output $laptop
workspace 8 output $laptop
workspace 9 output $laptop
workspace 10 output $laptop
# on external monitor
workspace 01 output $external
workspace 02 output $external
workspace 03 output $external
workspace 04 output $external
workspace 05 output $external
workspace 06 output $external
workspace 07 output $external
workspace 08 output $external
workspace 09 output $external
workspace 010 output $external
# assignment
for_window [app_id=.*] focus
assign [app_id="foot"] 01
assign [app_id="foot"] 1
assign [app_id="zen"] 02
assign [app_id="zen"] 2
assign [app_id="anki"] 02
assign [app_id="anytype"] 3
assign [app_id="libreoffice"] 3
assign [app_id="signal"] 4
assign [app_id="thunderbird"] 04
assign [app_id="thunderbird"] 4
assign [app_id="mpv"] 05
assign [app_id="mpv"] 5
assign [app_id="vlc"] 05
assign [app_id="vlc"] 5
assign [app_id="steam"] 06
assign [app_id="steam"] 6
assign [app_id="kde-connect"] 7
#
# Layout stuff:
#
# You can "split" the current object of your focus with
# $mod+b or $mod+v, for horizontal and vertical splits
# respectively.
bindsym $mod+b splith
bindsym $mod+v splitv
# Switch the current container between different layout styles
# bindsym $mod+s layout stacking
# bindsym $mod+w layout tabbed
bindsym $mod+s layout toggle split
# Make the current focus fullscreen
bindsym $mod+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+u focus mode_toggle
# Move focus to the parent container
# bindsym $mod+a focus parent
#
# Scratchpad:
#
# Sway has a "scratchpad", which is a bag of holding for windows.
# You can send windows there and get them back later.
# Move the currently focused window to the scratchpad
# bindsym $mod+Shift+minus move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
# bindsym $mod+minus scratchpad show
#
# Resizing containers:
#
mode "resize" {
# left will shrink the containers width
# right will grow the containers width
# up will shrink the containers height
# down will grow the containers height
bindsym $left resize shrink width 10px
bindsym $down resize grow height 10px
bindsym $up resize shrink height 10px
bindsym $right resize grow width 10px
# Ditto, with arrow keys
bindsym Left resize shrink width 10px
bindsym Down resize grow height 10px
bindsym Up resize shrink height 10px
bindsym Right resize grow width 10px
# Return to default mode
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+alt+r mode "resize"
#
# Utilities:
#
# Special keys to adjust volume via PulseAudio
bindsym --locked XF86AudioMute exec amixer sset Master toggle
bindsym --locked XF86AudioLowerVolume exec amixer sset Master 5%-
bindsym --locked XF86AudioRaiseVolume exec amixer sset Master 5%+
bindsym --locked XF86AudioMicMute exec pactl set-source-mute \@DEFAULT_SOURCE@ toggle
# Special keys to adjust brightness via brightnessctl
bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%-
bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+
# Special key to take a screenshot with grim
bindsym Print exec grim
bindsym $mod+Print exec grim -g "$(slurp)"
#power
bindsym Mod4+Escape exec wlogout
bindsym Mod4+Shift+x exec swaylock
#
# Status Bar disable because of use waybar instead if you not use waybar just uncomment those below:
#
# Read `man 5 sway-bar` for more information about this section.
# bar {
# position top
# When the status_command prints a new line to stdout, swaybar updates.
# The default just shows the current date and time.
# status_command while date +'%Y-%m-%d %X'; do sleep 1; done
# colors {
# statusline #ffffff
# background #323232
# inactive_workspace #32323200 #32323200 #5c5c5c
# }
#}
include /etc/sway/config.d/*

View file

@ -1,202 +1,3 @@
# Default config for sway
# Copy this to ~/.config/sway/config and edit it to your liking.
# Read `man 5 sway` for a complete reference.
include /home/oh/.config/sway/basic_key_bindings
include /home/oh/.config/sway/windows_rules
include /home/oh/.config/sway/input_config
include /home/oh/.config/sway/colors
include /home/oh/.config/sway/workspaces_rules
include /home/oh/.config/sway/app_assignment
include /home/oh/.config/sway/layout
include /home/oh/.config/sway/utilities
### Variables
# Logo key. Use Mod1 for Alt.
set $mod Mod4
# Home row direction keys, like vim
set $left k
set $down l
set $up o
set $right m
# screens
set $laptop eDP-1
set $external HDMI-A-1
## Preferred apps
set $term foot
set $menu wofi --show drun
set $file nautilus
set $browser flatpak run app.zen_browser.zen
include /etc/sway/config-vars.d/*
# autoload when start wm
exec waybar
exec /usr/libexec/polkit-mate-authentication-agent-1
exec wlsunset
exec wl-paste --watch cliphist store
### Output configuration
# using "swaybg" just put file path as below and end with 'fill'
output * background ~/.config/sway/wallpapers/frieren.png fill
#
output HDMI-A-1 resolution 1920x1080 position 1920,0
#
#exec swayidle -w \
# timeout 300 'swaylock -f -c 000000' \
# timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
# before-sleep 'swaylock -f -c 000000'
# This will lock your screen after 300 seconds of inactivity, then turn off
# your displays after another 300 seconds, and turn your screens back on when
# resumed. It will also lock your screen before your computer goes to sleep.
### Input configuration
input "2:14:ETPS/2_Elantech_Touchpad" {
dwt enabled
tap enabled
natural_scroll enabled
middle_emulation enabled
}
input type:keyboard {
xkb_options caps:escape
xkb_layout fr
repeat_delay 300
repeat_rate 50
}
input "6058:20564:ThinkPad_Extra_Buttons" {
}
# window gaps
smart_borders on
default_border pixel 2
default_floating_border pixel 3
gaps inner 1
gaps outer 1
# Window borders
# Colors: border background text indicator child_border
client.focused #9932cc #285577 #ffffff #2e9ef4 #2e9ef4
client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a
client.unfocused #333333 #222222 #888888 #292d2e #222222
client.urgent #2f343a #900000 #ffffff #900000 #900000
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
# Background color for inactive tabs in tabbed/stacked layout
client.background #000000
# faire disparaître le titlebar
font pango:monospace 0.001
titlebar_border_thickness 1
### Key bindings
#
# Basics:
#
# Start a terminal
bindsym $mod+Enter exec $term
# Kill focused window
bindsym $mod+q kill
# Start your launcher
bindsym $mod+space exec $menu
bindsym $mod+shift+d exec wofi --show run
# Start a file manager
bindsym $mod+e exec $file
# Start browser
bindsym $mod+a exec $browser
# Drag floating windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod.
# Despite the name, also works for non-floating windows.
# Change normal to inverse to use left mouse button for resizing and right
# mouse button for dragging.
floating_modifier $mod normal
# clipboard manager
bindsym $mod+w exec cliphist list | wofi | cliphist decode | wl-copy
# Reload the configuration file
bindsym $mod+Shift+r reload
# Exit sway (logs you out of your Wayland session)
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
#
# Moving around:
#
# Move your focus around
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
# Or use $mod+[up|down|left|right]
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# Move the focused window with the same, but add Shift
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
# Ditto, with arrow keys
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
#
# Workspaces:
#
# Switch to workspace
bindsym Mod4+ampersand workspace 1
bindsym Mod4+eacute workspace 2
bindsym Mod4+quotedbl workspace 3
bindsym Mod4+apostrophe workspace 4
bindsym Mod4+parenleft workspace 5
bindsym Mod4+minus workspace 6
bindsym Mod4+egrave workspace 7
bindsym Mod4+underscore workspace 8
bindsym Mod4+ccedilla workspace 9
bindsym Mod4+agrave workspace 10
# Move focused container to workspace
bindsym Mod4+Shift+ampersand workspace 01
bindsym Mod4+Shift+eacute workspace 02
bindsym Mod4+Shift+quotedbl workspace 03
bindsym Mod4+Shift+apostrophe workspace 04
bindsym Mod4+Shift+parenleft workspace 05
bindsym Mod4+Shift+minus workspace 06
bindsym Mod4+Shift+egrave workspace 07
bindsym Mod4+Shift+underscore workspace 08
bindsym Mod4+Shift+ccedilla workspace 09
bindsym Mod4+Shift+agrave workspace 010
bindsym Mod4+tab workspace next
bindsym Mod4+Shift+tab workspace prev
# external screen
# on laptop monitor # on laptop monitor
workspace 1 output $laptop workspace 1 output $laptop
@ -221,126 +22,3 @@ titlebar_border_thickness 1
workspace 08 output $external workspace 08 output $external
workspace 09 output $external workspace 09 output $external
workspace 010 output $external workspace 010 output $external
# assignment
for_window [app_id=.*] focus
assign [app_id="foot"] 01
assign [app_id="foot"] 1
assign [app_id="zen"] 02
assign [app_id="zen"] 2
assign [app_id="anki"] 02
assign [app_id="anytype"] 3
assign [app_id="libreoffice"] 3
assign [app_id="signal"] 4
assign [app_id="thunderbird"] 04
assign [app_id="thunderbird"] 4
assign [app_id="mpv"] 05
assign [app_id="mpv"] 5
assign [app_id="vlc"] 05
assign [app_id="vlc"] 5
assign [app_id="steam"] 06
assign [app_id="steam"] 6
assign [app_id="kde-connect"] 7
#
# Layout stuff:
#
# You can "split" the current object of your focus with
# $mod+b or $mod+v, for horizontal and vertical splits
# respectively.
bindsym $mod+b splith
bindsym $mod+v splitv
# Switch the current container between different layout styles
# bindsym $mod+s layout stacking
# bindsym $mod+w layout tabbed
bindsym $mod+s layout toggle split
# Make the current focus fullscreen
bindsym $mod+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+u focus mode_toggle
# Move focus to the parent container
# bindsym $mod+a focus parent
#
# Scratchpad:
#
# Sway has a "scratchpad", which is a bag of holding for windows.
# You can send windows there and get them back later.
# Move the currently focused window to the scratchpad
# bindsym $mod+Shift+minus move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
# bindsym $mod+minus scratchpad show
#
# Resizing containers:
#
mode "resize" {
# left will shrink the containers width
# right will grow the containers width
# up will shrink the containers height
# down will grow the containers height
bindsym $left resize shrink width 10px
bindsym $down resize grow height 10px
bindsym $up resize shrink height 10px
bindsym $right resize grow width 10px
# Ditto, with arrow keys
bindsym Left resize shrink width 10px
bindsym Down resize grow height 10px
bindsym Up resize shrink height 10px
bindsym Right resize grow width 10px
# Return to default mode
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+alt+r mode "resize"
#
# Utilities:
#
# Special keys to adjust volume via PulseAudio
bindsym --locked XF86AudioMute exec amixer sset Master toggle
bindsym --locked XF86AudioLowerVolume exec amixer sset Master 5%-
bindsym --locked XF86AudioRaiseVolume exec amixer sset Master 5%+
bindsym --locked XF86AudioMicMute exec pactl set-source-mute \@DEFAULT_SOURCE@ toggle
# Special keys to adjust brightness via brightnessctl
bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%-
bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+
# Special key to take a screenshot with grim
bindsym Print exec grim
bindsym $mod+Print exec grim -g "$(slurp)"
#power
bindsym Mod4+Escape exec wlogout
bindsym Mod4+Shift+x exec swaylock
#
# Status Bar disable because of use waybar instead if you not use waybar just uncomment those below:
#
# Read `man 5 sway-bar` for more information about this section.
# bar {
# position top
# When the status_command prints a new line to stdout, swaybar updates.
# The default just shows the current date and time.
# status_command while date +'%Y-%m-%d %X'; do sleep 1; done
# colors {
# statusline #ffffff
# background #323232
# inactive_workspace #32323200 #32323200 #5c5c5c
# }
#}
include /etc/sway/config.d/*