# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout somewhen, delete
# this file and re-run i3-config-wizard(1).
#

# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
#Mod4 = Super key
#Mod1 = Alt key
set $mod Mod4
set $mod1 Mod1

# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below. ISO 10646 = Unicode
#font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
# The font above is very space-efficient, that is, it looks good, sharp and
# clear in small sizes. However, if you need a lot of unicode glyphs or
# right-to-left text rendering, you should instead use pango for rendering and
# chose a FreeType font, such as:
font pango:DejaVu Sans Mono 10
font xft:Terminus, FontAwesome 8   
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod

# start a terminal
#bindsym $mod+Return exec i3-sensible-terminal
bindsym $mod+Return exec urxvt
bindsym $mod+$mod1+Return exec xterm
# kill focused window
# bindsym $mod+Shift+q kill
bindsym $mod+c kill

# start dmenu (a program launcher)
# bindsym $mod+d exec dmenu_run
# There also is the (new) i3-dmenu-desktop which only displays applications
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
# installed.
# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
bindsym $mod+ctrl+space exec --no-startup-id i3-dmenu-desktop

# j4-dmenu-desktop -- A faster replacement for i3-dmenu-desktop
# https://github.com/enkore/j4-dmenu-desktop
# https://aur.archlinux.org/packages/j4-dmenu-desktop-git/
# bindsym $mod+space exec --no-startup-id j4-dmenu-desktop
bindsym $mod+space exec --no-startup-id j4-dmenu-desktop --dmenu="dmenu -i -fn 'DejaVu Sans-10' -l 20"

# change focus
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right

# change focus (alternative)
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right

# move focused window
bindsym $mod+mod1+h move left
bindsym $mod+mod1+j move down
bindsym $mod+mod1+k move up
bindsym $mod+mod1+l move right

# move focused window (alternative)
bindsym $mod+mod1+Left move left
bindsym $mod+mod1+Down move down
bindsym $mod+mod1+Up move up
bindsym $mod+mod1+Right move right

# split in horizontal/vertical orientation (h = vertical; v = horizontal)
bindsym $mod+v split h
bindsym $mod+b split v

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

# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split

# toggle tiling / floating
# bindsym $mod+Shift+space floating toggle
bindsym $mod+mod1+space floating toggle

# focus the parent container
# bindsym $mod+a focus parent
bindsym $mod+i focus parent

# focus the child container
#bindsym $mod+d focus child
bindsym $mod+u focus child

# switch to workspace
# https://github.com/redhat69/dotfiles/blob/master/.i3/config
bindsym $mod+1 workspace 1 
bindsym $mod+2 workspace 2 
bindsym $mod+3 workspace 3 
bindsym $mod+4 workspace 4 
bindsym $mod+5 workspace 5 
bindsym $mod+6 workspace 6 
bindsym $mod+7 workspace 7 
bindsym $mod+8 workspace 8 
bindsym $mod+9 workspace 9 
bindsym $mod+0 workspace 10 

# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace 1 
bindsym $mod+Shift+2 move container to workspace 2 
bindsym $mod+Shift+3 move container to workspace 3 
bindsym $mod+Shift+4 move container to workspace 4 
bindsym $mod+Shift+5 move container to workspace 5 
bindsym $mod+Shift+6 move container to workspace 6 
bindsym $mod+Shift+7 move container to workspace 7 
bindsym $mod+Shift+8 move container to workspace 8 
bindsym $mod+Shift+9 move container to workspace 9 
bindsym $mod+Shift+0 move container to workspace 10 

# move focused container to workspace (alternative)
bindsym $mod+mod1+1 move container to workspace 1
bindsym $mod+mod1+2 move container to workspace 2
bindsym $mod+mod1+3 move container to workspace 3
bindsym $mod+mod1+4 move container to workspace 4
bindsym $mod+mod1+5 move container to workspace 5
bindsym $mod+mod1+6 move container to workspace 6
bindsym $mod+mod1+7 move container to workspace 7
bindsym $mod+mod1+8 move container to workspace 8
bindsym $mod+mod1+9 move container to workspace 9
bindsym $mod+mod1+0 move container to workspace 10


# reload the configuration file
bindsym $mod+Shift+c reload
bindsym $mod+mod1+c reload

# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
bindsym $mod+mod1+r restart

# exit i3 (logs you out of your X session)
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
bindsym $mod+mod1+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"

# resize window (you can also use the mouse for that)
# http://i3wm.org/docs/userguide.html#resizingconfig
mode "resize" {
        # These bindings trigger as soon as you enter the resize mode

        # Pressing left will shrink the window’s width.
        # Pressing right will grow the window’s width.
        # Pressing up will shrink the window’s height.
        # Pressing down will grow the window’s height.

        bindsym h resize shrink width 2 px or 2 ppt
        bindsym j resize grow height 2 px or 2 ppt
        bindsym k resize shrink height 2 px or 2 ppt
        bindsym l resize grow width 2 px or 2 ppt

        # same bindings, but for the arrow keys
        bindsym Left resize shrink width 2 px or 2 ppt
        bindsym Down resize grow height 2 px or 2 ppt
        bindsym Up resize shrink height 2 px or 2 ppt
        bindsym Right resize grow width 2 px or 2 ppt

        # back to normal: Enter or Escape
        bindsym Return mode "default"
        bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"

# Start i3bar to display a workspace bar (plus the system information i3status
 
 
# finds out, if available)


# Laptop Monitor
bar {
    output eDP1
    status_command i3blocks  -c ~/.i3blocks.conf   
    position top
    font pango: Source Code Pro for Powerline 10 
    separator_symbol ""

  colors {
        background #3D1302
		statusline #dddddd
		separator #F7F707

 # class 		  border    backgrd    text
        focused_workspace  #D8754E #D8754E #A80906
		active_workspace   #CEB029 #CEB029 #A80906
		inactive_workspace #4F0349 #4F0349 #2EBDD3
		urgent_workspace   #2f343a #900000 #ffffff
    }
}


#Samsung monitor
bar {
    output HDMI1
    status_command $HOME/.conkyi3
    font pango: Source Code Pro for Powerline 10 
    separator_symbol " "

  colors {
        background #3F3402
		statusline #11FC58
		separator #F40E0E

 # class 		  border    backgrd    text
        focused_workspace  #11FC58 #11FC58 #3A1D03
		active_workspace   #369333 #369333 #EFA98F
		inactive_workspace #88D326 #89AF56 #ffffff
		urgent_workspace   #2f343a #900000 #ffffff
    }
}

# My stuff =================================================================



# automatically open in floating mode
# use 'xprop' to get window class information (first letter is capitalized)
# for_window [class="(?i)dolphin"] floating enable
for_window [class="Guake!"] floating enable
for_window [class="Terra"] floating enable
for_window [class="Screenkey"] floating enable
for_window [class="Xfce4-notifyd"] floating enable
for_window [class="Gnome-terminal"] floating enable
# for_window [class="Terminator"] floating enable
# for_window [class="XTerm"] floating enable
# for_window [class="UXTerm"] floating enable
# for_window [class="URxvt"] floating enable
# for_window [class="Keepassx"] floating enable

# automatically open to a specific workspace
# assign [class="Mcomix"] 8
# assign [class="Calibre"] 8

#Backlight Control..
#Brightness Down..
bindsym XF86MonBrightnessDown exec xbacklight -dec 10

#Brightness Up...
bindsym XF86MonBrightnessUp exec xbacklight -inc 10


# swap a workspace to the other monitor
# http://i3wm.org/docs/userguide.html#_moving_containers_workspaces_to_randr_outputs
bindsym $mod+x move workspace to output right

# switching between workspace
# http://i3wm.org/docs/userguide.html#_changing_named_workspaces_moving_to_workspaces
bindsym $mod+d workspace back_and_forth 
bindsym $mod+n workspace next 
bindsym $mod+p workspace prev 
bindsym $mod+mod1+n move container to workspace next
bindsym $mod+mod1+p move container to workspace prev

# autostart
# http://i3wm.org/docs/userguide.html#_automatically_starting_applications_on_i3_startup
# exec xcompmgr
# exec ~/.screenlayout/dual_benq720p_proscantv1080p.sh
# exec xmodmap ~/.Xmodmap
# exec guake
# exec btsync --config ~/.config/btsync/btsync.conf
# exec synergyc --daemon --name DesktopPC 192.168.1.100
# exec ~/.scripts/feh-wallpaper-changer.sh
#
# Assign workspaces to windows screens
#
workspace 1 output HDMI1

workspace 2 output eDP1

exec urxvt         # Yeah my default terminal
exec parcellite         # Amm.. wait, yeah clipboard manager..
#exec blueman-manager    # Bluetooth stuff..
exec pasystray			# pulseaudio systemtray (https://aur.archlinux.org/packages/pasystray/)
exec nitrogen --restore # restores wallpaper..

# correct HDMI to TV resolution
exec xrandr --output HDMI1 --set underscan on

exec --no-startup-id sh ~/.i3/wallpaper.sh 
exec --no-startup-id compton -b --conf ~/.i3/compton

exec --no-startup-id conky -c ~/.conkyrc  


set $mode_system State (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown
mode "$mode_system" {
    bindsym l exec --no-startup-id /home/$USER/.i3/i3exit lock, mode "default"
    bindsym e exec --no-startup-id /home/$USER/.i3/i3exit logout, mode "default"
    bindsym s exec --no-startup-id /home/$USER/.i3/i3exit suspend, mode "default"
    bindsym h exec --no-startup-id /home/$USER/.i3/i3exit hibernate, mode "default"
    bindsym r exec --no-startup-id /home/$USER/.i3/i3exit reboot, mode "default"
    bindsym Shift+s exec --no-startup-id /home/$USER/.i3/i3exit shutdown, mode "default"  
    # back to normal: Enter or Escape
    bindsym Return mode "default"
    bindsym Escape mode "default"
}
bindsym $mod+Delete mode "$mode_system"

# credit @SardemFF7 from #i3 irc
# exec i3-msg 'workspace 9: web; exec chromium; workspace back_and_forth'

# Changing Colors
# http://i3wm.org/docs/userguide.html#_changing_colors
# idicator:	color of where it is going to split the windows

# Default color scheme
# client.focused          	#4c7899 #285577 #ffffff #2e9ef4
# client.focused_inactive 	#333333 #5f676a #ffffff #484e50
# client.unfocused        	#333333 #222222 #888888 #292d2e
# client.urgent           	#2f343a #900000 #ffffff #900000

# my color theme
client.focused              #77994B #547628 #EEEEEE
client.focused_inactive     #333333 #5F676A #EEEEEE
client.unfocused        	#333333 #222222 #888888 #292d2e
client.urgent           	#2f343a #900000 #ffffff #900000

# Green:
#client.focused               #809070 #606F50 #EEEEEE
#client.focused_inactive #333333 #5F676A #EEEEEE

# Blue:
#client.focused               #708090 #506070 #EEEEEE
#client.focused_inactive #333333 #5F676A #EEEEEE
#
# Purple:
# client.focused               #707090 #50506F #EEEEEE
# client.focused_inactive #333333 #5F676A #EEEEEE
#
# A green variant on i3's default color scheme:
# client.focused              #77994B #547628 #EEEEEE
# client.focused_inactive #333333 #5F676A #EEEEEE


# Color Chart
# http://www.w3schools.com/html/html_colors.asp
# color picker: http://www.w3schools.com/tags/ref_colorpicker.asp
#Color		Color HEX
#black 		#000000
#red 		#FF0000
#green 		#00FF00
#blue 		#0000FF
#yellow 	#FFFF00
#teal 		#00FFFF
#pink 		#FF00FF
#grey 		#C0C0C0
#white 		#FFFFFF

# Todo list
# i3bar status
# timeout suspend system
# Assign apps to workspace https://github.com/jmazzi/dotfiles/blob/master/.i3/config
# better resize
#
#
# networking applet..
#
exec --no-startup-id nm-applet
