Reorganize sway, replace waybar with default swaybar
This commit is contained in:
parent
42a21bc7d4
commit
064ec29565
7 changed files with 59 additions and 151 deletions
|
@ -1,16 +1,14 @@
|
|||
{ pkgs, ... }: {
|
||||
|
||||
imports = [
|
||||
./sway.nix
|
||||
./mako.nix
|
||||
./wofi.nix
|
||||
./waybar.nix
|
||||
./sway
|
||||
./foot.nix
|
||||
./firefox.nix
|
||||
];
|
||||
|
||||
users.users.sammy.packages = with pkgs; [
|
||||
telegram-desktop
|
||||
mpv
|
||||
];
|
||||
|
||||
services.logind.lidSwitch = "suspend-then-hibernate";
|
||||
|
@ -19,7 +17,12 @@
|
|||
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
displayManager.sddm.enable = true;
|
||||
displayManager.sddm = {
|
||||
enable = true;
|
||||
wayland.enable = true;
|
||||
autoNumlock = true;
|
||||
};
|
||||
|
||||
libinput.enable = true;
|
||||
|
||||
xkb.layout = "de";
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
{ config, pkgs, ... }: {
|
||||
|
||||
imports = [
|
||||
./mako.nix
|
||||
./wofi.nix
|
||||
];
|
||||
|
||||
hardware.opengl.enable = true;
|
||||
|
||||
programs.sway.enable = true;
|
||||
|
@ -28,9 +34,7 @@
|
|||
services.swayidle =
|
||||
let
|
||||
lockCommand = "${pkgs.writeShellScript "swaylock-command" ''
|
||||
${pkgs.grim}/bin/grim -t png -l 1 /tmp/lock-screenshot.png
|
||||
${pkgs.imagemagick}/bin/magick /tmp/lock-screenshot.png -blur 80x40 /tmp/lock-screenshot.png
|
||||
${pkgs.swaylock}/bin/swaylock -i /tmp/lock-screenshot.png
|
||||
${pkgs.swaylock}/bin/swaylock
|
||||
''}";
|
||||
in
|
||||
{
|
||||
|
@ -60,8 +64,6 @@
|
|||
terminal = "foot";
|
||||
menu = "wofi --show drun";
|
||||
|
||||
bars = [ ];
|
||||
|
||||
window = {
|
||||
border = 0;
|
||||
hideEdgeBorders = "both";
|
||||
|
@ -82,6 +84,50 @@
|
|||
};
|
||||
};
|
||||
|
||||
bars = [{
|
||||
mode = "dock";
|
||||
hiddenState = "hide";
|
||||
position = "bottom";
|
||||
workspaceButtons = true;
|
||||
workspaceNumbers = true;
|
||||
statusCommand = "${pkgs.i3status}/bin/i3status";
|
||||
fonts = {
|
||||
names = [ "JetBrains Mono" ];
|
||||
size = 10.0;
|
||||
};
|
||||
trayOutput = "primary";
|
||||
colors = {
|
||||
background = "#000000";
|
||||
statusline = "#ffffff";
|
||||
separator = "#666666";
|
||||
focusedWorkspace = {
|
||||
border = "#4c7899";
|
||||
background = "#285577";
|
||||
text = "#ffffff";
|
||||
};
|
||||
activeWorkspace = {
|
||||
border = "#333333";
|
||||
background = "#5f676a";
|
||||
text = "#ffffff";
|
||||
};
|
||||
inactiveWorkspace = {
|
||||
border = "#333333";
|
||||
background = "#222222";
|
||||
text = "#888888";
|
||||
};
|
||||
urgentWorkspace = {
|
||||
border = "#2f343a";
|
||||
background = "#900000";
|
||||
text = "#ffffff";
|
||||
};
|
||||
bindingMode = {
|
||||
border = "#2f343a";
|
||||
background = "#900000";
|
||||
text = "#ffffff";
|
||||
};
|
||||
};
|
||||
}];
|
||||
|
||||
keybindings = {
|
||||
"${modifier}+Return" = "exec ${cfg.config.terminal}";
|
||||
|
|
@ -1,69 +0,0 @@
|
|||
{
|
||||
"layer": "top",
|
||||
"position": "bottom",
|
||||
"modules-left": [
|
||||
"sway/workspaces",
|
||||
"sway/mode",
|
||||
"tray"
|
||||
],
|
||||
"modules-right": [
|
||||
"network",
|
||||
"pulseaudio",
|
||||
"temperature",
|
||||
"cpu",
|
||||
"memory",
|
||||
"battery",
|
||||
"clock"
|
||||
],
|
||||
"cpu": {
|
||||
"format": " {usage}%"
|
||||
},
|
||||
"memory": {
|
||||
"format": " {percentage}%",
|
||||
"states": {
|
||||
"warning": 15,
|
||||
"critical": 75
|
||||
}
|
||||
},
|
||||
"battery": {
|
||||
"format": "{icon} {capacity}%",
|
||||
"format-icons": [
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
""
|
||||
],
|
||||
"states": {
|
||||
"critical": 10,
|
||||
"warning": 25
|
||||
}
|
||||
},
|
||||
"pulseaudio": {
|
||||
"format": "{icon} {volume}%",
|
||||
"format-icons": [
|
||||
"",
|
||||
""
|
||||
],
|
||||
"format-muted": " muted"
|
||||
},
|
||||
"clock": {
|
||||
"format": "{:%a %Y-%m-%d %H:%M:%S%z}",
|
||||
"interval": 1
|
||||
},
|
||||
"network": {
|
||||
"format-wifi": " {essid} ({signalStrength}%)",
|
||||
"format-ethernet": " connected",
|
||||
"format-disconnected": "no network",
|
||||
//An empty format will hide the module.
|
||||
"tooltip-format": "IPv4: {ipaddr}/{cidr}\nFrequency: {frequency}MHz\nStrength:{signaldBm}dBm",
|
||||
"max-length": 50,
|
||||
"interval": 5
|
||||
},
|
||||
"temperature": {
|
||||
"critical-threshold": 70,
|
||||
"format": " {temperatureC}°C",
|
||||
"interval": 1,
|
||||
"hwmon-path": "/sys/class/hwmon/hwmon5/temp1_input"
|
||||
}
|
||||
}
|
|
@ -1,60 +0,0 @@
|
|||
* {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
font-family: "JetBrains Mono", sans-serif;
|
||||
font-size: 8pt;
|
||||
}
|
||||
|
||||
window {
|
||||
background: linear-gradient(rgba(0, 0, 0, .6), rgba(0, 0, 0, 0.4));
|
||||
color: #fff;
|
||||
}
|
||||
#workspaces {
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
transition: none;
|
||||
padding: 0 5px;
|
||||
background: rgba(255, 255, 255, .2);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#workspaces button.icon label {
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
#workspaces button.focused {
|
||||
color: #333;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
/* :sparkles: maybe needs to be changed to button, when waybar breaks */
|
||||
window>*>*>*>label {
|
||||
margin: 0 7px;
|
||||
padding: 5px;
|
||||
background-color: rgba(255, 255, 255, .2);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#tray {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
#pulseaudio.muted {
|
||||
color: #ffbb00
|
||||
}
|
||||
#network.disconnected,
|
||||
#battery:not(.charging).warning,
|
||||
#temperature.critical {
|
||||
background: #ffbb00;
|
||||
color: black;
|
||||
}
|
||||
#battery:not(.charging).critical {
|
||||
background: #c50014;
|
||||
color: white;
|
||||
}
|
||||
|
||||
#battery.charging {
|
||||
background: #2a7230;
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
users.users.sammy.packages = with pkgs; [ waybar ];
|
||||
home-manager.users.sammy = {
|
||||
xdg.configFile."waybar/config".source = ./waybar-config.json;
|
||||
xdg.configFile."waybar/style.css".source = ./waybar-style.css;
|
||||
wayland.windowManager.sway.config.startup = [{
|
||||
command = "${pkgs.waybar}/bin/waybar";
|
||||
always = true;
|
||||
}];
|
||||
};
|
||||
}
|
||||
|
Loading…
Add table
Reference in a new issue