2024-01-23 16:32:42 +00:00
|
|
|
{ config
|
|
|
|
, substituteAll
|
|
|
|
, swayCfg
|
|
|
|
, writeShellScript
|
|
|
|
}:
|
2023-05-15 02:48:58 +00:00
|
|
|
let
|
2024-01-23 16:32:42 +00:00
|
|
|
prog = config.sane.programs;
|
|
|
|
# TODO: stop referring to all of these by absolute path.
|
|
|
|
fuzzel = "${prog.fuzzel.package}/bin/fuzzel";
|
|
|
|
sed = "${prog.gnused.package}/bin/sed";
|
|
|
|
wtype = "${prog.wtype.package}/bin/wtype";
|
2023-09-04 23:49:15 +00:00
|
|
|
launcher_cmd = fuzzel;
|
2024-01-23 16:32:42 +00:00
|
|
|
terminal_cmd = "${prog.xdg-terminal-exec.package}/bin/xdg-terminal-exec";
|
|
|
|
lock_cmd = "${prog.swaylock.package}/bin/swaylock --indicator-idle-visible --indicator-radius 100 --indicator-thickness 30";
|
2023-09-05 04:25:58 +00:00
|
|
|
# TODO: use pipewire controls?
|
2024-01-23 16:32:42 +00:00
|
|
|
vol_up_cmd = "${prog.pulsemixer.package}/bin/pulsemixer --change-volume +5";
|
|
|
|
vol_down_cmd = "${prog.pulsemixer.package}/bin/pulsemixer --change-volume -5";
|
|
|
|
mute_cmd = "${prog.pulsemixer.package}/bin/pulsemixer --toggle-mute";
|
2023-05-15 02:48:58 +00:00
|
|
|
# "bookmarking"/snippets inspired by Luke Smith:
|
|
|
|
# - <https://www.youtube.com/watch?v=d_11QaTlf1I>
|
2024-01-23 16:32:42 +00:00
|
|
|
snip_cmd = writeShellScript "type_snippet.sh" ''
|
2023-09-05 00:29:13 +00:00
|
|
|
snippet=$(cat ${../snippets.txt} ~/.config/sane-sway/snippets.txt | \
|
|
|
|
${fuzzel} -d -i -w 60 | \
|
|
|
|
${sed} 's/ #.*$//')
|
|
|
|
${wtype} "$snippet"
|
|
|
|
'';
|
2023-07-15 00:23:14 +00:00
|
|
|
# TODO: splatmoji release > 1.2.0 should allow `-s none` to disable skin tones
|
2024-01-23 16:32:42 +00:00
|
|
|
emoji_cmd = "${prog.splatmoji.package}/bin/splatmoji -s medium-light type";
|
|
|
|
in substituteAll {
|
2023-09-04 23:49:15 +00:00
|
|
|
src = ./sway-config;
|
|
|
|
inherit
|
|
|
|
emoji_cmd
|
|
|
|
launcher_cmd
|
|
|
|
lock_cmd
|
|
|
|
mute_cmd
|
|
|
|
snip_cmd
|
|
|
|
terminal_cmd
|
|
|
|
vol_down_cmd
|
|
|
|
vol_up_cmd
|
|
|
|
;
|
2024-01-23 16:32:42 +00:00
|
|
|
inherit (swayCfg)
|
2023-09-05 16:13:23 +00:00
|
|
|
background
|
2023-09-05 04:25:58 +00:00
|
|
|
brightness_down_cmd
|
|
|
|
brightness_up_cmd
|
|
|
|
extra_lines
|
|
|
|
screenshot_cmd
|
|
|
|
font
|
|
|
|
mod
|
|
|
|
workspace_layout
|
|
|
|
;
|
2024-01-23 16:32:42 +00:00
|
|
|
xwayland = if swayCfg.xwayland then "enable" else "disable";
|
|
|
|
playerctl = "${prog.playerctl.package}/bin/playerctl";
|
|
|
|
waybar = "${prog.waybar.package}/bin/waybar";
|
2023-09-04 23:49:15 +00:00
|
|
|
}
|