# Default config file for LXQt Wayfire
#
# Location is  ~/.config/wayfire-lxqt.ini

# Take the tutorial to get started.
# https://github.com/WayfireWM/wayfire/wiki/Tutorial
#
# Read the Configuration document for a complete reference.
# https://github.com/WayfireWM/wayfire/wiki/Configuration

# Input configuration ──────────────────────────────────────────────────────────

# Example configuration:
#(imported from LXQt at start at the bottom)
[input]
xkb_layout =
xkb_variant =
xkb_options =
cursor_size = 24
cursor_theme = default
#
# See Input options for a complete reference.
# https://github.com/WayfireWM/wayfire/wiki/Configuration#input

# Output configuration ─────────────────────────────────────────────────────────

# Example configuration:
#
# [output:eDP-1]
# mode = 1920x1080@60000
# position = 0,0
# transform = normal
# scale = 1.000000
#
# You can get the names of your outputs with wlr-randr.
# https://github.com/emersion/wlr-randr
#
# See also kanshi for configuring your outputs automatically.
# https://wayland.emersion.fr/kanshi/
#
# See Output options for a complete reference.
# https://github.com/WayfireWM/wayfire/wiki/Configuration#output

# Core options ─────────────────────────────────────────────────────────────────

[core]

# List of plugins to be enabled.
# See the Configuration document for a complete list.
plugins = \
  alpha \
  animate \
  autostart \
  command \
  cube \
  decoration \
  expo \
  fast-switcher \
  fisheye \
  foreign-toplevel \
  grid \
  gtk-shell \
  idle \
  invert \
  ipc \
  ipc-rules \
  move \
  oswitch \
  place \
  resize \
  session-lock \
  shortcuts-inhibit \
  switcher \
  vswitch \
  wayfire-shell \
  window-rules \
  wm-actions \
  wobbly \
  wrot \
  wsets \
  xdg-activation \
  zoom

# Note: [blur] is not enabled by default, because it can be resource-intensive.
# Feel free to add it to the list if you want it.
# You can find its documentation here:
# https://github.com/WayfireWM/wayfire/wiki/Configuration#blur

# Close focused window.
close_top_view = <super> KEY_Q | <alt> KEY_F4

# Workspaces arranged into a grid: 3 × 3.
vwidth = 3
vheight = 3

# Prefer client-side decoration or server-side decoration
preferred_decoration_mode = server

# Mouse bindings ───────────────────────────────────────────────────────────────

# Drag windows by holding down Super and left mouse button.
[move]
activate = <super> BTN_LEFT

# Resize them with right mouse button + Super.
[resize]
activate = <super> BTN_RIGHT

# Zoom in the desktop by scrolling + Super.
[zoom]
modifier = <super>

# Change opacity by scrolling with Super + Alt.
[alpha]
modifier = <super> <alt>

# Rotate windows with the mouse.
[wrot]
activate = <super> <ctrl> BTN_RIGHT

# Fisheye effect.
[fisheye]
toggle = <super> <ctrl> KEY_F

# Startup commands ─────────────────────────────────────────────────────────────

[autostart]

# Automatically start background and panel.
# Set to false if you want to override the default clients.
autostart_wf_shell = false
splash = swaybg -i /usr/share/lxqt/wallpapers/origami-dark.png
session = lxqt-session && killall wayfire

# Output configuration
# https://wayland.emersion.fr/kanshi/
# outputs = kanshi

# Screen color temperature
# https://sr.ht/~kennylevinsen/wlsunset/
# gamma = wlsunset

# Idle configuration
# https://github.com/swaywm/swayidle
# https://github.com/swaywm/swaylock
# idle = swayidle before-sleep swaylock

# XDG desktop portal
# Needed by some GTK applications
#portal = /usr/libexec/xdg-desktop-portal

# Example configuration:
#
# [idle]
# toggle = <super> KEY_Z
# screensaver_timeout = 300
# dpms_timeout = 600
#
# Disables the compositor going idle with Super + z.
# This will lock your screen after 300 seconds of inactivity, then turn off
# your displays after another 300 seconds.

# Applications ─────────────────────────────────────────────────────────────────

[command]

# Start a terminal
binding_terminal = <super> KEY_ENTER
command_terminal = lxqt-qdbus run qterminal
binding_launcher = <alt> KEY_SPACE
command_launcher = lxqt-runner
binding_terminaldropdown = KEY_F12
command_terminaldropdown = qterminal -d
binding_leave = KEY_POWER
command_leave = lxqt-leave
# For advanced shortcut handling please consult
# https://github.com/lxqt/lxqt/wiki/Wayland#global-shortcuts
binding_featherpad = <super> KEY_F
command_featherpad = lxqt-qdbus run featherpad
binding_filemanager = <super> KEY_P
command_filemanager = pcmanfm-qt

# Screen locker
binding_lock = <super> <shift> KEY_ESC
command_lock = lxqt-leave --lockscreen

# Logout
binding_logout = <super> KEY_ESC
command_logout = lxqt-leave --logout

