Skip to content

Commit

Permalink
feat: fix tewi, ...
Browse files Browse the repository at this point in the history
  • Loading branch information
kittywitch committed Dec 17, 2022
1 parent 6457b97 commit e4bd7ee
Show file tree
Hide file tree
Showing 21 changed files with 425 additions and 224 deletions.
174 changes: 174 additions & 0 deletions 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
{ config, lib, pkgs, nixfiles, ... }:

{
xdg.configFile."waybar/style.css" = { inherit (nixfiles.sassTemplate { name = "waybar-style"; src = ./waybar.sass; }) source; };

#systemd.user.services.waybar.Service.Environment = lib.singleton "NOTMUCH_CONFIG=${config.home.sessionVariables.NOTMUCH_CONFIG}";

programs.waybar = {
enable = true;
systemd.enable = true;
settings = [{
height = 10;
modules-left = [
"sway/workspaces"
"sway/mode"
"sway/window"
];
modules-center = [
];
modules-right = [
"pulseaudio#icon"
"pulseaudio"
"custom/headset-icon"
"custom/headset"
"custom/cpu-icon"
"cpu"
"custom/memory-icon"
"memory"
"temperature#icon"
"temperature"
"battery#icon"
"battery"
"backlight#icon"
"backlight"
"network#icon"
"network"
"idle_inhibitor"
"custom/konawall"
"custom/gpg-status"
"custom/clock"
"tray"
];

modules = {
"sway/workspaces" = {
format = "{icon}";
format-icons = {
"1" = "1:";
"2" = "2:";
"3" = "3:";
};
};
"sway/window" = {
icon = true;
icon-size = 12;
format = "{}";
};
tray = {
icon-size = 12;
spacing = 2;
};
"backlight#icon" = {
format = "{icon}";
format-icons = ["" ""];
};
backlight = {
format = "{percent}%";
};
"custom/gpg-status" = {
format = "{text} {alt}";
interval = 300;
return-type = "json";
exec = "${pkgs.waybar-gpg}/bin/kat-gpg-status";
};
"custom/headset-icon" = {
format = "";
interval = 60;
exec-if = "${pkgs.headsetcontrol}/bin/headsetcontrol -c";
exec = "echo 'mew'";
};
"custom/headset" = {
format = "{}";
interval = 60;
exec-if = "${pkgs.headsetcontrol}/bin/headsetcontrol -c";
exec = "${pkgs.headsetcontrol}/bin/headsetcontrol -b | ${pkgs.gnugrep}/bin/grep Battery | ${pkgs.coreutils}/bin/cut -d ' ' -f2";
};
"custom/konawall" = {
format = "{}";
interval = "once";
return-type = "json";
exec = "${pkgs.waybar-konawall}/bin/konawall-status";
on-click = "${pkgs.waybar-konawall}/bin/konawall-toggle";
on-click-right = "systemctl --user restart konawall";
signal = 8;
};
"custom/cpu-icon".format = "";
cpu.format = "{usage}%";
"custom/memory-icon".format = "";
memory.format = "{percentage}%";
"temperature#icon" = {
format = "{icon}";
format-icons = ["" "" ""];
critical-threshold = 80;
};
temperature = {
format = "{temperatureC}°C";
critical-threshold = 80;
};
idle_inhibitor = {
format = "{icon}";
format-icons = {
activated = "";
deactivated = "";
};
};
"battery#icon" = {
states = {
good = 90;
warning = 30;
critical = 15;
};
format = "{icon}";
format-charging = "";
format-plugged = "";
format-icons = [ "" "" "" "" "" ];
};
battery = {
states = {
good = 90;
warning = 30;
critical = 15;
};
format = "{capacity}%";
format-charging = "{capacity}%";
format-plugged = "{capacity}%";
format-alt = "{time}";
};
"pulseaudio#icon" = {
format = "{icon}";
format-muted = "婢";
on-click = "foot pulsemixer";
format-icons = {
default = [
""
""
""
];
};
};
pulseaudio = {
format = "{volume}%";
on-click = "foot pulsemixer";
};
"network#icon" = {
format-wifi = "直";
format-ethernet = "";
format-linked = " ";
format-disconnected = "";
};
network = {
format-wifi = "{essid} ({signalStrength}%)";
format-ethernet = "{ipaddr}/{cidr}";
format-linked = "No IP";
format-disconnected = "Disconnected";
format-alt = "{ifname}: {ipaddr}/{cidr}";
};
"custom/clock" = {
exec = ''${pkgs.coreutils}/bin/date +"%a, %F %T %Z"'';
interval = 1;
};
};
}];
};
}
48 changes: 24 additions & 24 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions hardware/networkmanager.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
};
hardware.bluetooth = {
enable = true;
package = pkgs.bluez5-experimental;
settings = {
General = {
Enable = "Source,Sink,Media,Socket";
Expand Down
16 changes: 11 additions & 5 deletions home/gtk.nix
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
{ config, lib, pkgs, ... }:

{
home.packages = with pkgs; [ lxappearance ];
base16.gtk.enable = true;
home.packages = with pkgs; [
gnome.adwaita-icon-theme
];
base16.gtk.enable = false;
gtk = {
enable = false;
enable = true;
font = {
name = "Iosevka Aile";
size = 9;
};
iconTheme = {
name = "Papirus-Dark";
package = pkgs.papirus-icon-theme;
name = "Maia";
package = pkgs.maia-icon-theme;
};
theme = {
name = "Adapta";
Expand Down
4 changes: 2 additions & 2 deletions home/gui/nextcloud.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ config, ... }: {
services = {
nextcloud-client.enable = true;
gnome-keyring.enable = true;
nextcloud-client.enable = false;
gnome-keyring.enable = false;
};
}
3 changes: 3 additions & 0 deletions home/gui/packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
google-chrome
element-desktop
cryptsetup
signal-desktop
nix-linter
spotify
esphome
esptool
];
Expand Down
3 changes: 2 additions & 1 deletion home/konawall.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
commonTags = [ "width:>=1600" ];
tagList = map (lib.toList) [
(["score:>=50"
"rating:s"]) #++ optional (nixos.networking.hostName == "koishi") "rating:s")
"no_humans"
"rating:s"])
];
};
}
3 changes: 2 additions & 1 deletion home/sway.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
let lockCommand = config.programs.swaylock.script; in
{
home.sessionVariables = {
XDG_CURRENT_DESKTOP = "sway";
XDG_CURRENT_DESKTOP = "Unity";
XDG_SESSION_TYPE = "wayland";
WLR_DRM_DEVICES = "/dev/dri/card0";
};
Expand Down Expand Up @@ -223,6 +223,7 @@ let lockCommand = config.programs.swaylock.script; in
"${cfg.modifier}+Shift+Tab" = "exec ${config.services.i3gopher.focus-last}";

# multimedia / laptop
"XF86AudioPlay" = "exec --no-startup-id ${pkgs.playerctl}/bin/playerctl play-pause";
"XF86AudioLowerVolume" = "exec --no-startup-id ${pactl} set-sink-volume @DEFAULT_SINK@ -5%";
"XF86AudioRaiseVolume" = "exec --no-startup-id ${pactl} set-sink-volume @DEFAULT_SINK@ +5%";
"XF86AudioMute" = "exec --no-startup-id ${pactl} set-sink-mute @DEFAULT_SINK@ toggle";
Expand Down
2 changes: 1 addition & 1 deletion home/vim/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ in {
tree-sitter-c
tree-sitter-lua
tree-sitter-rust
tree-sitter-bash
#tree-sitter-bash
tree-sitter-css
tree-sitter-dockerfile
tree-sitter-go
Expand Down
Loading

0 comments on commit e4bd7ee

Please sign in to comment.