sound menu
This commit is contained in:
parent
c5c233509c
commit
284da9f58a
10 changed files with 48 additions and 22 deletions
|
|
@ -7,7 +7,6 @@
|
|||
cfg = config.horseman.dots.fuzzel;
|
||||
username = config.horseman.username;
|
||||
colors = config.horseman.catppuccin.colors;
|
||||
accent = config.horseman.catppuccin.accent;
|
||||
in {
|
||||
options = {
|
||||
horseman.dots.fuzzel = {
|
||||
|
|
@ -20,15 +19,15 @@ in {
|
|||
[colors]
|
||||
background=${catppuccin.toHexNoHash colors.base}dd
|
||||
text=${catppuccin.toHexNoHash colors.text}ff
|
||||
prompt=${catppuccin.toHexNoHash colors.subtext1}ff
|
||||
prompt=${catppuccin.toHexNoHash colors.accent}ff
|
||||
placeholder=${catppuccin.toHexNoHash colors.overlay1}ff
|
||||
input=${catppuccin.toHexNoHash colors.text}ff
|
||||
match=${catppuccin.toHexNoHash colors.${accent}}ff
|
||||
match=${catppuccin.toHexNoHash colors.accent}ff
|
||||
selection=${catppuccin.toHexNoHash colors.surface2}ff
|
||||
selection-text=${catppuccin.toHexNoHash colors.text}ff
|
||||
selection-match=${catppuccin.toHexNoHash colors.${accent}}ff
|
||||
selection-match=${catppuccin.toHexNoHash colors.accent}ff
|
||||
counter=${catppuccin.toHexNoHash colors.overlay1}ff
|
||||
border=${catppuccin.toHexNoHash colors.${accent}}ff
|
||||
border=${catppuccin.toHexNoHash colors.accent}ff
|
||||
|
||||
[main]
|
||||
font=CaskaydiaCoveNerdFont:weight=semilight
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
cfg = config.horseman.dots.waybar;
|
||||
username = config.horseman.username;
|
||||
colors = config.horseman.catppuccin.colors;
|
||||
accent = config.horseman.catppuccin.accent;
|
||||
in {
|
||||
options = {
|
||||
horseman.dots.waybar = {
|
||||
|
|
@ -26,7 +25,7 @@ in {
|
|||
}
|
||||
|
||||
.modules-left, .modules-center, .modules-right {
|
||||
border: 2px solid ${catppuccin.toHex colors.${accent}};
|
||||
border: 2px solid ${catppuccin.toHex colors.accent};
|
||||
border-radius: 10px;
|
||||
margin: 5px;
|
||||
background: ${catppuccin.toHex colors.base};
|
||||
|
|
@ -40,7 +39,7 @@ in {
|
|||
color: ${catppuccin.toHex colors.red};
|
||||
}
|
||||
#power * {
|
||||
color: ${catppuccin.toHex colors.${accent}};
|
||||
color: ${catppuccin.toHex colors.accent};
|
||||
transition: 0.2s color ease;
|
||||
font-size: 26px;
|
||||
}
|
||||
|
|
@ -62,7 +61,7 @@ in {
|
|||
}
|
||||
|
||||
#workspaces > * {
|
||||
color: ${catppuccin.toHex colors.${accent}};
|
||||
color: ${catppuccin.toHex colors.accent};
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
cfg = config.horseman.dots.wofi;
|
||||
username = config.horseman.username;
|
||||
colors = config.horseman.catppuccin.colors;
|
||||
accent = config.horseman.catppuccin.accent;
|
||||
in {
|
||||
options = {
|
||||
horseman.dots.wofi = {
|
||||
|
|
@ -26,7 +25,7 @@ in {
|
|||
window {
|
||||
margin: 0px;
|
||||
padding: 10px;
|
||||
border: 3px solid ${catppuccin.toHex colors.${accent}};
|
||||
border: 3px solid ${catppuccin.toHex colors.accent};
|
||||
border-radius: 10px;
|
||||
background-color: ${catppuccin.toRGBA colors.base 0.99};
|
||||
/* animation: slideIn 0.5s ease-in-out both; */
|
||||
|
|
@ -83,7 +82,7 @@ in {
|
|||
#input {
|
||||
margin: 5px 20px;
|
||||
padding: 10px;
|
||||
border: 2px solid ${catppuccin.toHex colors.${accent}};
|
||||
border: 2px solid ${catppuccin.toHex colors.accent};
|
||||
border-radius: 10px;
|
||||
color: ${catppuccin.toHex colors.text};
|
||||
background-color: ${catppuccin.toHex colors.base};
|
||||
|
|
@ -113,7 +112,7 @@ in {
|
|||
|
||||
#entry arrow {
|
||||
border: none;
|
||||
color: ${catppuccin.toHex colors.${accent}};
|
||||
color: ${catppuccin.toHex colors.accent};
|
||||
}
|
||||
|
||||
/* Selected Entry */
|
||||
|
|
@ -123,7 +122,7 @@ in {
|
|||
}
|
||||
|
||||
#entry:selected {
|
||||
border: 1px solid ${catppuccin.toHex colors.${accent}};
|
||||
border: 1px solid ${catppuccin.toHex colors.accent};
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
|
|
@ -132,7 +131,7 @@ in {
|
|||
}
|
||||
|
||||
#entry:drop(active) {
|
||||
background-color: ${catppuccin.toHex colors.${accent}}!important;
|
||||
background-color: ${catppuccin.toHex colors.accent}!important;
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
|
|
|||
|
|
@ -21,7 +21,10 @@
|
|||
config.horseman = {
|
||||
dots.kitty.fontSize = 13;
|
||||
|
||||
catppuccin.flavor = "mocha";
|
||||
catppuccin = {
|
||||
flavor = "mocha";
|
||||
accent = "blue";
|
||||
};
|
||||
|
||||
users.default.enable = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,10 @@
|
|||
};
|
||||
|
||||
config.horseman = {
|
||||
catppuccin.flavor = "mocha";
|
||||
catppuccin = {
|
||||
flavor = "mocha";
|
||||
accent = "blue";
|
||||
};
|
||||
|
||||
users.default.enable = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ default=15
|
|||
|
||||
lines=$((count > default ? default : count))
|
||||
|
||||
a=$(printf ' Shut down\n Reboot\n Lock\n Log out' | fuzzel --dmenu --index --lines $lines --placeholder "Power action: " -I)
|
||||
a=$(printf ' Shut down\n Reboot\n Lock\n Log out' | fuzzel --cache /dev/null --dmenu --index --lines $lines --placeholder "Power action: " -I)
|
||||
|
||||
if [ -n "$a" ]; then
|
||||
${cmds[a]}
|
||||
|
|
|
|||
14
misc/sound-menu.sh
Executable file
14
misc/sound-menu.sh
Executable file
|
|
@ -0,0 +1,14 @@
|
|||
mapfile -t ids < <(wpctl status | sed -n '/Audio/,/Video/p' | sed -n '/├─ Sinks:/,/├─ Sources:/p' | tail -n +2 | head -n -2 | sed -r 's/^........//' | sed -r 's/\. .*//')
|
||||
|
||||
mapfile -t sinks < <(wpctl status | sed -n '/Audio/,/Video/p' | sed -n '/├─ Sinks:/,/├─ Sources:/p' | tail -n +2 | head -n -2 | sed -r 's/^........//' | sed -r 's/[0-9]+\. //')
|
||||
|
||||
count=${#ids[@]}
|
||||
default=15
|
||||
|
||||
lines=$((count > default ? default : count))
|
||||
|
||||
a=$(printf '%s\n' "${sinks[@]}" | fuzzel --cache /dev/null --dmenu --index --lines $lines --placeholder "Switch audio source: " -I)
|
||||
|
||||
if [ -n "$a" ]; then
|
||||
wpctl set-default ${ids[a]}
|
||||
fi
|
||||
|
|
@ -597,5 +597,5 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
config.horseman.catppuccin.colors = lib.mkDefault flavors.${cfg.flavor};
|
||||
config.horseman.catppuccin.colors = lib.mkDefault (flavors.${cfg.flavor} // {accent = cfg.flavor.${cfg.accent};});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
cfg = config.horseman.wm.hyprland;
|
||||
colors = config.horseman.catppuccin.colors;
|
||||
accent = config.horseman.catppuccin.accent;
|
||||
in {
|
||||
imports = [
|
||||
./options.nix
|
||||
|
|
@ -90,8 +89,8 @@ in {
|
|||
resizeOnBorder = true;
|
||||
allowTearing = false;
|
||||
|
||||
col.activeBorder = catppuccin.toRGB colors.${accent};
|
||||
col.inactiveBorder = catppuccin.toRGBA colors.${accent} 0.25;
|
||||
col.activeBorder = catppuccin.toRGB colors.accent;
|
||||
col.inactiveBorder = catppuccin.toRGBA colors.accent 0.25;
|
||||
|
||||
layout = "dwindle";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -54,6 +54,16 @@ in {
|
|||
in "pkill fuzzel || ${a}/bin/power-menu";
|
||||
}
|
||||
|
||||
{
|
||||
flags = [];
|
||||
mods = ["SUPER"];
|
||||
key = "S";
|
||||
dispatcher = "exec";
|
||||
params = let
|
||||
a = pkgs.writeShellScriptBin "sound-menu" (builtins.readFile ../../../misc/sound-menu.sh);
|
||||
in "pkill fuzzel || ${a}/bin/sound-menu";
|
||||
}
|
||||
|
||||
{
|
||||
flags = [];
|
||||
mods = ["SUPER"];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue