# Super key
set $mod Mod4

# No window tittles
new_window pixel 1
new_float normal
hide_edge_borders none

# Fonts
font xft:Source Code Pro Semibold-11

# Key to move windows
floating_modifier $mod

# Open terminal
bindsym $mod+Return exec --no-startup-id alacritty

# Open browser
bindsym $mod+w exec --no-startup-id thorium-browser

# Close windows
bindsym $mod+Shift+q kill

# Open dmenu
bindsym $mod+d exec --no-startup-id dmenu_run -fn 'Source Code Pro Semibold-11' -nb '#282828' -nf '#FFFFFF' -sb '#808080' -sf '#282828'

# Lock screen
bindsym $mod+l exec --no-startup-id betterlockscreen -l --time-format %I:%M:%S

# Change focus
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right

# Move windows
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right

# Vertical / Horizontal
bindsym $mod+h split h;exec --no-startup-id notify-send 'Modo horizontal'
bindsym $mod+v split v;exec --no-startup-id notify-send 'Modo vertical'

# Fullscreen
bindsym $mod+f fullscreen toggle

# toggle tilling
bindsym $mod+space floating toggle

# Virtual desktops
set $ws1 1
set $ws2 2
set $ws3 3
set $ws4 4
set $ws5 5
set $ws6 6
set $ws7 7
set $ws8 8
bindsym $mod+1 workspace $ws1
bindsym $mod+2 workspace $ws2
bindsym $mod+3 workspace $ws3
bindsym $mod+4 workspace $ws4
bindsym $mod+5 workspace $ws5
bindsym $mod+6 workspace $ws6
bindsym $mod+7 workspace $ws7
bindsym $mod+8 workspace $ws8

# Send window to another desktop
bindsym $mod+Shift+1 move container to workspace $ws1
bindsym $mod+Shift+2 move container to workspace $ws2
bindsym $mod+Shift+3 move container to workspace $ws3
bindsym $mod+Shift+4 move container to workspace $ws4
bindsym $mod+Shift+5 move container to workspace $ws5
bindsym $mod+Shift+6 move container to workspace $ws6
bindsym $mod+Shift+7 move container to workspace $ws7
bindsym $mod+Shift+8 move container to workspace $ws8

# Some windows that open in float mode
for_window [title="File Transfer*"] floating enable
for_window [class="Nitrogen"] floating enable sticky enable border normal
for_window [class="Pavucontrol"] floating enable

# Restart i3
bindsym $mod+Shift+r restart

# Polybar
exec_always --no-startup-id $HOME/.config/polybar/bar.sh

# Colors
client.focused          #282828 #282828 #838383 #888888 #888888
client.focused_inactive #282828 #282828 #838383 #282828 #282828
client.unfocused        #282828 #282828 #838383 #282828 #282828
client.urgent           #282828 #282828 #838383 #282828 #282828
client.placeholder      #282828 #282828 #838383 #282828 #282828
client.background       #282828

# Gaps
gaps inner 10
gaps outer -4
smart_gaps off

# Put the first desktop as the primary display
workspace 1 output eDP-1-1
workspace 2 output HDMI-0

# Displays and wallpaper
exec --no-startup-id autorandr -c
exec --no-startup-id hsetroot -full ~/Pictures/wallpapers/Space.png

# Turn off mouse accel
exec_always --no-startup-id for id in $(xinput list | grep "pointer" | cut -d '=' -f 2 | cut -f 1); do xinput --set-prop $id 'libinput Accel Profile Enabled' 0, 1; done

# Start the polkit
exec --no-startup-id lxpolkit

# Screenshot
exec --no-startup-id flameshot
bindsym $mod+s exec --no-startup-id flameshot gui
