Compare commits

..

2 Commits

2 changed files with 24 additions and 3 deletions

View File

@ -15,6 +15,11 @@ let
chromium_stackfield = pkgs.writeShellScriptBin "chromium_stackfield" '' chromium_stackfield = pkgs.writeShellScriptBin "chromium_stackfield" ''
${lib.getExe pkgs.ungoogled-chromium} --socket=wayland org.chromium.Chromium --app=https://stackfield.com/ ${lib.getExe pkgs.ungoogled-chromium} --socket=wayland org.chromium.Chromium --app=https://stackfield.com/
''; '';
nixy_switch = pkgs.writeShellScriptBin "nixy_switch" ''
${pkgs.util-linux}/bin/ionice -c 3 -- \
${pkgs.coreutils}/bin/nice -n 20 -- \
${lib.getExe pkgs.nixos-rebuild} --flake ./#nixy switch
'';
qcad = pkgs.writeShellScriptBin "qcad" '' qcad = pkgs.writeShellScriptBin "qcad" ''
QT_QPA_PLATFORM=xcb ${lib.getExe pkgs.qcad} $@ QT_QPA_PLATFORM=xcb ${lib.getExe pkgs.qcad} $@
''; '';
@ -131,7 +136,6 @@ in
screen screen
seer seer
sioyek sioyek
skypeforlinux
slurp slurp
steam-run steam-run
stm32cubemx stm32cubemx
@ -166,9 +170,10 @@ in
chromium_discord chromium_discord
chromium_stackfield chromium_stackfield
chromium_teams chromium_teams
nixy_switch
qcad
ssh_proxy ssh_proxy
wrap_sh wrap_sh
qcad
] ]
++ [ ++ [
inputs.swaysw.packages.${system}.swaysw inputs.swaysw.packages.${system}.swaysw

View File

@ -1,4 +1,14 @@
{ ... }: { pkgs, ... }:
let
kbd_switch = pkgs.writeShellScriptBin "kbd_switch" ''
declare -A -r KBD_CYCLE_MAP=(
["English (US)"]="de"
["German"]="ba"
)
LAYOUT="$(${pkgs.sway}/bin/swaymsg -t get_inputs -r | ${pkgs.jq}/bin/jq -r 'map(select(.type == "keyboard")).[0].xkb_layout_names.[]')"
swaymsg input "*" xkb_layout ''${KBD_CYCLE_MAP["$LAYOUT"]:-"us"}
'';
in
{ {
programs.i3status-rust = { programs.i3status-rust = {
bars.top = { bars.top = {
@ -15,6 +25,12 @@
{ {
block = "keyboard_layout"; block = "keyboard_layout";
driver = "sway"; driver = "sway";
click = [
{
cmd = "${kbd_switch}/bin/kbd_switch";
button = "left";
}
];
} }
{ {
block = "battery"; block = "battery";