# Open Fancy Applications Menu/ Show Desktop
binding_menu = <super>
command_menu = lxqt-qdbus openmenu
binding_showdesktop = <super> KEY_D
command_showdesktop = lxqt-qdbus showdesktop

# Screenshots
binding_screenshot = KEY_PRINT | KEY_SYSRQ
command_screenshot = lxqt-qdbus run screengrab
binding_screenshot_interactive = <shift> KEY_PRINT | <shift> KEY_SYSRQ
command_screenshot_interactive = screengrab -r

# Volume controls
# https://alsa-project.org
repeatable_binding_volume_up = KEY_VOLUMEUP
command_volume_up = lxqt-qdbus volume up
repeatable_binding_volume_down = KEY_VOLUMEDOWN
command_volume_down = lxqt-qdbus volume down
binding_mute = KEY_MUTE
command_mute = lxqt-qdbus volume mute

# Screen brightness
# https://haikarainen.github.io/light/
repeatable_binding_light_up = KEY_BRIGHTNESSUP
repeatable_binding_light_down = KEY_BRIGHTNESSDOWN
command_light_down = lxqt-config-brightness -d
command_light_up = lxqt-config-brightness -i

# Windows ──────────────────────────────────────────────────────────────────────

# Actions related to window management functionalities.
#
# Example configuration:
#
# [wm-actions]
# toggle_fullscreen = <super> KEY_F
# toggle_always_on_top = <super> KEY_X
# toggle_sticky = <super> <shift> KEY_X

# Position the windows in certain regions of the output.
[grid]
#
# ⇱ ↑ ⇲   │ 7 8 9
# ← f →   │ 4 5 6
# ⇱ ↓ ⇲ d │ 1 2 3 0
# ‾   ‾
slot_bl = <super> KEY_KP1
slot_b = <super> KEY_KP2
slot_br = <super> KEY_KP3
slot_l = <super> KEY_LEFT | <super> KEY_KP4
slot_c = <super> KEY_UP | <super> KEY_KP5
slot_r = <super> KEY_RIGHT | <super> KEY_KP6
slot_tl = <super> KEY_KP7
slot_t = <super> KEY_KP8
slot_tr = <super> KEY_KP9
# Restore default.
restore = <super> KEY_DOWN | <super> KEY_KP0

# Change active window with an animation.
[switcher]
next_view = <alt> KEY_TAB
prev_view = <alt> <shift> KEY_TAB

# Simple active window switcher.
[fast-switcher]
activate = <alt> KEY_ESC

# Workspaces ───────────────────────────────────────────────────────────────────

# Switch to workspace.
[vswitch]
binding_left = <ctrl> <super> KEY_LEFT
binding_down = <ctrl> <super> KEY_DOWN
binding_up = <ctrl> <super> KEY_UP
binding_right = <ctrl> <super> KEY_RIGHT
# Move the focused window with the same key-bindings, but add Shift.
with_win_left = <ctrl> <super> <shift> KEY_LEFT
with_win_down = <ctrl> <super> <shift> KEY_DOWN
with_win_up = <ctrl> <super> <shift> KEY_UP
with_win_right = <ctrl> <super> <shift> KEY_RIGHT

# Show the current workspace row as a cube.
[cube]
activate = <ctrl> <alt> BTN_LEFT
# Switch to the next or previous workspace.
#rotate_left = <super> <ctrl> KEY_H
#rotate_right = <super> <ctrl> KEY_L

# Show an overview of all workspaces.
[expo]
toggle = <super> KEY_E
# Select a workspace.
# Workspaces are arranged into a grid of 3 × 3.
# The numbering is left to right, line by line.
#
# ⇱ k ⇲
# h ⏎ l
# ⇱ j ⇲
# ‾   ‾
# See core.vwidth and core.vheight for configuring the grid.
select_workspace_1 = KEY_1
select_workspace_2 = KEY_2
select_workspace_3 = KEY_3
select_workspace_4 = KEY_4
select_workspace_5 = KEY_5
select_workspace_6 = KEY_6
select_workspace_7 = KEY_7
select_workspace_8 = KEY_8
select_workspace_9 = KEY_9

# Outputs ──────────────────────────────────────────────────────────────────────

# Change focused output.
[oswitch]
# Switch to the next output.
next_output = <super> KEY_O
# Same with the window.
next_output_with_win = <super> <shift> KEY_O

# Invert the colors of the whole output.
[invert]
toggle = <super> KEY_I

# Send toggle menu event.
[wayfire-shell]
toggle_menu = <super>

# Rules ────────────────────────────────────────────────────────────────────────

# Example configuration:
#
# [window-rules]
# maximize_alacritty = on created if app_id is "Alacritty" then maximize
#
# You can get the properties of your applications with the following command:
# $ WAYLAND_DEBUG=1 alacritty 2>&1 | kak
#
# See Window rules for a complete reference.
# https://github.com/WayfireWM/wayfire/wiki/Configuration#window-rules
