#                          __
#    _________  ___  _____/ /_______      ______ ___
#   / ___/ __ \/ _ \/ ___/ __/ ___/ | /| / / __ `__ \
#  (__  ) /_/ /  __/ /__/ /_/ /   | |/ |/ / / / / / /
# /____/ .___/\___/\___/\__/_/    |__/|__/_/ /_/ /_/
#     /_/ C-O-D-E-V-O-I-D   E-D-I-T-I-O-N
#

# +--------------------------------------------------
# | WINDOW DECORATION
# +--------------------------------------------------

border_width          = 1
color_focus           = rgb:00/80/80
color_focus_maximized = rgb:00/80/80
color_focus_maximized_free = rgb:00/80/80
color_focus_free      = rgb:00/80/80
color_unfocus         = rgb:00/20/20
color_unfocus_free    = rgb:55/35/00
tile_gap              = 10
region_padding        = 10
disable_border        = 0
maximize_hide_bar     = 0

# +--------------------------------------------------
# | BAR SETTINGS
# +--------------------------------------------------
bar_enabled             = 1
bar_border_width        = 1
bar_border              = rgb:00/20/20
bar_border_unfocus      = rgb:00/20/20
bar_border_free         = rgb:00/20/20

bar_color               = rgb:00/20/20,rgb:00/60/60,rgb:00/20/20,rgb:58/00/00,rgb:00/40/40
bar_color_free          = rgb:00/20/20,rgb:00/60/60,rgb:00/20/20,rgb:58/00/00,rgb:00/40/40
bar_color_selected      = rgb:18/24/28

bar_font_color          = rgb:99/99/99
bar_font_color_free     = rgb:99/99/99
bar_font_color_selected = rgb:ff/ff/ff

bar_font                = JetBrainsMonoNerdFont:pixelsize=18
bar_action              = cbar
bar_action_expand       = 0
bar_at_bottom           = 0

# +< Pad with a space
# +A Output of the external script
# +C Window class (from WM_CLASS)
# +D Workspace name
# +F Focus status indicator
# +I Workspace index
# +L Workspace list indicator
# +M Number of iconic (minimized) windows in workspace
# +N Screen number
# +P Window class and instance separated by a colon
# +R Region index
# +S Stacking algorithm
# +T Window instance (from WM_CLASS)
# +U Urgency hint
# +V Program version
# +w Number of windows in workspace
# +W Window name (from _NET_WM_NAME/WM_NAME)
# ++ A literal ‘+’
# +@ Prefix for text markup sequences

bar_format              = +S +@bg=2;+L+@bg=0; +W +|R +A


# +--------------------------------------------------
# | WORKSPACE LAYOUT
# +--------------------------------------------------

workspace_indicator        = listactive,listcurrent,listurgent,listempty,markactive,markcurrent,markurgent,markempty,printnames,noindex

workspace_mark_current          = '+@bg=1; '
workspace_mark_current_suffix   = ' +@bg=2;'
workspace_mark_active           = '+@bg=4; '
workspace_mark_active_suffix    = ' +@bg=2;'
workspace_mark_urgent           = '+@bg=3; '
workspace_mark_urgent_suffix    = ' +@bg=2;'
workspace_mark_empty            = '+@bg=2; '
workspace_mark_empty_suffix     = ' +@bg=2;'

name = ws[1]:1
name = ws[2]:2
name = ws[3]:3
name = ws[4]:4
name = ws[5]:5
name = ws[6]:6
name = ws[7]:7
name = ws[8]:8
name = ws[9]:9
name = ws[10]:10

workspace_limit            = 10
stack_mark_horizontal      = 'v'
stack_mark_horizontal_flip = '^'
stack_mark_vertical        = '>'
stack_mark_vertical_flip   = '<'
stack_mark_max             = 'F'
stack_mark_floating        = '~'
verbose_layout             = 0
urgent_enabled             = 1

# +--------------------------------------------------
# | FOCUS BEHAVIOR
# +--------------------------------------------------

workspace_clamp      = 1
workspace_autorotate = 1
warp_focus           = 0
warp_pointer         = 0
cycle_visible        = 0
focus_close_wrap     = 1
focus_mode           = default
click_to_raise       = 1

# +--------------------------------------------------
# | QUIRKS
# +--------------------------------------------------

quirk[mpv] = FLOAT + ANYWHERE + FOCUSPREV
quirk[hl] = FLOAT + ANYWHERE + FOCUSPREV
quirk[hashlink] = FLOAT + ANYWHERE + FOCUSPREV
quirk[scratchpad] = FLOAT + ANYWHERE + FOCUSPREV
quirk[XConsole:xconsole] = FLOAT + ANYWHERE + NOFOCUSCYCLE + NOFOCUSONMAP
quirk[Xmessage:xmessage] = FLOAT + ANYWHERE + FOCUSONMAP_SINGLE

