feat: kile update and implemented my layouts

main
Ricard Illa 2023-07-09 16:23:16 +02:00
parent 52579d9477
commit 845f9a305a
No known key found for this signature in database
GPG Key ID: F69A672B72E54902
3 changed files with 30 additions and 38 deletions

View File

@ -2,21 +2,8 @@
let let
shell = "${pkgs.dash}/bin/dash"; shell = "${pkgs.dash}/bin/dash";
default_master_ratio = "0.6";
up_layout = "Up ((h: v v) 1 ${default_master_ratio} 0)";
down_layout = "Down ((h: v v) 1 ${default_master_ratio} 1)";
left_layout = "Left ((v: h h) 1 ${default_master_ratio} 0)";
right_layout = "Right ((v: h h) 1 ${default_master_ratio} 1)";
deck_layout = "Deck deck";
full_layout = "Full full";
wide_layout = "Wide ((v: h h h) 1 0.5 1)";
column_layout = "Cols (v: v)";
default_layout = left_layout;
riverctl = "${pkgs.river}/bin/riverctl"; riverctl = "${pkgs.river}/bin/riverctl";
kile = "${pkgs.kile-wl}/bin/kile"; kile = "${pkgs.kile-wl}/bin/kile";
kile_namespace = "kile";
in { in {
@ -29,8 +16,7 @@ in {
}; };
Service = { Service = {
Type = "simple"; Type = "simple";
ExecStart = ExecStart = "${kile}";
"${kile} --namespace ${kile_namespace}";
}; };
Install = { WantedBy = [ "river-session.target" ]; }; Install = { WantedBy = [ "river-session.target" ]; };
}; };
@ -46,26 +32,26 @@ in {
text = '' text = ''
#!${shell} #!${shell}
${riverctl} default-layout kile
# Super+H and Super+L to decrease/increase the main ratio # Super+H and Super+L to decrease/increase the main ratio
${riverctl} map -repeat normal Super Equal send-layout-cmd ${kile_namespace} "mod_main_ratio +0.01" ${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_namespace} "mod_main_ratio -0.01" ${riverctl} map -repeat normal Super Minus send-layout-cmd kile "mod-main-ratio -0.01"
# Super+Comma and Super+Period. to increment/decrement the main count # Super+Comma and Super+Period. to increment/decrement the main count
${riverctl} map normal Super Comma send-layout-cmd ${kile_namespace} "mod_main_amount +1" ${riverctl} map normal Super Comma send-layout-cmd kile "mod-main-count +1"
${riverctl} map normal Super Period send-layout-cmd ${kile_namespace} "mod_main_amount -1" ${riverctl} map normal Super Period send-layout-cmd kile "mod-main-count -1"
# Super+{Up,Right,Down,Left} to change layout orientation # Super+{Up,Right,Down,Left} to change layout orientation
${riverctl} map normal Super+Control K send-layout-cmd ${kile_namespace} "focused ${up_layout}" ${riverctl} map normal Super+Control K send-layout-cmd kile "layout up"
${riverctl} map normal Super+Control J send-layout-cmd ${kile_namespace} "focused ${down_layout}" ${riverctl} map normal Super+Control J send-layout-cmd kile "layout down"
${riverctl} map normal Super+Control H send-layout-cmd ${kile_namespace} "focused ${left_layout}" ${riverctl} map normal Super+Control H send-layout-cmd kile "layout left"
${riverctl} map normal Super+Control L send-layout-cmd ${kile_namespace} "focused ${right_layout}" ${riverctl} map normal Super+Control L send-layout-cmd kile "layout right"
${riverctl} map normal Super+Control D send-layout-cmd ${kile_namespace} "focused ${deck_layout}" ${riverctl} map normal Super+Control D send-layout-cmd kile "layout deck"
${riverctl} map normal Super+Control F send-layout-cmd ${kile_namespace} "focused ${full_layout}" ${riverctl} map normal Super+Control F send-layout-cmd kile "layout full"
${riverctl} map normal Super+Control W send-layout-cmd ${kile_namespace} "focused ${wide_layout}" ${riverctl} map normal Super+Control W send-layout-cmd kile "layout wide"
${riverctl} map normal Super+Control C send-layout-cmd ${kile_namespace} "focused ${column_layout}" ${riverctl} map normal Super+Control C send-layout-cmd kile "layout cols"
${riverctl} map normal Super+Shift Space send-layout-cmd ${kile_namespace} "focused ${default_layout}" ${riverctl} map normal Super+Shift Space send-layout-cmd kile "layout default"
${riverctl} default-layout ${kile_namespace}
''; '';
}; };
}; };

View File

@ -1,8 +1,14 @@
const ver Vertical const hor_base (Horizontal | Vertical Vertical)
const hor Horizontal const ver_base (Vertical | Horizontal Horizontal)
const vsplit (ver | hor ([1 - 0.5] *hsplit)) const up ([- 0 -] ver_base)
const hsplit (hor | ver ([1 - 0.5] *vsplit)) const down ([- 1 -] ver_base)
const left ([- 0 -] hor_base)
const right ([- 1 -] hor_base)
# Preview const deck Deck
const default vsplit const full Full
const wide ([- 1 -] (Vertical | Horizontal Horizontal Horizontal))
const cols ([0 0 0] Vertical)
const default left

View File

@ -25,8 +25,8 @@
src = super.fetchFromGitLab { src = super.fetchFromGitLab {
owner = "snakedye"; owner = "snakedye";
repo = "kile"; repo = "kile";
rev = "625f91010b920587dbf0ee23113eb8aa51cc6ec3"; rev = "04dafa2ca96efa88dab9a21c1420a8607e1a17f4";
sha256 = "sha256-4sfzF2g2kSz+Q55gTCePjM+7kvfrEJ2uLKyy/V+SLF4="; sha256 = "sha256-aMMDAla+qCZb2s8D7LHaWphgkTfDbNuImr08TUYtBtY=";
}; };
cargoLock = { cargoLock = {