#
# wm independent hotkeys
#

# terminal emulator
super + Return
	kitty

# Swich layout keyboard
ctrl + Shift_L
###	~/.config/bspwm/scripts/toogle_kb.sh
      ~/.config/bspwm/scripts/kblayout-notify

# program launcher
super + d
	rofi -modi drun -show drun -line-padding 4 \
                -columns 2 -padding 50 -hide-scrollbar -terminal kitty \
                -show-icons -drun-icon-theme "Arc-X-D" -font "JetBrainsMono NF Medium 13"

# show open window
#super + ctrl + d
alt + {grave,Tab}
	rofi -modi drun -show window -line-padding 4 \
                -columns 2 -padding 50 -hide-scrollbar -terminal kitty \
                -show-icons -drun-icon-theme "Arc-X-D" -font "JetBrainsMono NF Medium 13"

# show ssh sesssions
super + shift + d
	rofi -modi drun -show ssh -line-padding 4 \
                -columns 2 -padding 50 -hide-scrollbar -terminal kitty \
                -show-icons -drun-icon-theme "Arc-X-D" -font "JetBrainsMono NF Medium 13"

# show filemanager
super + h
#    rofi -modi drun -show filebrowser -line-padding 4 \
#                -columns 2 -padding 50 -hide-scrollbar -terminal kitty \
#                -show-icons -drun-icon-theme "Arc-X-D" -font "Ubuntu 13"
     ~/.config/bspwm/scripts/hide_win.sh


# power-menu 
#super + shift + e
alt + F4
     ~/.config/rofi/powermenu.sh

# make sxhkd reload its configuration files:
super + Escape
	pkill -USR1 -x sxhkd

#
# bspwm hotkeys
#

# quit/restart bspwm
super + alt + {q,r}
	bspc {quit,wm -r}

# close and kill
super + {_,shift + }q
	bspc node -{c,k}

# alternate between the tiled and monocle layout
super + m
	bspc desktop -l next

super + button2
    bspc desktop -l next

# send the newest marked node to the newest preselected node
super + y
	bspc node newest.marked.local -n newest.!automatic.local

# swap the current node and the biggest window
super + g
	bspc node -s biggest.window

# Balance size open windows 
super + b
    bspc node @/ --balance

super + {o,i} 
#    bspc node '@parent' -R 90
    bspc node '@parent' -R {90,270}

#
# state/flags
#

# set the window state
super + {t,shift + t,s,f}
	bspc node -t {tiled,pseudo_tiled,floating,fullscreen}

# set the node flags
super + ctrl + {m,l,s,z}
	bspc node -g {marked,locked,sticky,private}

#
# focus/swap
#

# Перемещение окна влево,вправо,вверх,вниз
#super + {_,shift + }{h,j,k,l}
super + {_,ctrl + }{Left,Down,Up,Right}
	bspc node -{f,s} {west,south,north,east}

# focus the node for the given path jump
super + {p,b,comma,period}
	bspc node -f @{parent,brother,first,second}

# Переключение фокуса на окнах
#super + {_,shift + }c
super + {Left,Right}
	bspc node -f {prev,next}.local.!hidden.windowfireplace 21 9fireplace 21 9fireplace 21 9fireplace 21 9fireplace 21 9fireplace 21 9

# focus the next/previous desktop in the current monitor
#super + bracket{left,right}
alt + {Left,Right}
	bspc desktop -f {prev,next}.local

# focus the last node/desktop
super + {grave,Tab}
	bspc {node,desktop} -f last

# focus the older or newer node in the focus history
###super + {o,i}
###	bspc wm -h off; \
###	bspc node {older,newer} -f; \
###	bspc wm -h on

# Отправить окно на рабочий стол 0-9
super + {_,shift + }{1-9,0}
	bspc {desktop -f,node -d} '^{1-9,10}'

#
# preselect
#

# preselect the direction
super + ctrl + {h,j,k,l}
	bspc node -p {west,south,north,east}

# preselect the ratio
super + ctrl + {1-9}
	bspc node -o 0.{1-9}

# cancel the preselection for the focused node
super + ctrl + space
	bspc node -p cancel

# cancel the preselection for the focused desktop
super + ctrl + shift + space
	bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel

#
# move/resize
#

# Увеличение размера окна влево вправо вверх вниз
super + alt + {Left,Down,Up,Right}
	bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}

# Изменение  размера окна приложения
#super + alt + shift + {h,j,k,l}
#	bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}

# Перемещение окна в режиме floating
super + alt + shift {Left,Down,Up,Right}
	bspc node -v {-20 0,0 20,0 -20,20 0}

#
# Special hotkeys
#

# Volume control
XF86Audio{Mute,LowerVolume,RaiseVolume}
    /home/zloy_linux/.config/dunst/scripts/volume-control {mute,down,up}

# Multimedia keys
####XF86AudioRaiseVolume
#  amixer -q set Master 5%+ unmute
####   /home/zloy_linux/.config/dunst/scripts/volume-control up

# Still multimedia
####XF86AudioLowerVolume
#  amixer -q set Master 5%- unmute
####   /home/zloy_linux/.config/dunst/scripts/volume-control down

# still
####XF86AudioMute
#  amixer -D pulse sset Master toggle-mute
####   /home/zloy_linux/.config/dunst/scripts/volume-control mute

# amixer -q set Master toggle
# Simple amixer command seems to have problems unmuting device

# Brightness up
XF86MonBrightnessUp
  xbacklight -inc 5

# And brightness down
XF86MonBrightnessDown
  xbacklight -dec 5

# Screenshot
Print
   flameshot launcher
#   gnome-screenshot --interactive
#  scrot ~/Скриншоты/Screenshot-'$(%d-%m-%Y_%T)'.png

super + Print
  ~/.config/bspwm/scripts/screenshot.sh

# Start browser
super + w 
#  firefox-esr
   vivaldi

super + n 
   kitty -e yazi
#  pcmanfm
#  thunar  

super + e
   windot

alt + c
   xcolor

#alt + f
#  catfish

# Kill program
alt + x
  xkill

# Clipton clipboard rofi
alt + z
# clipton
# ~/.config/bspwm/scripts/cliptui.sh
# kitty --class clipse -e 'clipse'
        rofi -config ~/.config/rofi/greenclip.rasi -modi "clipboard:greenclip print" \
        -font "JetBrainsMono NF Medium 13" -line-padding 1 -padding10 -show clipboard \
        -run-command '{cmd}'

alt + f
 fsearch

# Start clipboard clipse
#alt + a
# ~/.config/bspwm/scripts/clipse.sh

super + F1
  ~/.config/bspwm/scripts/keybindings_rofi.sh

super + z
# xed ~/Seafile/notes.txt
 ~/.config/bspwm/scripts/nvim_notes.sh
#   ~/.config/bspwm/scripts/toggle_note_kitty.sh
