# set modifier
set $super Mod1
set $alt Mod4

# set font
font pango:Ionicons 12, Poppins Regular 12

# use mouse+$super to drag floating windows to their wanted position
floating_modifier $super


# autostart
exec --no-startup-id eval $(gnome-keyring-daemon -s)
exec --no-startup-id hsetroot -fill ~/.config/i3/wallpaper.png
exec --no-startup-id ~/.config/i3/display.sh
exec --no-startup-id redshift-gtk &
exec --no-startup-id nm-applet &
exec --no-startup-id signal-desktop --password-store=gnome-libsecret &

# start a terminal
bindsym $super+Return exec i3-sensible-terminal

# start dmenu (a program launcher)
bindsym $super+d exec i3-dmenu-desktop --dmenu="dmenu -i -b \
-fn 'Poppins:size=9' -nb '#141c21' -nf '#93a1a1' \
-sb '#289c93' -sf '#141c21'"

# common apps keybinds
bindsym Print exec scrot 'screen_%a-%d%b%y_%H.%M.png' -e 'xdg-open ~/$f'
bindsym $super+l exec i3lock -i ~/.config/i3/lock.png
bindsym $super+w exec x-www-browser
bindsym $super+e exec thunar
bindsym $super+t exec geany

# change volume and brightness
# Pulse Audio controls
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5% #increase sound volume
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5% #decrease sound volume
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle # mute sound

# change volume and brightness
bindsym XF86MonBrightnessUp exec brightnessctl set 5%+
bindsym XF86MonBrightnessDown exec brightnessctl set 5%-


# Media player controls
bindsym XF86AudioPlay exec playerctl play-pause
bindsym XF86AudioPause exec playerctl pause
bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPrev exec playerctl previous

# kill focused window
bindsym $super+c kill
bindsym $alt+F4 kill

# change focus
bindsym $super+Left focus left
bindsym $super+Down focus down
bindsym $super+Up focus up
bindsym $super+Right focus right

# move focused window
bindsym $super+Shift+Left move left
bindsym $super+Shift+Down move down
bindsym $super+Shift+Up move up
bindsym $super+Shift+Right move right

# split in horizontal or vertical orientation
bindsym $super+h split h
bindsym $super+v split v

# change split direction for already opened windows
bindsym $super+s layout toggle split

# enter fullscreen mode for the focused container
bindsym $super+f fullscreen toggle

# toggle tiling / floating
bindsym $super+space floating toggle

# change focus between tiling / floating windows
bindsym $super+Shift+space focus mode_toggle

# switch to workspace
bindsym $super+Control+Right workspace next
bindsym $super+Control+Left workspace prev
bindsym $super+1 workspace 1:I
bindsym $super+2 workspace 2:II
bindsym $super+3 workspace 3:III
bindsym $super+4 workspace 4:IV
bindsym $super+5 workspace 5:V
bindsym $super+6 workspace 6:VI

# move focused container to workspace
bindsym $super+Shift+1 move container to workspace 1:I
bindsym $super+Shift+2 move container to workspace 2:II
bindsym $super+Shift+3 move container to workspace 3:III
bindsym $super+Shift+4 move container to workspace 4:IV
bindsym $super+Shift+5 move container to workspace 5:V
bindsym $super+Shift+6 move container to workspace 6:VI

# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $super+BackSpace exec "i3-msg restart"

# exit i3
bindsym $super+q exec "i3-nagbar -t warning -m 'Really, exit?' \
-b 'Yes' 'i3-msg exit'"

# resize window (you can also use the mouse for that)
mode "resize" {
	bindsym Left resize shrink width 5 px or 5 ppt
	bindsym Down resize grow height 5 px or 5 ppt
	bindsym Up resize shrink height 5 px or 5 ppt
	bindsym Right resize grow width 5 px or 5 ppt
	bindsym Return mode "default"
	}
bindsym $super+r mode "resize"

# panel
bar {
	status_command i3status
	position top
	workspace_min_width 24
	padding 2px 8px 2px 8px
	strip_workspace_numbers yes

	colors {
	background #141c21
	statusline #141c21
	separator #141c21

	# colour of border, background, and text
	focused_workspace #141c21 #d12f2c #93a1a1
	active_workspace #141c21 #141c21 #93a1a1
	inactive_workspace #141c21 #141c21 #93a1a1
	urgent_workspace #141c21 #b08500 #93a1a1
	}
}

# colour of border, background, text, indicator, and child_border
client.focused #d12f2c #263640 #93a1a1 #696ebf #2587cc1
client.focused_inactive #263640 #b08500 #93a1a1 #263640 #263640
client.unfocused #263640 #b08500 #93a1a1 #263640 #263640
client.urgent #263640 #b08500 #93a1a1 #263640 #263640
client.placeholder #263640 #b08500 #93a1a1 #263640 #263640
client.background #263640

# window rules, you can find the window class using xprop
for_window [class=Eog|Sxiv|feh|mpv|Vlc|File-roller|Xarchiver] floating enable
for_window [class=Eog|Sxiv|feh|mpv|Vlc|File-roller|Xarchiver] focus
for_window [class=".*"] border pixel 8
hide_edge_borders smart
gaps inner 12
smart_gaps on
