diff --git a/home/desktop-river/kile/default.nix b/home/desktop-river/kile/default.nix index ef6d0d3..65bbaab 100644 --- a/home/desktop-river/kile/default.nix +++ b/home/desktop-river/kile/default.nix @@ -2,21 +2,8 @@ let 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"; kile = "${pkgs.kile-wl}/bin/kile"; - kile_namespace = "kile"; in { @@ -29,8 +16,7 @@ in { }; Service = { Type = "simple"; - ExecStart = - "${kile} --namespace ${kile_namespace}"; + ExecStart = "${kile}"; }; Install = { WantedBy = [ "river-session.target" ]; }; }; @@ -46,26 +32,26 @@ in { text = '' #!${shell} + ${riverctl} default-layout kile + # 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 Minus 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 "mod-main-ratio -0.01" # 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 Period 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 "mod-main-count -1" # 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 J send-layout-cmd ${kile_namespace} "focused ${down_layout}" - ${riverctl} map normal Super+Control H send-layout-cmd ${kile_namespace} "focused ${left_layout}" - ${riverctl} map normal Super+Control L send-layout-cmd ${kile_namespace} "focused ${right_layout}" - ${riverctl} map normal Super+Control D send-layout-cmd ${kile_namespace} "focused ${deck_layout}" - ${riverctl} map normal Super+Control F send-layout-cmd ${kile_namespace} "focused ${full_layout}" - ${riverctl} map normal Super+Control W send-layout-cmd ${kile_namespace} "focused ${wide_layout}" - ${riverctl} map normal Super+Control C send-layout-cmd ${kile_namespace} "focused ${column_layout}" - ${riverctl} map normal Super+Shift Space send-layout-cmd ${kile_namespace} "focused ${default_layout}" - - ${riverctl} default-layout ${kile_namespace} + ${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" ''; }; }; diff --git a/home/desktop-river/kile/layout.kl b/home/desktop-river/kile/layout.kl index f579a1d..f276114 100644 --- a/home/desktop-river/kile/layout.kl +++ b/home/desktop-river/kile/layout.kl @@ -1,8 +1,14 @@ -const ver Vertical -const hor Horizontal +const hor_base (Horizontal | Vertical Vertical) +const ver_base (Vertical | Horizontal Horizontal) -const vsplit (ver | hor ([1 - 0.5] *hsplit)) -const hsplit (hor | ver ([1 - 0.5] *vsplit)) +const up ([- 0 -] ver_base) +const down ([- 1 -] ver_base) +const left ([- 0 -] hor_base) +const right ([- 1 -] hor_base) -# Preview -const default vsplit +const deck Deck +const full Full +const wide ([- 1 -] (Vertical | Horizontal Horizontal Horizontal)) +const cols ([0 0 0] Vertical) + +const default left diff --git a/home/nixos-common.nix b/home/nixos-common.nix index 2cf7775..896b9dd 100644 --- a/home/nixos-common.nix +++ b/home/nixos-common.nix @@ -25,8 +25,8 @@ src = super.fetchFromGitLab { owner = "snakedye"; repo = "kile"; - rev = "625f91010b920587dbf0ee23113eb8aa51cc6ec3"; - sha256 = "sha256-4sfzF2g2kSz+Q55gTCePjM+7kvfrEJ2uLKyy/V+SLF4="; + rev = "04dafa2ca96efa88dab9a21c1420a8607e1a17f4"; + sha256 = "sha256-aMMDAla+qCZb2s8D7LHaWphgkTfDbNuImr08TUYtBtY="; }; cargoLock = {