some stuff
This commit is contained in:
parent
368fc628c2
commit
841fe9a6a9
11 changed files with 77 additions and 65 deletions
|
@ -38,7 +38,7 @@
|
|||
mod = config.wayland.windowManager.sway.config.modifier;
|
||||
wobVolume = "${pkgs.wireplumber}/bin/wpctl get-volume @DEFAULT_SINK@ | awk '{print $2*100}' > $XDG_RUNTIME_DIR/wob.sock";
|
||||
setVolume = limit: amount: "${pkgs.wireplumber}/bin/wpctl set-volume -l ${limit} @DEFAULT_AUDIO_SINK@ ${amount}";
|
||||
perMonitor = workspace: "\"$(${config.wayland.windowManager.sway.package}/bin/swaymsg -t get_outputs | ${lib.getExe pkgs.jq} -r '.[] | select(.focused == true).id')${toString workspace}\"";
|
||||
perMonitor = workspace: "\"$(swaymsg -t get_outputs | ${lib.getExe pkgs.jq} -r '.[] | select(.focused == true).name' | ${lib.getExe pkgs.perl} -ne '$s=0;for(split//){$s+=ord}print\"$s\"')${toString workspace}\"";
|
||||
#perMonitor = workspace: "${lib.getExe (pkgs.writeShellScriptBin "perMonitor" ''
|
||||
# id=$( md5sum <<< ${config.wayland.windowManager.sway.package}/bin/swaymsg -t get_outputs | ${lib.getExe pkgs.jq} -r '.[] | select(.focused == true).id' )
|
||||
# echo $((0x''${id%% *}))
|
||||
|
@ -82,15 +82,11 @@
|
|||
(builtins.map (x: [
|
||||
{
|
||||
name = "${mod}+${toString x}";
|
||||
#value = "exec swaymsg workspace ${toString x}";
|
||||
value = "exec swaymsg workspace number ${perMonitor x} ${toString x}";
|
||||
#value = "exec ${lib.getExe perMonitor} workspace ${toString x}";
|
||||
value = "exec swaymsg workspace number ${perMonitor x}:${toString x}";
|
||||
}
|
||||
{
|
||||
name = "${mod}+Shift+${toString x}";
|
||||
#value = "exec swaymsg move workspace ${toString x}";
|
||||
value = "exec swaymsg move container to workspace number ${perMonitor x} ${toString x}";
|
||||
#value = "exec ${lib.getExe perMonitor} move workspace ${toString x}";
|
||||
value = "exec swaymsg move container to workspace number ${perMonitor x}:${toString x}";
|
||||
}
|
||||
]) (lib.range 0 9)))
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue