# Default config for sway
#
# Copy this to ~/.config/sway/config and edit it to your liking.
#
# Read `man 5 sway` for a complete reference.

### Variables
#
# Logo key. Use Mod1 for Alt.
set $mod Mod4

# Your preferred terminal emulator
set $term /usr/bin/footclient

# Your preferred application launcher
# Note: pass the final command to swaymsg so that the resulting window can be opened
# on the original workspace that the command was run on.
# set $menu dmenu_path | dmenu | xargs swaymsg exec --

set $menu wofi --gtk-dark --show=drun

include "$HOME/.config/sway/config.d/*"

default_border pixel 5
smart_borders on

gaps inner 8
smart_gaps on

focus_follows_mouse no

### Output configuration
#
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
output * bg #283646 solid_color 
output eDP-1 bg "$HOME/nextcloud/perso/images/wallapper_desktop.png" fill
#
# Example configuration:
#
#   output HDMI-A-1 resolution 1920x1080 position 1920,0
#
# You can get the names of your outputs by running: swaymsg -t get_outputs


### Idle configuration
#
# Example configuration:
#
# exec swayidle -w \
#          timeout 300 'swaylock -f -c 000000' \
#          timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms 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.


### Key bindings
#
# Basics:
#
    # Start a terminal
    bindsym $mod+Return exec $term

    # Kill focused window
    bindsym $mod+Shift+q kill

    # Start your launcher
    bindsym $mod+d exec $menu

    # 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

    # Reload the configuration file
    bindsym $mod+Shift+c 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'

    bindsym $mod+l exec swaylock --color "#243646"

### Laptop screen is close
    bindswitch --locked lid:on output eDP-1 disable
### Laptop screen is open
    bindswitch --locked lid:off output eDP-1 enable

exec kanshi

bar {
   swaybar_command waybar
}

exec foot --server
exec blueman-applet
exec nm-applet --indicator
exec nextcloud --background
exec keepassxc
exec /usr/lib/xdg-desktop-portal-gnome
