Massively simplify Waybar, remove unused remote desktop profile, other things I'm sure
This commit is contained in:
parent
532a1e280f
commit
26b81cf5ed
13 changed files with 153 additions and 209 deletions
|
@ -3,6 +3,7 @@
|
|||
imports = [
|
||||
./kanshi
|
||||
./mako
|
||||
./rofi
|
||||
./swaylock
|
||||
./waybar
|
||||
./wlpicker
|
||||
|
|
135
modules/home/wms/programs/rofi/default.nix
Normal file
135
modules/home/wms/programs/rofi/default.nix
Normal file
|
@ -0,0 +1,135 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
imports = [ ./scripts ];
|
||||
|
||||
config = lib.mkIf config.home.desktop.enable {
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
package = pkgs.rofi-wayland;
|
||||
terminal = "foot";
|
||||
font = "${config.look.fonts.main} 14";
|
||||
theme = let
|
||||
inherit (config.lib.formats.rasi) mkLiteral;
|
||||
in {
|
||||
"*" = {
|
||||
lightbg = mkLiteral "#EEE8D5";
|
||||
lightfg = mkLiteral "#586875";
|
||||
blue = mkLiteral "#268BD2";
|
||||
red = mkLiteral "#DC322F";
|
||||
background-color = mkLiteral "#00000000";
|
||||
separatorcolor = mkLiteral "#00000000";
|
||||
normal-foreground = mkLiteral "#${config.look.colors.text}";
|
||||
normal-background = mkLiteral "#${config.look.colors.dark}1A";
|
||||
urgent-foreground = mkLiteral "#${config.look.colors.urgent}";
|
||||
active-foreground = mkLiteral "#${config.look.colors.split}";
|
||||
selected-active-foreground = mkLiteral "#${config.look.colors.prime}";
|
||||
background = mkLiteral "#${config.look.colors.dark}D9";
|
||||
bordercolor = mkLiteral "#${config.look.colors.prime}";
|
||||
selected-normal-foreground = mkLiteral "#FFFFFF";
|
||||
selected-normal-background = mkLiteral "#${config.look.colors.prime}80";
|
||||
border-color = mkLiteral "#${config.look.colors.prime}";
|
||||
urgent-background = mkLiteral "#${config.look.colors.accent}26";
|
||||
active-background = mkLiteral "#${config.look.colors.accent}26";
|
||||
selected-active-background = mkLiteral "#${config.look.colors.split}54";
|
||||
};
|
||||
"#window" = {
|
||||
background-color = mkLiteral "@background";
|
||||
width = 500;
|
||||
border = mkLiteral "${config.look.border.string}";
|
||||
padding = 5;
|
||||
};
|
||||
"#message" = {
|
||||
border = mkLiteral "1px dash 0px 0px";
|
||||
border-color = mkLiteral "@separatorcolor";
|
||||
padding = 1;
|
||||
};
|
||||
"#textbox" = {
|
||||
text-color = mkLiteral "@normal-foreground";
|
||||
};
|
||||
"#listview" = {
|
||||
fixed-height = 0;
|
||||
border-color = mkLiteral "@separatorcolor";
|
||||
scrollbar = mkLiteral "false";
|
||||
columns = 2;
|
||||
};
|
||||
"#element" = {
|
||||
border = 0;
|
||||
padding = 1;
|
||||
};
|
||||
"#element-text" = {
|
||||
background-color = mkLiteral "inherit";
|
||||
text-color = mkLiteral "inherit";
|
||||
};
|
||||
"#element.normal.normal" = {
|
||||
text-color = mkLiteral "@normal-foreground";
|
||||
};
|
||||
"#element.normal.urgent" = {
|
||||
text-color = mkLiteral "@urgent-foreground";
|
||||
};
|
||||
"#element.normal.active" = {
|
||||
background-color = mkLiteral "@active-background";
|
||||
text-color = mkLiteral "@active-foreground";
|
||||
};
|
||||
"#element.selected.normal" = {
|
||||
background-color = mkLiteral "@selected-normal-background";
|
||||
text-color = mkLiteral "@selected-normal-foreground";
|
||||
};
|
||||
"#element.selected.urgent" = {
|
||||
background-color = mkLiteral "@urgent-background";
|
||||
text-color = mkLiteral "@urgent-foreground";
|
||||
};
|
||||
"#element.selected.active" = {
|
||||
background-color = mkLiteral "@selected-active-background";
|
||||
text-color = mkLiteral "@selected-active-foreground";
|
||||
};
|
||||
"#element.alternate.normal" = {
|
||||
text-color = mkLiteral "@normal-foreground";
|
||||
};
|
||||
"#element.alternate.urgent" = {
|
||||
text-color = mkLiteral "@urgent-foreground";
|
||||
};
|
||||
"#element.alternate.active" = {
|
||||
background-color = mkLiteral "@active-background";
|
||||
text-color = mkLiteral "@active-foreground";
|
||||
};
|
||||
"#mode-switcher" = {
|
||||
border = mkLiteral "2px dash 0px 0px";
|
||||
border-color = mkLiteral "@separatorcolor";
|
||||
};
|
||||
"#button.selected" = {
|
||||
background-color = mkLiteral "@selected-normal-background";
|
||||
text-color = mkLiteral "@selected-normal-foreground";
|
||||
};
|
||||
"#case-indicator" = {
|
||||
spacing = mkLiteral "0";
|
||||
text-color = mkLiteral "@normal-foreground";
|
||||
};
|
||||
"#entry" = {
|
||||
spacing = 0;
|
||||
text-color = mkLiteral "@normal-foreground";
|
||||
};
|
||||
"#prompt" = {
|
||||
spacing = 0;
|
||||
text-color = mkLiteral "@normal-foreground";
|
||||
};
|
||||
"#inputbar" = {
|
||||
spacing = 0;
|
||||
text-color = mkLiteral "@normal-foreground";
|
||||
padding = 1;
|
||||
children = map mkLiteral [ "prompt" "textbox-prompt-colon" "entry"];
|
||||
};
|
||||
"#textbox-prompt-colon" = {
|
||||
expand = false;
|
||||
str = ":";
|
||||
margin = mkLiteral "0px 0.3em 0em 0em";
|
||||
text-color = mkLiteral "@normal-foreground";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
bemoji
|
||||
rofi-bluetooth
|
||||
];
|
||||
};
|
||||
}
|
23
modules/home/wms/programs/rofi/scripts/default.nix
Normal file
23
modules/home/wms/programs/rofi/scripts/default.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; lib.mkIf config.programs.rofi.enable [
|
||||
(writeScriptBin "rofiscratch" ''
|
||||
SCRATCHPADS=$(echo -e "Btop\nMusic\nSound\nEasyEffects" | rofi -dmenu -i -p "Scratchpads")
|
||||
case $SCRATCHPADS in
|
||||
Btop) foot -a btop -T Btop btop;;
|
||||
Music) foot -a music -T Music ncmpcpp;;
|
||||
Sound) foot -a sound -T Sound pulsemixer;;
|
||||
esac
|
||||
'')
|
||||
(writeScriptBin "rofipower" ''
|
||||
POWER=$(echo -e "Shutdown\nReboot\nLock\nSleep\nKill" | rofi -dmenu -i -p "Power")
|
||||
case $POWER in
|
||||
Shutdown) poweroff;;
|
||||
Reboot) reboot;;
|
||||
Lock) swaylock;;
|
||||
Sleep) swaylock & systemctl suspend;;
|
||||
Kill) pkill -9 $XDG_CURRENT_DESKTOP;;
|
||||
esac
|
||||
'')
|
||||
];
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
{ config, pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
programs.waybar = let
|
||||
swayWorkspaceModule = {
|
||||
|
@ -28,7 +28,10 @@
|
|||
format-icons = {
|
||||
headphone = " ";
|
||||
headset = " ";
|
||||
default = [ " " " " ];
|
||||
default = [
|
||||
" "
|
||||
" "
|
||||
];
|
||||
};
|
||||
on-click = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||
on-click-middle = "wpctl set-volume @DEFAULT_AUDIO_SINK@ 100%";
|
||||
|
@ -111,8 +114,14 @@
|
|||
format-wifi = "";
|
||||
format-disconnected = "";
|
||||
format-linked = "";
|
||||
tooltip-format-ethernet = "{ipaddr}\n{ifname} ";
|
||||
tooltip-format-wifi = "{ipaddr}\n{essid} ({signalStrength}%)";
|
||||
tooltip-format-ethernet = lib.concatStrings [
|
||||
"{ipaddr}\n"
|
||||
"{ifname} "
|
||||
];
|
||||
tooltip-format-wifi = lib.concatStrings [
|
||||
"{ipaddr}\n"
|
||||
"{essid} ({signalStrength}%)"
|
||||
];
|
||||
tooltip-format-disconnected = "Disconnected";
|
||||
};
|
||||
|
||||
|
@ -121,7 +130,10 @@
|
|||
format-disabled = "";
|
||||
format-no-controller = "";
|
||||
tooltip-format-on = "No devices connected.";
|
||||
tooltip-format-connected = "{num_connections} connected\n{device_enumerate}";
|
||||
tooltip-format-connected = lib.concatStrings [
|
||||
"{num_connections} connected\n"
|
||||
"{device_enumerate}"
|
||||
];
|
||||
tooltip-format-enumerate-connected = "{device_alias}";
|
||||
tooltip-format-enumerate-connected-battery = "{device_alias} {device_battery_percentage}%";
|
||||
};
|
||||
|
@ -190,7 +202,10 @@
|
|||
# Laptop modules
|
||||
backlightModule = {
|
||||
format = "{icon} {percent}%";
|
||||
format-icons = [ "" "" ];
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
];
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
|
@ -201,133 +216,27 @@
|
|||
critical = 15;
|
||||
};
|
||||
format = "{icon} {capacity}%";
|
||||
format-icons = [ "" "" "" "" "" ];
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
in {
|
||||
enable = config.home.desktop.enable;
|
||||
settings = {
|
||||
display1 = {
|
||||
displayPrimary = {
|
||||
name = "bar1";
|
||||
position = "top";
|
||||
layer = "top";
|
||||
output = [
|
||||
config.displays.d1
|
||||
"VGA-1"
|
||||
];
|
||||
modules-left = [
|
||||
"sway/workspaces"
|
||||
"sway/window"
|
||||
"niri/workspaces"
|
||||
"niri/window"
|
||||
"hyprland/workspaces"
|
||||
"hyprland/window"
|
||||
];
|
||||
modules-right = [
|
||||
"pulseaudio"
|
||||
"cpu"
|
||||
"memory"
|
||||
"custom/vram"
|
||||
"custom/clock-long"
|
||||
"gamemode"
|
||||
"sway/scratchpad"
|
||||
"privacy"
|
||||
"tray"
|
||||
"bluetooth"
|
||||
"network"
|
||||
];
|
||||
"sway/workspaces" = swayWorkspaceModule;
|
||||
"sway/window" = windowModule;
|
||||
"niri/window" = windowModule;
|
||||
"hyprland/window" = windowModule;
|
||||
"pulseaudio" = pulseModule;
|
||||
"cpu" = cpuModule;
|
||||
"memory" = ramModule;
|
||||
"custom/vram" = vramModule;
|
||||
"custom/clock-long" = longClockModule;
|
||||
"gamemode" = gamemodeModule;
|
||||
"privacy" = privacyModule;
|
||||
"sway/scratchpad" = scratchpadModule;
|
||||
"tray" = trayModule;
|
||||
"bluetooth" = bluetoothModule;
|
||||
"network" = networkModule;
|
||||
};
|
||||
|
||||
display2 = {
|
||||
name = "bar2";
|
||||
position = "top";
|
||||
layer = "top";
|
||||
output = [ config.displays.d2 ];
|
||||
modules-left = [
|
||||
"sway/workspaces"
|
||||
"sway/window"
|
||||
"niri/workspaces"
|
||||
"niri/window"
|
||||
"hyprland/workspaces"
|
||||
"hyprland/window"
|
||||
];
|
||||
modules-right = [
|
||||
"pulseaudio"
|
||||
"mpd"
|
||||
"custom/notifs"
|
||||
"cpu"
|
||||
"memory"
|
||||
"custom/vram"
|
||||
"custom/clock-long"
|
||||
];
|
||||
"sway/workspaces" = swayWorkspaceModule;
|
||||
"sway/window" = windowModule;
|
||||
"niri/window" = windowModule;
|
||||
"hyprland/window" = windowModule;
|
||||
"pulseaudio" = pulseModule;
|
||||
"mpd" = mpdModule;
|
||||
"custom/notifs" = notificationModule;
|
||||
"cpu" = cpuModule;
|
||||
"memory" = ramModule;
|
||||
"custom/vram" = vramModule;
|
||||
"custom/clock-long" = longClockModule;
|
||||
};
|
||||
|
||||
display3 = {
|
||||
name = "bar3";
|
||||
position = "top";
|
||||
layer = "top";
|
||||
output = [ config.displays.d3 ];
|
||||
modules-left = [
|
||||
"sway/workspaces"
|
||||
"sway/window"
|
||||
"niri/workspaces"
|
||||
"niri/window"
|
||||
"hyprland/workspaces"
|
||||
"hyprland/window"
|
||||
];
|
||||
modules-right = [
|
||||
"pulseaudio"
|
||||
"custom/weather"
|
||||
"cpu"
|
||||
"memory"
|
||||
"custom/vram"
|
||||
"custom/clock-short"
|
||||
];
|
||||
"sway/workspaces" = swayWorkspaceModule;
|
||||
"sway/window" = windowModule;
|
||||
"niri/window" = windowModule;
|
||||
"hyprland/window" = windowModule;
|
||||
"pulseaudio" = pulseModule;
|
||||
"custom/weather" = weatherModule;
|
||||
"cpu" = cpuModule;
|
||||
"memory" = ramModule;
|
||||
"custom/vram" = vramModule;
|
||||
"custom/clock-short" = shortClockModule;
|
||||
};
|
||||
displayLap = {
|
||||
name = "laptop";
|
||||
position = "top";
|
||||
layer = "top";
|
||||
output = [
|
||||
"eDP-1"
|
||||
"LVDS-1"
|
||||
"DSI-1"
|
||||
"HDMI-A-1"
|
||||
"LVDS-1"
|
||||
"eDP-1"
|
||||
"DP-1"
|
||||
];
|
||||
modules-left = [
|
||||
"sway/workspaces"
|
||||
|
@ -350,6 +259,7 @@
|
|||
"custom/clock-long"
|
||||
"gamemode"
|
||||
"sway/scratchpad"
|
||||
"privacy"
|
||||
"tray"
|
||||
"bluetooth"
|
||||
"network"
|
||||
|
@ -369,10 +279,50 @@
|
|||
"battery" = batteryModule;
|
||||
"custom/clock-long" = longClockModule;
|
||||
"sway/scratchpad" = scratchpadModule;
|
||||
"privacy" = privacyModule;
|
||||
"tray" = trayModule;
|
||||
"bluetooth" = bluetoothModule;
|
||||
"network" = networkModule;
|
||||
};
|
||||
|
||||
displaySecondary = {
|
||||
name = "bar2";
|
||||
position = "top";
|
||||
layer = "top";
|
||||
output = [
|
||||
"!DSI-1"
|
||||
"!HDMI-A-1"
|
||||
"!LVDS-1"
|
||||
"!eDP-1"
|
||||
"!DP-1"
|
||||
];
|
||||
modules-left = [
|
||||
"sway/workspaces"
|
||||
"sway/window"
|
||||
"niri/workspaces"
|
||||
"niri/window"
|
||||
"hyprland/workspaces"
|
||||
"hyprland/window"
|
||||
];
|
||||
modules-right = [
|
||||
"pulseaudio"
|
||||
"cpu"
|
||||
"memory"
|
||||
"custom/vram"
|
||||
"custom/clock-long"
|
||||
];
|
||||
"sway/workspaces" = swayWorkspaceModule;
|
||||
"sway/window" = windowModule;
|
||||
"niri/window" = windowModule;
|
||||
"hyprland/window" = windowModule;
|
||||
"pulseaudio" = pulseModule;
|
||||
"mpd" = mpdModule;
|
||||
"custom/notifs" = notificationModule;
|
||||
"cpu" = cpuModule;
|
||||
"memory" = ramModule;
|
||||
"custom/vram" = vramModule;
|
||||
"custom/clock-long" = longClockModule;
|
||||
};
|
||||
};
|
||||
|
||||
style = ''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue