# 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 some time, 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!

set $mod Mod4

# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
#font pango:monospace 8
font pango:Hack 15
#font pango:Hermit 8

# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 8

# Before i3 v4.8, we used to recommend this one as the default:
# 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, its unicode glyph coverage is limited, the old
# X core fonts rendering does not support right-to-left and this being a bitmap
# font, it doesn’t scale on retina/hidpi displays.

# 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+Shift+Return exec termite
# bindsym $mod+Return exec termite
bindsym $mod+Return exec gnome-terminal
bindsym $mod+Shift+Return exec sakura
# bindsym $mod+Return exec terminator
# bindsym $mod+Shift+Return exec --no-startup-id gnome-terminal

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

# start dmenu (a program launcher)
#bindsym $mod+d exec dmenu_run
#bindsym $mod+t exec i3-dmenu-desktop --dmenu='rofi -dmenu'
bindsym $mod+d exec i3-dmenu-desktop --dmenu='rofi -dmenu -i -font "hermit 30"'

# 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

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

# alternatively, you can use the cursor keys:
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+Shift+j move left
bindsym $mod+Shift+k move down
bindsym $mod+Shift+l move up
bindsym $mod+Shift+ntilde move right

# alternatively, you can use the cursor 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

# split in horizontal orientation
bindsym $mod+h split h

# split in vertical orientation
bindsym $mod+v split v

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

# 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

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

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

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

set $wsp1 1:
#set $wsp1 1:navegador
set $wsp2 2:
set $wsp3 3:
set $wsp4 4:
set $wsp5 5:
set $wsp6 6:
set $wsp7 7:
set $wsp8 8:
set $wsp9 9:
set $wsp10 10:

# set $wsp1 1:
# #set $wsp1 1:navegador
# set $wsp2 2:
# set $wsp3 3
# set $wsp4 4
# set $wsp5 5
# set $wsp6 6
# set $wsp7 7
# set $wsp8 8:
# set $wsp9 9:
# set $wsp10 10:

set $wspmusic 
# set $musickey `
# set $musickey F1
set $musickey masculine

# switch to workspace
bindsym $mod+1 workspace $wsp1
bindsym $mod+2 workspace $wsp2
bindsym $mod+3 workspace $wsp3
bindsym $mod+4 workspace $wsp4
bindsym $mod+5 workspace $wsp5
bindsym $mod+6 workspace $wsp6
bindsym $mod+7 workspace $wsp7
bindsym $mod+8 workspace $wsp8
bindsym $mod+9 workspace $wsp9
bindsym $mod+0 workspace $wsp10
bindsym $mod+$musickey workspace $wspmusic

# bindsym $mod+1 exec ~/.config/i3/workspace_util focus 1
# bindsym $mod+2 exec ~/.config/i3/workspace_util focus 2
# bindsym $mod+3 exec ~/.config/i3/workspace_util focus 3
# bindsym $mod+4 exec ~/.config/i3/workspace_util focus 4
# bindsym $mod+5 exec ~/.config/i3/workspace_util focus 5
# bindsym $mod+6 exec ~/.config/i3/workspace_util focus 6
# bindsym $mod+7 exec ~/.config/i3/workspace_util focus 7
# bindsym $mod+8 exec ~/.config/i3/workspace_util focus 8
# bindsym $mod+9 exec ~/.config/i3/workspace_util focus 9
# bindsym $mod+0 exec ~/.config/i3/workspace_util focus 10

# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace $wsp1
bindsym $mod+Shift+2 move container to workspace $wsp2
bindsym $mod+Shift+3 move container to workspace $wsp3
bindsym $mod+Shift+4 move container to workspace $wsp4
bindsym $mod+Shift+5 move container to workspace $wsp5
bindsym $mod+Shift+6 move container to workspace $wsp6
bindsym $mod+Shift+7 move container to workspace $wsp7
bindsym $mod+Shift+8 move container to workspace $wsp8
bindsym $mod+Shift+9 move container to workspace $wsp9
bindsym $mod+Shift+0 move container to workspace $wsp10
bindsym $mod+Shift+$musickey move container to workspace $wspmusic

# bindsym $mod+Shift+1 exec ~/.config/i3/workspace_util move 1
# bindsym $mod+Shift+2 exec ~/.config/i3/workspace_util move 2
# bindsym $mod+Shift+3 exec ~/.config/i3/workspace_util move 3
# bindsym $mod+Shift+4 exec ~/.config/i3/workspace_util move 4
# bindsym $mod+Shift+5 exec ~/.config/i3/workspace_util move 5
# bindsym $mod+Shift+6 exec ~/.config/i3/workspace_util move 6
# bindsym $mod+Shift+7 exec ~/.config/i3/workspace_util move 7
# bindsym $mod+Shift+8 exec ~/.config/i3/workspace_util move 8
# bindsym $mod+Shift+9 exec ~/.config/i3/workspace_util move 9
# bindsym $mod+Shift+0 exec ~/.config/i3/workspace_util move 10

# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+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'"

# resize window (you can also use the mouse for that)
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 j resize shrink width 10 px or 10 ppt
        bindsym k resize grow height 10 px or 10 ppt
        bindsym l resize shrink height 10 px or 10 ppt
        bindsym ntilde resize grow width 10 px or 10 ppt

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

        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

        # back to normal: Enter or Escape
        bindsym Return mode "default"
        bindsym Escape mode "default"
}

bindsym $mod+r mode "resize"

# 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

#exec /usr/libexec/gnome-settings-daemon

exec --no-startup-id /usr/lib/gnome-settings-daemon/gnome-settings-daemon
exec --no-startup-id /usr/lib/gnome-settings-daemon/gsd-xsettings

# exec --no-startup-id nm-applet
exec pa-applet --disable-notifications
exec dunst

# Sreen brightness controls
bindsym XF86MonBrightnessUp exec xbacklight -inc 20 # increase screen brightness
bindsym XF86MonBrightnessDown exec xbacklight -dec 20 # decrease screen brightness

# Touchpad controls
bindsym XF86TouchpadToggle exec /some/path/toggletouchpad.sh # toggle touchpad

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

#bindsym $mod+m move workspace to output left
bindsym $mod+m move workspace to output down

#..........
# Look
#..........

new_window pixel 2
#new_float pixel 2

# Hybrid colors
set $back               #1d1F21
set $black              #282A2E
set $grey               #373B41
set $lightgrey          #707880
set $white              #C5C8C6
set $yellow             #F0C674
set $red                #CC6666
set $darkred            #A54242
set $green              #B5BD56

#class                  border      backgr.     text        split
client.background       $back

# exec compton
# exec --no-startup-id compton -cCGb --backend glx --vsync opengl
# exec --no-startup-id compton -b --backend glx --vsync opengl # No shadow
exec --no-startup-id compton -b --config ~/.config/i3/compton

# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
# bar {
#   i3bar_command i3bar -t
#   status_command i3status -c ~/.config/i3/i3status.conf
#         #tray_output primary
#         tray_output eDP1
#   colors {
#     separator #969896
#     background #1d1f2100
#     statusline #c5c8c6
#     focused_workspace #81a2be #81a2be #1d1f21
#     active_workspace #373b41 #373b41 #ffffff
#     inactive_workspace #282a2e #282a2e #969896
#     urgent_workspace #cc6666 #cc6666 #ffffff
#   }
# }

# Move workspace to other display
bindsym $mod+Control+Left move workspace to output left
bindsym $mod+Control+Down move workspace to output down
bindsym $mod+Control+Up move workspace to output up
bindsym $mod+Control+Right move workspace to output right
#bindsym $mod+x move workspace to output right

# Make the currently focused window a scratchpad
bindsym $mod+Shift+minus move scratchpad

# System menu
bindsym $mod+Shift+s exec ~/.config/i3/system.sh

# Show the first scratchpad window
bindsym $mod+minus scratchpad show

# Swap workspace to work (2)
bindsym $mod+x exec ~/.config/i3/swap_workspace 2

exec_always feh --bg-fill ~/Pictures/orviz-background.jpg
#exec_always feh --bg-fill ~/Pictures/firewatch-orange.jpg
# exec_always feh --bg-fill ~/Pictures/wildlands_02.jpg
# exec_always feh --bg-fill ~/Pictures/mass_effect_andromeda.png

exec_always exec xrandr --dpi 220

#client.focused #81a2be #81a2be #1d1f21 #282a2e

client.focused #81a2be #81a2be #1d1f21 #a82aae
client.focused_inactive #373b41 #373b41 #969896 #282a2e
client.unfocused #282a2e #282a2e #969896 #282a2e
client.urgent #373b41 #fc6666 #ffffff #cc6666

## Base16 Flat
# Author: Chris Kempson (http://chriskempson.com)
#
# You can use these variables anywhere in the i3 configuration file.

set $base00 #2C3E50
set $base01 #34495E
set $base02 #7F8C8D
set $base03 #95A5A6
set $base04 #BDC3C7
set $base05 #e0e0e0
set $base06 #f5f5f5
set $base07 #ECF0F1
set $base08 #E74C3C
set $base09 #E67E22
set $base0A #F1C40F
set $base0B #2ECC71
set $base0C #1ABC9C
set $base0D #3498DB
set $base0E #9B59B6
set $base0F #be643c

# Basic color configuration using the Base16 variables for windows and borders.
# Property Name         Border  BG      Text    Indicator Child Border
# client.focused          $base05 $base0D $base00 $base0D $base0D
# client.focused_inactive $base01 $base01 $base05 $base03 $base01
# client.unfocused        $base01 $base00 $base05 $base01 $base01
# client.urgent           $base08 $base08 $base00 $base08 $base08
# client.placeholder      $base00 $base00 $base05 $base00 $base00
# client.background       $base07


# gaps
# for_window [class="^.*"] border pixel 20
for_window [class="^.*"] border pixel 4
# for_window [class="^.*"] border pixel 0

gaps inner 0
# gaps inner 20
gaps outer 0
smart_gaps on
smart_borders on


# polybar
exec_always --no-startup-id /home/jfontan/.config/polybar/launch.sh

# mouse tap click
exec --no-startup-id xinput set-prop 'DLL060A:00 06CB:2734' 297 1

# multimedia keys

# 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

# Set keyboard layout
bindsym $mod+o exec setxkbmap us
bindsym $mod+p exec setxkbmap es

