2023-07-15 00:23:14 +00:00
|
|
|
{ pkgs }:
|
2023-05-15 02:48:58 +00:00
|
|
|
let
|
|
|
|
fuzzel = "${pkgs.fuzzel}/bin/fuzzel";
|
|
|
|
sed = "${pkgs.gnused}/bin/sed";
|
|
|
|
wtype = "${pkgs.wtype}/bin/wtype";
|
2023-09-04 23:49:15 +00:00
|
|
|
launcher_cmd = fuzzel;
|
|
|
|
terminal_cmd = "${pkgs.xdg-terminal-exec}/bin/xdg-terminal-exec";
|
|
|
|
lock_cmd = "${pkgs.swaylock}/bin/swaylock --indicator-idle-visible --indicator-radius 100 --indicator-thickness 30";
|
|
|
|
vol_up_cmd = "${pkgs.pulsemixer}/bin/pulsemixer --change-volume +5";
|
|
|
|
vol_down_cmd = "${pkgs.pulsemixer}/bin/pulsemixer --change-volume -5";
|
|
|
|
mute_cmd = "${pkgs.pulsemixer}/bin/pulsemixer --toggle-mute";
|
|
|
|
brightness_up_cmd = "${pkgs.brightnessctl}/bin/brightnessctl set +2%";
|
|
|
|
brightness_down_cmd = "${pkgs.brightnessctl}/bin/brightnessctl set 2%-";
|
|
|
|
screenshot_cmd = "${pkgs.sway-contrib.grimshot}/bin/grimshot copy area";
|
2023-05-15 02:48:58 +00:00
|
|
|
# "bookmarking"/snippets inspired by Luke Smith:
|
|
|
|
# - <https://www.youtube.com/watch?v=d_11QaTlf1I>
|
2023-09-04 23:49:15 +00:00
|
|
|
# TODO: snip_cmd is complex enough it should be its own package and not embedded -- pipes and all -- into the sway config
|
|
|
|
snip_file = ../snippets.txt;
|
|
|
|
list_snips = "cat ${snip_file} ~/.config/sane-sway/snippets.txt";
|
|
|
|
strip_comments = "${sed} 's/ #.*$//'";
|
|
|
|
snip_cmd = "${wtype} $(${list_snips} | ${fuzzel} -d -i -w 60 | ${strip_comments})";
|
2023-07-15 00:23:14 +00:00
|
|
|
# TODO: splatmoji release > 1.2.0 should allow `-s none` to disable skin tones
|
2023-09-04 23:49:15 +00:00
|
|
|
emoji_cmd = "${pkgs.splatmoji}/bin/splatmoji -s medium-light type";
|
2023-07-11 00:25:57 +00:00
|
|
|
|
|
|
|
# mod = "Mod1"; # Alt
|
2023-09-04 23:30:40 +00:00
|
|
|
mod = "Mod4"; # Super (Logo key)
|
|
|
|
xwayland = "disable";
|
2023-09-04 23:49:15 +00:00
|
|
|
in pkgs.substituteAll {
|
|
|
|
src = ./sway-config;
|
|
|
|
inherit
|
|
|
|
brightness_down_cmd
|
|
|
|
brightness_up_cmd
|
|
|
|
emoji_cmd
|
|
|
|
launcher_cmd
|
|
|
|
lock_cmd
|
|
|
|
mod
|
|
|
|
mute_cmd
|
|
|
|
screenshot_cmd
|
|
|
|
snip_cmd
|
|
|
|
terminal_cmd
|
|
|
|
vol_down_cmd
|
|
|
|
vol_up_cmd
|
|
|
|
xwayland
|
|
|
|
;
|
|
|
|
status = "${pkgs.i3status}/bin/i3status";
|
|
|
|
waybar = "${pkgs.waybar}/bin/waybar";
|
|
|
|
}
|