2020-11-21 23:54:07 +03:00
|
|
|
{ lib, config, pkgs, ... }:
|
|
|
|
with lib;
|
2020-11-22 18:34:10 +03:00
|
|
|
let cfg = config.wayland.windowManager.hikari;
|
2020-12-23 19:54:51 +03:00
|
|
|
in
|
|
|
|
{
|
2020-11-21 23:54:07 +03:00
|
|
|
options.wayland.windowManager.hikari = {
|
|
|
|
enable = mkEnableOption "hikari window manager";
|
2020-12-23 19:54:51 +03:00
|
|
|
xwayland = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
default = true;
|
|
|
|
};
|
2020-11-21 23:54:07 +03:00
|
|
|
font = mkOption {
|
|
|
|
type = types.str;
|
|
|
|
default = "Iosevka";
|
|
|
|
};
|
|
|
|
};
|
2020-11-22 18:34:10 +03:00
|
|
|
|
2020-11-21 23:54:07 +03:00
|
|
|
config = mkIf cfg.enable {
|
2020-12-23 19:54:51 +03:00
|
|
|
home.packages = with pkgs; [ hikari ] ++ (optional cfg.xwayland xwayland);
|
2020-11-22 18:34:10 +03:00
|
|
|
|
2020-11-21 23:54:07 +03:00
|
|
|
xdg = {
|
|
|
|
enable = true;
|
|
|
|
configFile = {
|
|
|
|
"hikari/hikari.conf".text = ''
|
|
|
|
ui {
|
|
|
|
border = 1
|
|
|
|
gap = 0
|
|
|
|
step = 120
|
|
|
|
font = "${cfg.font} 10"
|
|
|
|
|
|
|
|
colorscheme {
|
|
|
|
background = 0x282C34
|
|
|
|
foreground = 0x000000
|
|
|
|
selected = 0xF5E094
|
|
|
|
grouped = 0xFDAF53
|
|
|
|
first = 0xB8E673
|
|
|
|
conflict = 0xED6B32
|
|
|
|
insert = 0xE3C3FA
|
|
|
|
active = 0xFFFFFF
|
|
|
|
inactive = 0x465457
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
outputs {
|
|
|
|
"*" {
|
|
|
|
background = "${config.home.homeDirectory}/wallpaper.png"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
inputs {
|
|
|
|
keyboards {
|
|
|
|
"*" {
|
|
|
|
xkb = {
|
|
|
|
layout = "tr"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-12-23 19:54:51 +03:00
|
|
|
pointers {
|
|
|
|
"*" {
|
|
|
|
accel-profile = "flat"
|
|
|
|
}
|
|
|
|
}
|
2020-11-21 23:54:07 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
layouts {
|
|
|
|
# main stack
|
|
|
|
s = {
|
|
|
|
scale = {
|
|
|
|
min = 0.5
|
|
|
|
max = 0.75
|
|
|
|
}
|
|
|
|
left = single
|
|
|
|
right = stack
|
|
|
|
}
|
|
|
|
|
|
|
|
# main queue
|
|
|
|
q = {
|
|
|
|
scale = 0.75
|
|
|
|
top = single
|
|
|
|
bottom = queue
|
|
|
|
}
|
|
|
|
|
|
|
|
f = full
|
|
|
|
h = stack
|
|
|
|
v = queue
|
|
|
|
g = grid
|
|
|
|
}
|
|
|
|
|
|
|
|
actions {
|
|
|
|
terminal = "${pkgs.alacritty}/bin/alacritty"
|
|
|
|
run = "${pkgs.wofi}/bin/wofi --show drun"
|
|
|
|
}
|
|
|
|
|
|
|
|
bindings {
|
|
|
|
keyboard {
|
|
|
|
"L+0" = workspace-switch-to-sheet-0
|
|
|
|
"L+1" = workspace-switch-to-sheet-1
|
|
|
|
"L+2" = workspace-switch-to-sheet-2
|
|
|
|
"L+3" = workspace-switch-to-sheet-3
|
|
|
|
"L+4" = workspace-switch-to-sheet-4
|
|
|
|
"L+5" = workspace-switch-to-sheet-5
|
|
|
|
"L+6" = workspace-switch-to-sheet-6
|
|
|
|
"L+7" = workspace-switch-to-sheet-7
|
|
|
|
"L+8" = workspace-switch-to-sheet-8
|
|
|
|
"L+9" = workspace-switch-to-sheet-9
|
|
|
|
"L+numbersign" = workspace-switch-to-sheet-alternate
|
|
|
|
"L+Period" = workspace-switch-to-sheet-current
|
|
|
|
"L+j" = workspace-switch-to-sheet-next
|
|
|
|
"L+k" = workspace-switch-to-sheet-prev
|
|
|
|
"L+Comma" = workspace-switch-to-sheet-next-inhabited
|
|
|
|
"LS+Comma" = workspace-switch-to-sheet-prev-inhabited
|
|
|
|
"LSC+g" = workspace-show-group
|
|
|
|
"LSC+i" = workspace-show-invisible
|
|
|
|
"LSC+Period" = workspace-show-all
|
|
|
|
"LC+n" = workspace-cycle-next
|
|
|
|
"LC+p" = workspace-cycle-prev
|
|
|
|
|
|
|
|
"LC+i" = sheet-show-invisible
|
|
|
|
"LC+Period" = sheet-show-all
|
|
|
|
"LC+g" = sheet-show-group
|
|
|
|
|
|
|
|
"LA+r" = layout-reset
|
|
|
|
"LA+Return" = layout-restack-append
|
|
|
|
"LAS+Return" = layout-restack-prepend
|
|
|
|
"L+Home" = layout-cycle-view-first
|
|
|
|
"L+End" = layout-cycle-view-last
|
|
|
|
"L+n" = layout-cycle-view-next
|
|
|
|
"L+p" = layout-cycle-view-prev
|
|
|
|
"L+x" = layout-exchange-view-next
|
|
|
|
"LS+x" = layout-exchange-view-prev
|
|
|
|
"LA+x" = layout-exchange-view-main
|
|
|
|
|
|
|
|
"LS+0" = view-pin-to-sheet-0
|
|
|
|
"LS+1" = view-pin-to-sheet-1
|
|
|
|
"LS+2" = view-pin-to-sheet-2
|
|
|
|
"LS+3" = view-pin-to-sheet-3
|
|
|
|
"LS+4" = view-pin-to-sheet-4
|
|
|
|
"LS+5" = view-pin-to-sheet-5
|
|
|
|
"LS+6" = view-pin-to-sheet-6
|
|
|
|
"LS+7" = view-pin-to-sheet-7
|
|
|
|
"LS+8" = view-pin-to-sheet-8
|
|
|
|
"LS+9" = view-pin-to-sheet-9
|
|
|
|
"LS+numbersign" = view-pin-to-sheet-alternate
|
|
|
|
"LS+Period" = view-pin-to-sheet-current
|
|
|
|
"LS+j" = view-pin-to-sheet-next
|
|
|
|
"LS+k" = view-pin-to-sheet-prev
|
|
|
|
|
|
|
|
"L+q" = view-quit
|
|
|
|
"L+Tab" = view-cycle-next
|
|
|
|
"LS+Tab" = view-cycle-prev
|
|
|
|
|
|
|
|
"L+Up" = view-move-up
|
|
|
|
"L+Down" = view-move-down
|
|
|
|
"L+Left" = view-move-left
|
|
|
|
"L+Right" = view-move-right
|
|
|
|
"LA+Up" = view-decrease-size-up
|
|
|
|
"LAS+Up" = view-increase-size-up
|
|
|
|
"LA+Down" = view-increase-size-down
|
|
|
|
"LAS+Down" = view-decrease-size-down
|
|
|
|
"LA+Left" = view-decrease-size-left
|
|
|
|
"LAS+Left" = view-increase-size-left
|
|
|
|
"LA+Right" = view-increase-size-right
|
|
|
|
"LAS+Right" = view-decrease-size-right
|
|
|
|
"LS+Up" = view-snap-up
|
|
|
|
"LS+Down" = view-snap-down
|
|
|
|
"LS+Left" = view-snap-left
|
|
|
|
"LS+Right" = view-snap-right
|
|
|
|
"L+r" = view-reset-geometry
|
|
|
|
|
|
|
|
"L+minus" = view-toggle-maximize-vertical
|
|
|
|
"L+less" = view-toggle-maximize-horizontal
|
|
|
|
"L+f" = view-toggle-maximize-full
|
|
|
|
"L5+plus" = view-toggle-floating
|
|
|
|
"L+i" = view-toggle-invisible
|
|
|
|
"L5+p" = view-toggle-public
|
|
|
|
|
|
|
|
"L+l" = mode-enter-layout
|
|
|
|
"L+s" = mode-enter-sheet-assign
|
|
|
|
"L+g" = mode-enter-group-assign
|
|
|
|
"L+m" = mode-enter-mark-assign
|
|
|
|
"L+acute" = mode-enter-mark-select
|
|
|
|
"LS+acute" = mode-enter-mark-switch-select
|
|
|
|
"LCA+g" = mode-enter-input-grab
|
|
|
|
|
|
|
|
"LS+Backspace" = lock
|
|
|
|
"LCA+q" = quit
|
|
|
|
"LCA+r" = reload
|
|
|
|
|
|
|
|
"L+Return" = action-terminal
|
|
|
|
"L+d" = action-run
|
|
|
|
|
|
|
|
"A+F1" = vt-switch-to-1
|
|
|
|
"A+F2" = vt-switch-to-2
|
|
|
|
"A+F3" = vt-switch-to-3
|
|
|
|
"A+F4" = vt-switch-to-4
|
|
|
|
"A+F5" = vt-switch-to-5
|
|
|
|
"A+F6" = vt-switch-to-6
|
|
|
|
"A+F7" = vt-switch-to-7
|
|
|
|
"A+F8" = vt-switch-to-8
|
|
|
|
"A+F9" = vt-switch-to-9
|
|
|
|
}
|
|
|
|
|
|
|
|
mouse {
|
|
|
|
"L+left" = mode-enter-move
|
|
|
|
"L+right" = mode-enter-resize
|
|
|
|
}
|
|
|
|
}
|
|
|
|
'';
|
2020-11-22 18:34:10 +03:00
|
|
|
"hikari/autostart".source = "${
|
|
|
|
pkgs.writeScriptBin "hikari-autostart" ''
|
|
|
|
#!${pkgs.stdenv.shell}
|
|
|
|
${pkgs.waybar}/bin/waybar &
|
|
|
|
''
|
|
|
|
}/bin/hikari-autostart";
|
2020-11-21 23:54:07 +03:00
|
|
|
};
|
|
|
|
};
|
2020-11-22 18:34:10 +03:00
|
|
|
};
|
2020-11-21 23:54:07 +03:00
|
|
|
}
|