2023-06-04 11:34:44 +02:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
shell = "${pkgs.dash}/bin/dash";
|
|
|
|
riverctl = "${pkgs.river}/bin/riverctl";
|
|
|
|
kile = "${pkgs.kile-wl}/bin/kile";
|
|
|
|
|
|
|
|
in {
|
|
|
|
|
|
|
|
home.packages = with pkgs; [ kile-wl ];
|
|
|
|
|
|
|
|
systemd.user.services.kile-wl = {
|
|
|
|
Unit = {
|
|
|
|
Description = "kile layout generator";
|
|
|
|
BindsTo = [ "river-session.target" ];
|
|
|
|
};
|
|
|
|
Service = {
|
|
|
|
Type = "simple";
|
2023-07-09 16:23:16 +02:00
|
|
|
ExecStart = "${kile}";
|
2023-06-04 11:34:44 +02:00
|
|
|
};
|
|
|
|
Install = { WantedBy = [ "river-session.target" ]; };
|
|
|
|
};
|
|
|
|
|
|
|
|
xdg.dataFile = {
|
|
|
|
layout = {
|
|
|
|
target = "${config.xdg.configHome}/river/layout.kl";
|
|
|
|
source = ./layout.kl;
|
|
|
|
};
|
|
|
|
init-kile = {
|
|
|
|
executable = true;
|
|
|
|
target = "${config.xdg.configHome}/river/init-kile";
|
|
|
|
text = ''
|
|
|
|
#!${shell}
|
|
|
|
|
2023-07-09 16:23:16 +02:00
|
|
|
${riverctl} default-layout kile
|
|
|
|
|
2023-06-04 11:34:44 +02:00
|
|
|
# Super+H and Super+L to decrease/increase the main ratio
|
2023-07-09 16:23:16 +02:00
|
|
|
${riverctl} map -repeat normal Super Equal send-layout-cmd kile "mod-main-ratio +0.01"
|
|
|
|
${riverctl} map -repeat normal Super Minus send-layout-cmd kile "mod-main-ratio -0.01"
|
2023-06-04 11:34:44 +02:00
|
|
|
|
|
|
|
# Super+Comma and Super+Period. to increment/decrement the main count
|
2023-07-09 16:23:16 +02:00
|
|
|
${riverctl} map normal Super Comma send-layout-cmd kile "mod-main-count +1"
|
|
|
|
${riverctl} map normal Super Period send-layout-cmd kile "mod-main-count -1"
|
2023-06-04 11:34:44 +02:00
|
|
|
|
|
|
|
# Super+{Up,Right,Down,Left} to change layout orientation
|
2023-07-09 16:23:16 +02:00
|
|
|
${riverctl} map normal Super+Control K send-layout-cmd kile "layout up"
|
|
|
|
${riverctl} map normal Super+Control J send-layout-cmd kile "layout down"
|
|
|
|
${riverctl} map normal Super+Control H send-layout-cmd kile "layout left"
|
|
|
|
${riverctl} map normal Super+Control L send-layout-cmd kile "layout right"
|
|
|
|
${riverctl} map normal Super+Control D send-layout-cmd kile "layout deck"
|
|
|
|
${riverctl} map normal Super+Control F send-layout-cmd kile "layout full"
|
|
|
|
${riverctl} map normal Super+Control W send-layout-cmd kile "layout wide"
|
|
|
|
${riverctl} map normal Super+Control C send-layout-cmd kile "layout cols"
|
|
|
|
${riverctl} map normal Super+Shift Space send-layout-cmd kile "layout default"
|
2023-06-04 11:34:44 +02:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|