# +--------------------------------------------------
# | RESET ALL KEYBOARD MAPPINGS
# +--------------------------------------------------

keyboard_mapping /dev/null

# +--------------------------------------------------
# | REGISTERED PROGRAMS
# +--------------------------------------------------

program[sterm]      = sterm
bind[sterm]         = MOD+Return

program[bterm]      = bterm
bind[bterm]         = MOD+Shift+Return

program[hterm]      = hterm
bind[hterm]         = MOD+Control+Return

program[mixer]      = texec cmixer
bind[mixer]         = MOD+Shift+M

program[vpn]        = dexec_vpn
bind[vpn]           = MOD+V

program[exec]       = dexec
bind[exec]          = MOD+D

program[texec]      = dexec_term
bind[texec]         = MOD+Shift+D

program[ssh]        = dexec_ssh
bind[ssh]           = MOD+S

program[ssh]        = dexec_ssh
bind[ssh]           = MOD+S

program[scratchpad] = scratchpad
bind[scratchpad]    = MOD+minus

program[xconsole]   = xcons
bind[xconsole]      = MOD+Shift+minus

program[apps]       = dexec_apps
bind[apps]          = MOD+A

program[browser]    = dexec_browser
bind[browser]       = MOD+Shift+F

program[pass]       = dexec_pass
bind[pass]          = MOD+Shift+P

program[pim]        = dexec_pim
bind[pim]           = MOD+P

# OTHERS
program[screenshot_wind] = sshot
bind[screenshot_wind]    = Print

program[lock]       = /usr/bin/false

autorun             = ws[10]:xcons
autorun             = ws[10]:scratchpad

# +--------------------------------------------------
# | KEYBOARD MAPPING
# +--------------------------------------------------

# BAR
bind[bar_toggle]        = MOD+b
bind[bar_toggle_ws]     = MOD+Shift+b

# LAYOUT
bind[cycle_layout]      = MOD+l
bind[flip_layout]       = MOD+Shift+l
bind[float_toggle]      = MOD+space
bind[free_toggle]       = MOD+Shift+space

# FOCUS
bind[focus_main]        = MOD+m
bind[focus_next]        = MOD+Down
#bind[focus_next]       = MOD+Tab
bind[focus_prev]        = MOD+Up
bind[focus_prev]        = MOD+Shift+Tab
bind[focus_urgent]      = MOD+u
bind[focus_free]        = Super_L

# ICONFIY / HIDE
bind[uniconify]         = MOD+Shift+i
bind[iconify]           = MOD+i

# MASTER
bind[master_add]        = MOD+comma
bind[master_del]        = MOD+period

bind[master_shrink]     = MOD+Left
bind[master_grow]       = MOD+Right
bind[stack_dec]         = MOD+Shift+comma
bind[stack_inc]         = MOD+Shift+period
#bind[stack_reset]      = MOD+Shift+space
bind[maximize_toggle]   = MOD+F
bind[fullscreen_toggle] = MOD+Control+F

# WS NAVIGATION
bind[ws_1]              = MOD+1
bind[ws_2]              = MOD+2
bind[ws_3]              = MOD+3
bind[ws_4]              = MOD+4
bind[ws_5]              = MOD+5
bind[ws_6]              = MOD+6
bind[ws_7]              = MOD+7
bind[ws_8]              = MOD+8
bind[ws_9]              = MOD+9
bind[ws_10]             = MOD+0
bind[ws_next_all]       = MOD+Page_Down
bind[ws_prev_all]       = MOD+Page_Up
bind[ws_prior]          = MOD+Tab

# MOVE WINDOW TO OTHER WS
bind[rg_next]           = MOD+dead_circumflex
bind[rg_move_next]      = MOD+Shift+dead_circumflex
bind[ws_next_move]      = MOD+Shift+Page_Down
bind[ws_prev_move]      = MOD+Shift+Page_Up
bind[mvws_1]            = MOD+Shift+1
bind[mvws_2]            = MOD+Shift+2
bind[mvws_3]            = MOD+Shift+3
bind[mvws_4]            = MOD+Shift+4
bind[mvws_5]            = MOD+Shift+5
bind[mvws_6]            = MOD+Shift+6
bind[mvws_7]            = MOD+Shift+7
bind[mvws_8]            = MOD+Shift+8
bind[mvws_9]            = MOD+Shift+9
bind[mvws_10]           = MOD+Shift+0
bind[ws_empty]          = MOD+e
bind[ws_empty_move]     = MOD+Shift+e

# RENAME WS
bind[name_workspace]    = MOD+r

# MOVE WINDOW WITHIN WS
bind[swap_main]         = MOD+M
bind[swap_next]         = MOD+Shift+Down
bind[swap_prev]         = MOD+Shift+Up

# DELETE WINDOW
bind[wind_del]          = MOD+q
bind[wind_kill]         = MOD+Shift+q

bind[restart]           = MOD+Shift+r
