#!/bin/bash

# Set the font
font="JetBrainsMono"

cheat=(
    --title="EndeavourOS Sway keybindings:"
    --no-buttons
    --geometry=1200x680
    --list
    --no-click
    --no-selection
    --column="<span font='$font Bold 18'>Function</span>"
    --column="<span font='$font Bold 18'>Binding</span>"
    --column=""
    --column="<span font='$font Bold 18'>Function</span>"
    --column="<span font='$font Bold 18'>Binding</span>"
    --column-align=ccccc
    --header-align=ccccc
    "<span font='$font 16' foreground='#808080'>GENERAL</span>"
    ""
    ""
    "<span font='$font 16' foreground='#808080'>LAUNCHERS AND MENUS</span>"
    ""    
    "<span font='$font 14'>Mod key (Super/Meta//󰘳)</span>"
    "<span font='$font 18'></span>"
    ""
    "<span font='$font 14'>Open the launcher</span>"
    "<span font='$font 14'> + </span><span font='$font 18'>󰯴</span>"
    "<span font='$font 14'>Change window focus</span>"
    "<span font='$font 14'> + </span><span font='$font 18'>󰜳 󰜰 󰜹 󰜶</span>"
    ""
    "<span font='$font 14'>Open the application menu</span>"
    "<span font='$font 14'> + Shift + </span><span font='$font 18'>󰯴</span>"
    "<span font='$font 14'>Vim keys are supported</span>"
    "<span font='$font 14'> + </span><span font='$font 18'>󰰀 󰰆 󰰉 󰰌</span>"
    ""
    "<span font='$font 14'>Open the power menu</span>"
    "<span font='$font 14'> + Shift + </span><span font='$font 18'>󰯷</span>"
    "<span font='$font 14'>Close a window</span>"
    "<span font='$font 14'> + </span><span font='$font 18'>󰰛</span>"
    ""
    "<span font='$font 14'>Activities overview</span>"
    "<span font='$font 14'> + </span><span font='$font 18'>󰰘</span>"
    "<span font='$font 14'>Move a window</span>"
    "<span font='$font 14'> + Shift + </span><span font='$font 18'>󰜳 󰜰 󰜹 󰜶</span>"
    ""
    "<span font='$font 16' foreground='#808080'>SCREENSHOTS</span>"
    ""
    "<span font='$font 14'>Move window with mouse</span>"
    "<span font='$font 14'> + 󰍽</span>"
    ""
    "<span font='$font 14'>Snip a screenshot</span>"
    "<span font='$font 14'>Print</span>"
    "<span font='$font 14'>Resize a window</span>"
    "<span font='$font 14'> + Ctrl + </span><span font='$font 18'>󰜳 󰜰 󰜹 󰜶</span>"
    ""
    "<span font='$font 14'>Screenshot a window</span>"
    "<span font='$font 14'>Ctrl + Print</span>"
    "<span font='$font 14'>Resize with right click</span>"
    "<span font='$font 14'> + 󰍽</span>"
    ""
    "<span font='$font 14'>Screenshot the display</span>"
    "<span font='$font 14'>Shift + Print</span>"
    "<span font='$font 14'>Change workspace</span>"
    "<span font='$font 14'> + </span><span font='$font 18'>󰎦 󰎩 󰎬 󰎮</span><span font='$font 14'> ...</span>"
    ""
    "<span font='$font 16' foreground='#808080'>CLIPBOARD MANAGER</span>"
    ""
    "<span font='$font 14'>Send window to workspace</span>"
    "<span font='$font 14'> + Shift + </span><span font='$font 18'>󰎦 󰎩 󰎬 󰎮</span><span font='$font 14'> ...</span>"
    ""
    "<span font='$font 14'>Launch cliphist</span>"
    "<span font='$font 14'>Ctrl +  + </span><span font='$font 18'>󰰪</span>"
    "<span font='$font 14'>Toggle floating/tiling</span>"
    "<span font='$font 14'> + Shift + Space</span>"
    ""
    "<span font='$font 14'>Delete an entry from cliphist</span>"
    "<span font='$font 14'>Ctrl +  + </span><span font='$font 18'>󰰰</span>"
    "<span font='$font 14'>Toggle fullscreen</span>"
    "<span font='$font 14'> + </span><span font='$font 18'>󰯺</span>"
    ""
    "<span font='$font 16' foreground='#808080'>APPLICATION SHORTCUTS</span>"
    ""
    "<span font='$font 16' foreground='#808080'>SCRATCHPAD</span>"
    ""
    ""
    "<span font='$font 14'>Launch the terminal</span>"
    "<span font='$font 14'> + Enter</span>"
    "<span font='$font 14'>Move window to scratchpad</span>"
    "<span font='$font 14'> + Shift + </span><span font='$font 18'>󰛲</span>"
    ""
    "<span font='$font 14'>Launch the file explorer</span>"
    "<span font='$font 14'> + </span><span font='$font 18'>󰰒</span>"
    "<span font='$font 14'>Show next scratchpad window</span>"
    "<span font='$font 14'> + </span><span font='$font 18'>󰛲</span>"
    ""
    "<span font='$font 14'>Launch the web browser</span>"
    "<span font='$font 14'> + </span><span font='$font 18'>󰰕</span>"
    ""
)

yad "${cheat[@]}"
