added things for river desktop

feat/kile-v2
Ricard Illa 2023-02-03 17:41:33 +01:00
parent aee29973d0
commit 0884183043
No known key found for this signature in database
GPG Key ID: F69A672B72E54902
5 changed files with 93 additions and 22 deletions

View File

@ -28,11 +28,12 @@ in {
configure-gtk
glib
gsettings-desktop-schemas
kile-wl
light
mpdris2
pamixer
playerctl
river
kile-wl
swaybg
wl-clipboard
wtype
@ -40,11 +41,12 @@ in {
];
programs.zsh.loginExtra = ''
[[ -z "''${DISPLAY}" ]] && [[ "$(tty)" = "/dev/tty1" ]] && \
if [[ -z "''${DISPLAY}" ]] && [[ "''${XDG_VTNR}" -eq 1 ]]; then
export XKB_DEFAULT_LAYOUT="us"
export XKB_DEFAULT_VARIANT="altgr-intl"
export XKB_DEFAULT_OPTIONS="caps:escape"
exec ${pkgs.river}/bin/river
fi
'';
home.file.river_init = {

View File

@ -1,15 +1,19 @@
{ config, pkgs, ... }:
{
let
font-name = "Hack Nerd Font";
font-size = "10";
in {
programs.foot = {
enable = true;
settings = {
main = {
shell = "${pkgs.tmux}/bin/tmux -u";
font = "Hack Nerd Font:size=8:style=Regular";
font-bold = "Hack Nerd Font:size=8:style=Bold";
font-italic = "Hack Nerd Font:size=8:style=Italic";
font-bold-italic = "Hack Nerd Font:size=8:style=Bold Italic";
font = "${font-name}:size=${font-size}:style=Regular";
font-bold = "${font-name}:size=${font-size}:style=Bold";
font-italic = "${font-name}:size=${font-size}:style=Italic";
font-bold-italic = "${font-name}:size=${font-size}:style=Bold Italic";
dpi-aware = "no";
};
colors = {
alpha = 0.9;

View File

@ -2,6 +2,17 @@
WALLPAPERS="$HOME/Images/wallpapers/enabled"
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)"
DEFAULT_LAYOUT=$LEFT_LAYOUT
# Super+Return to start an instance of foot (https://codeberg.org/dnkl/foot)
riverctl map normal Super Return spawn foot
@ -36,13 +47,17 @@ riverctl map normal Super+Shift W send-to-output previous
# Super+Shift+Return to bump the focused view to the top of the layout stack
riverctl map normal Super+Shift Return zoom
# Super+H and Super+L to decrease/increase the main ratio of rivertile(1)
riverctl map normal Super H send-layout-cmd rivertile "main-ratio -0.05"
riverctl map normal Super L send-layout-cmd rivertile "main-ratio +0.05"
# Super+H and Super+L to decrease/increase the main ratio
# riverctl map normal Super H send-layout-cmd rivertile "main-ratio -0.05"
# riverctl map normal Super L send-layout-cmd rivertile "main-ratio +0.05"
riverctl map -repeat normal Super H send-layout-cmd kile "mod_main_ratio +0.01"
riverctl map -repeat normal Super L send-layout-cmd kile "mod_main_ratio -0.01"
# Super+Shift+Comma and Super+Shift+Period. to increment/decrement the main count of rivertile(1)
riverctl map normal Super+Shift Comma send-layout-cmd rivertile "main-count +1"
riverctl map normal Super+Shift Period send-layout-cmd rivertile "main-count -1"
# Super+Comma and Super+Period. to increment/decrement the main count
# riverctl map normal Super Comma send-layout-cmd rivertile "main-count +1"
# riverctl map normal Super Period send-layout-cmd rivertile "main-count -1"
riverctl map normal Super+Shift H send-layout-cmd kile "mod_main_amount +1"
riverctl map normal Super+Shift L send-layout-cmd kile "mod_main_amount -1"
# Super+Alt+{H,J,K,L} to move views
riverctl map normal Super+Alt H move left 100
@ -101,10 +116,19 @@ riverctl map normal Super T toggle-float
riverctl map normal Super M toggle-fullscreen
# Super+{Up,Right,Down,Left} to change layout orientation
riverctl map normal Super Up send-layout-cmd rivertile "main-location top"
riverctl map normal Super Right send-layout-cmd rivertile "main-location right"
riverctl map normal Super Down send-layout-cmd rivertile "main-location bottom"
riverctl map normal Super Left send-layout-cmd rivertile "main-location left"
# riverctl map normal Super Up send-layout-cmd rivertile "main-location top"
# riverctl map normal Super Right send-layout-cmd rivertile "main-location right"
# riverctl map normal Super Down send-layout-cmd rivertile "main-location bottom"
# riverctl map normal Super Left send-layout-cmd rivertile "main-location left"
#
riverctl map normal Super+Control K send-layout-cmd kile "focused $UP_LAYOUT"
riverctl map normal Super+Control J send-layout-cmd kile "focused $DOWN_LAYOUT"
riverctl map normal Super+Control H send-layout-cmd kile "focused $LEFT_LAYOUT"
riverctl map normal Super+Control L send-layout-cmd kile "focused $RIGHT_LAYOUT"
riverctl map normal Super+Control D send-layout-cmd kile "focused $DECK_LAYOUT"
riverctl map normal Super+Control F send-layout-cmd kile "focused $FULL_LAYOUT"
riverctl map normal Super+Control W send-layout-cmd kile "focused $WIDE_LAYOUT"
riverctl map normal Super+Shift Space send-layout-cmd kile "focused $DEFAULT_LAYOUT"
# Declare a passthrough mode. This mode has only a single mapping to return to
# normal mode. This makes it useful for testing a nested wayland compositor
@ -165,15 +189,22 @@ riverctl spawn "configure-gtk"
BG="$(find "$WALLPAPERS" -type f | shuf -n 1)"
riverctl spawn "swaybg --image $BG --mode fill"
trackball_name="pointer-21298-5120-Clearly_Superior_Technologies._CST_Laser_Trackball"
riverctl input "$trackball_name" left-handed enabled
riverctl input "$trackball_name" pointer-accel -0.8
trackball_names="pointer-21298-5120-Clearly_Superior_Technologies._CST_Laser_Trackball 21298:5120:Clearly_Superior_Technologies._CST_Laser_Trackball"
for name in $trackball_names; do
echo "$name"
riverctl input "$name" left-handed enabled
riverctl input "$name" pointer-accel -0.8
done
# Set the default layout generator to be rivertile and start it.
# River will send the process group of the init executable SIGTERM on exit.
riverctl default-layout rivertile
rivertile -view-padding 0 -outer-padding 0 &
# riverctl default-layout rivertile
# rivertile -view-padding 0 -outer-padding 0 &
riverctl default-layout kile
kile --namespace kile --layout "$DEFAULT_LAYOUT" &
kanshi &
gotify-desktop &
nm-applet --indicator &
mpDris2 &

View File

@ -25,6 +25,20 @@
}
];
};
docked2 = {
outputs = [
{
criteria = "LVDS-1";
status = "disable";
}
{
criteria = "BenQ Corporation BenQ GW2780 L9K0033101Q";
mode = "1920x1080@60Hz";
}
];
};
};
};
}

View File

@ -14,6 +14,26 @@
};
});
})
(self: super: {
# get latest version of kile-wl for compatibility with river's latest version
kile-wl = super.kile-wl.overrideAttrs (old: rec {
version = "latest";
src = super.fetchFromGitLab {
owner = "snakedye";
repo = "kile";
rev = "d5ab8483c4c8bae6b3a704b87ccc26bae21dca07";
sha256 = "sha256-q8jpC2FZ+pj/5bOn7pugka/RlXOfegXelpCn+kRqEdo=";
};
cargoDeps = old.cargoDeps.overrideAttrs (_: {
inherit src;
outputHash = "sha256-yXIW1/KHmUS9ubRYI8nAKD2VZaQ+vCyCBhm788pLpwA=";
});
});
})
(self: super: { river = stablePkgs.river; })
];
# Let Home Manager install and manage itself.