hm: Merge user configs
This commit is contained in:
@@ -1,13 +1,25 @@
|
||||
{
|
||||
|
||||
{ pkgs, ... }: {
|
||||
imports = [
|
||||
./zsh.nix
|
||||
./modules/bundle.nix
|
||||
../../modules/bundle.nix
|
||||
|
||||
../../packages/desktop.nix
|
||||
|
||||
./modules/aagl.nix
|
||||
./modules/git.nix
|
||||
./modules/hyprland.nix
|
||||
./modules/style.nix
|
||||
./modules/waybar.nix
|
||||
];
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
home = {
|
||||
username = "chest";
|
||||
homeDirectory = "/home/chest";
|
||||
stateVersion = "23.11";
|
||||
|
||||
packages = with pkgs; [
|
||||
nautilus
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2,9 +2,10 @@ let
|
||||
aagl-gtk-on-nix = import (
|
||||
builtins.fetchTarball {
|
||||
url = "https://github.com/ezKEa/aagl-gtk-on-nix/archive/main.tar.gz";
|
||||
sha256 = "023yqdxs83cxx39kl7cawwyr39c1qnnv4n99igpsm2a5yay3wmsa";
|
||||
sha256 = "06s9swqgqkafv18zl3k5dbc6q8gdm095rhrnpr2xcqk2vriwwzzk";
|
||||
}
|
||||
);
|
||||
in {
|
||||
in
|
||||
{
|
||||
home.packages = [ aagl-gtk-on-nix.the-honkers-railway-launcher ];
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
{ lib, ... }: {
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
window = {
|
||||
opacity = lib.mkDefault 0.5;
|
||||
blur = true;
|
||||
};
|
||||
|
||||
font = lib.mkDefault {
|
||||
size = 13.0;
|
||||
normal = {
|
||||
family = "JetBrains Mono";
|
||||
style = "Bold";
|
||||
};
|
||||
};
|
||||
|
||||
colors.primary.background = lib.mkDefault "#1d2021";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
imports = [
|
||||
./git.nix
|
||||
./alacritty.nix
|
||||
./qt.nix
|
||||
# ./sops.nix
|
||||
./style.nix
|
||||
./aagl.nix
|
||||
|
||||
./wms/hyprland.nix
|
||||
./wms/waybar.nix
|
||||
./wms/wofi.nix
|
||||
./wms/mako.nix
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
{ pkgs, lib, config, ... }: {
|
||||
imports = [(
|
||||
import ../../../patterns/hyprland.nix {
|
||||
inherit lib;
|
||||
inherit pkgs;
|
||||
inherit config;
|
||||
collection = "cheeeest/1767552";
|
||||
swww_flags = "";
|
||||
}
|
||||
)];
|
||||
|
||||
wayland.windowManager.hyprland = let
|
||||
colors = config.lib.stylix.colors;
|
||||
in {
|
||||
settings = {
|
||||
monitor = ",preferred,auto,1";
|
||||
|
||||
general = {
|
||||
gaps_in = 5;
|
||||
gaps_out = 20;
|
||||
border_size = 3;
|
||||
"col.active_border" = "rgba(${colors.base0C}ee) rgba(${colors.base0B}ee) 45deg";
|
||||
"col.inactive_border" = "rgba(${colors.base05}aa)";
|
||||
|
||||
layout = "dwindle";
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 10;
|
||||
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 16;
|
||||
passes = 2;
|
||||
new_optimizations = true;
|
||||
};
|
||||
|
||||
drop_shadow = true;
|
||||
shadow_range = 4;
|
||||
shadow_render_power = 3;
|
||||
"col.shadow" = "rgba(1a1a1aee)";
|
||||
};
|
||||
|
||||
animations = {
|
||||
enabled = true;
|
||||
|
||||
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
|
||||
|
||||
animation = [
|
||||
"windows, 1, 7, myBezier"
|
||||
"windowsOut, 1, 7, default, popin 80%"
|
||||
"border, 1, 10, default"
|
||||
"borderangle, 1, 8, default"
|
||||
"fade, 1, 7, default"
|
||||
"workspaces, 1, 6, default"
|
||||
];
|
||||
};
|
||||
|
||||
dwindle = {
|
||||
pseudotile = true;
|
||||
smart_split = true;
|
||||
};
|
||||
|
||||
master.new_status = "master";
|
||||
|
||||
gestures = {
|
||||
workspace_swipe = true;
|
||||
workspace_swipe_fingers = 3;
|
||||
workspace_swipe_invert = true;
|
||||
workspace_swipe_distance = 200;
|
||||
workspace_swipe_forever = true;
|
||||
};
|
||||
|
||||
misc = {
|
||||
animate_manual_resizes = true;
|
||||
animate_mouse_windowdragging = true;
|
||||
enable_swallow = true;
|
||||
render_ahead_of_time = false;
|
||||
disable_hyprland_logo = false;
|
||||
};
|
||||
|
||||
windowrulev2 = [
|
||||
"opacity 0.75, class:vesktop"
|
||||
];
|
||||
|
||||
bind = [
|
||||
''$mainMod Shift, S, exec, ${lib.getExe pkgs.grim} -g "$(${lib.getExe pkgs.slurp})" - | ${lib.getExe pkgs.swappy} -f -''
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme = "qtct";
|
||||
style.name = "kvantum";
|
||||
};
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
{ config, ... }: {
|
||||
sops = {
|
||||
defaultSopsFile = ../secrets.yaml;
|
||||
age.keyFile = "/home/chest/.config/sops/age/keys.txt";
|
||||
|
||||
secrets."tokens/apis/wallhaven" = {};
|
||||
};
|
||||
}
|
||||
@@ -4,6 +4,7 @@
|
||||
targets = {
|
||||
hyprland.enable = false;
|
||||
waybar.enable = false;
|
||||
kitty.variant256Colors = true;
|
||||
};
|
||||
|
||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/eris.yaml";
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
{ pkgs, config, ... }: {
|
||||
imports = [(
|
||||
import ../../../patterns/waybar.nix {
|
||||
inherit pkgs;
|
||||
inherit config;
|
||||
active_color = "#d197d9";
|
||||
}
|
||||
)];
|
||||
}
|
||||
@@ -1,278 +0,0 @@
|
||||
{ pkgs, lib, config, ... }: {
|
||||
wayland.windowManager.hyprland =
|
||||
let
|
||||
colors = config.lib.stylix.colors;
|
||||
|
||||
wallpaper_changer = pkgs.writers.writePython3Bin "wallpaper_changer" {
|
||||
flakeIgnore = [ "E501" "E111" "E701" "E241" "E731" ];
|
||||
} /*py*/ ''
|
||||
import requests as requests
|
||||
from random import choice
|
||||
from os import system, mkdir, listdir
|
||||
from os.path import exists
|
||||
|
||||
notify = lambda s: system(f"notify-desktop Wallpaper '{s}'")
|
||||
folder = "/home/chest/Wallpapers"
|
||||
url = "https://wallhaven.cc/api/v1/collections/cheeeest/1767552"
|
||||
token = "8KkNcm3jS0hbjt0MPQXCi9EW0rMsqw5r"
|
||||
|
||||
notify("Updating wallpaper!")
|
||||
|
||||
try:
|
||||
json = requests.get(url, params={'apikey': token}).json()
|
||||
|
||||
wallpaper = choice(json['data'])
|
||||
link = wallpaper['path']
|
||||
format = wallpaper['file_type']
|
||||
id = wallpaper['id']
|
||||
|
||||
if format == "image/jpeg": ext = "jpg"
|
||||
else: ext = "png"
|
||||
|
||||
filename = f"{id}.{ext}"
|
||||
|
||||
if not exists(f"{folder}/{filename}"):
|
||||
if not exists(folder):
|
||||
mkdir(f"{folder}")
|
||||
|
||||
notify("Downloading...")
|
||||
with open(f"{folder}/{filename}", 'wb') as f:
|
||||
r = requests.get(link)
|
||||
f.write(r.content)
|
||||
|
||||
except requests.exceptions.ConnectionError:
|
||||
notify("Offline mode")
|
||||
filename = choice(listdir(folder))
|
||||
|
||||
finally:
|
||||
system(f"swww img {folder}/{filename}")
|
||||
'';
|
||||
in {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
|
||||
settings = {
|
||||
"$mainMod" = "SUPER";
|
||||
|
||||
monitor = ",preferred,auto,1";
|
||||
|
||||
env = [
|
||||
"LIBVA_DRIVER_NAME,nvidia"
|
||||
"XDG_SESSION_TYPE,wayland"
|
||||
"GBM_BACKEND,nvidia"
|
||||
"__GLX_VENDOR_LIBRARY_NAME,nvidia"
|
||||
"WLR_NO_HARDWARE_CURSORS,1"
|
||||
"XDG_CURRENT_DESKTOP,Hyprland"
|
||||
"XDG_SESSION_TYPE,wayland"
|
||||
"XDG_SESSION_DESKTOP,Hyprland"
|
||||
"XCURSOR_SIZE,36"
|
||||
"QT_QPA_PLATFORM,wayland"
|
||||
"XDG_SCREENSHOTS_DIR,~/screens"
|
||||
];
|
||||
|
||||
debug = {
|
||||
disable_logs = false;
|
||||
enable_stdout_logs = true;
|
||||
};
|
||||
|
||||
input = {
|
||||
kb_layout = "us,ru";
|
||||
kb_variant = "lang";
|
||||
kb_options = "grp:caps_toggle";
|
||||
|
||||
follow_mouse = 1;
|
||||
|
||||
touchpad = {
|
||||
natural_scroll = false;
|
||||
};
|
||||
|
||||
sensitivity = 0; # -1.0 - 1.0, 0 means no modification.
|
||||
};
|
||||
|
||||
general = {
|
||||
gaps_in = 5;
|
||||
gaps_out = 20;
|
||||
border_size = 3;
|
||||
"col.active_border" = "rgba(${colors.base0C}ee) rgba(${colors.base0B}ee) 45deg";
|
||||
"col.inactive_border" = "rgba(${colors.base05}aa)";
|
||||
|
||||
layout = "dwindle";
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 10;
|
||||
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 16;
|
||||
passes = 2;
|
||||
new_optimizations = true;
|
||||
};
|
||||
|
||||
drop_shadow = true;
|
||||
shadow_range = 4;
|
||||
shadow_render_power = 3;
|
||||
"col.shadow" = "rgba(1a1a1aee)";
|
||||
};
|
||||
|
||||
animations = {
|
||||
enabled = true;
|
||||
|
||||
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
|
||||
# bezier = "myBezier, 0.33, 0.82, 0.9, -0.08";
|
||||
|
||||
animation = [
|
||||
"windows, 1, 7, myBezier"
|
||||
"windowsOut, 1, 7, default, popin 80%"
|
||||
"border, 1, 10, default"
|
||||
"borderangle, 1, 8, default"
|
||||
"fade, 1, 7, default"
|
||||
"workspaces, 1, 6, default"
|
||||
];
|
||||
};
|
||||
|
||||
dwindle = {
|
||||
pseudotile = true; # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||
smart_split = true;
|
||||
};
|
||||
|
||||
master = {
|
||||
new_status = "master";
|
||||
};
|
||||
|
||||
gestures = {
|
||||
workspace_swipe = true;
|
||||
workspace_swipe_fingers = 3;
|
||||
workspace_swipe_invert = true;
|
||||
workspace_swipe_distance = 200;
|
||||
workspace_swipe_forever = true;
|
||||
};
|
||||
|
||||
misc = {
|
||||
animate_manual_resizes = true;
|
||||
animate_mouse_windowdragging = true;
|
||||
enable_swallow = true;
|
||||
render_ahead_of_time = false;
|
||||
disable_hyprland_logo = false;
|
||||
};
|
||||
|
||||
windowrule = [
|
||||
"float, ^(imv)$"
|
||||
"float, ^(feh)$"
|
||||
"float, ^(mpv)$"
|
||||
"float, ^(nmtui)$"
|
||||
"float, title:^(Список друзей)"
|
||||
];
|
||||
|
||||
windowrulev2 = [
|
||||
"opacity 0.75, class:vesktop"
|
||||
];
|
||||
|
||||
exec-once = [
|
||||
"systemctl --user start plasma-polkit-agent"
|
||||
"swww init"
|
||||
"python3 ${lib.getExe wallpaper_changer}"
|
||||
"waybar"
|
||||
"wl-paste --type text --watch cliphist store"
|
||||
"wl-paste --type image --watch cliphist store"
|
||||
];
|
||||
|
||||
bind = [
|
||||
"$mainMod, V, exec, cliphist list | wofi --dmenu | cliphist decode | wl-copy"
|
||||
|
||||
"$mainMod, Return, exec, alacritty"
|
||||
"$mainMod, Q, killactive,"
|
||||
"$mainMod, M, exit,"
|
||||
"$mainMod, E, exec, alacritty -e sh -c yazi"
|
||||
"$mainMod, F, togglefloating,"
|
||||
"$mainMod, D, exec, wofi --show drun"
|
||||
"$mainMod, P, pseudo, # dwindle"
|
||||
"$mainMod, J, togglesplit, # dwindle"
|
||||
|
||||
# Move focus with mainMod + arrow keys
|
||||
"$mainMod, left, movefocus, l"
|
||||
"$mainMod, right, movefocus, r"
|
||||
"$mainMod, up, movefocus, u"
|
||||
"$mainMod, down, movefocus, d"
|
||||
|
||||
# Moving windows
|
||||
"$mainMod SHIFT, left, swapwindow, l"
|
||||
"$mainMod SHIFT, right, swapwindow, r"
|
||||
"$mainMod SHIFT, up, swapwindow, u"
|
||||
"$mainMod SHIFT, down, swapwindow, d"
|
||||
|
||||
# Window resizing X Y
|
||||
"$mainMod CTRL, left, resizeactive, -60 0"
|
||||
"$mainMod CTRL, right, resizeactive, 60 0"
|
||||
"$mainMod CTRL, up, resizeactive, 0 -60"
|
||||
"$mainMod CTRL, down, resizeactive, 0 60"
|
||||
|
||||
# Switch workspaces with mainMod + [0-9]
|
||||
"$mainMod, 1, workspace, 1"
|
||||
"$mainMod, 2, workspace, 2"
|
||||
"$mainMod, 3, workspace, 3"
|
||||
"$mainMod, 4, workspace, 4"
|
||||
"$mainMod, 5, workspace, 5"
|
||||
"$mainMod, 6, workspace, 6"
|
||||
"$mainMod, 7, workspace, 7"
|
||||
"$mainMod, 8, workspace, 8"
|
||||
"$mainMod, 9, workspace, 9"
|
||||
"$mainMod, 0, workspace, 10"
|
||||
|
||||
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||
"$mainMod SHIFT, 1, movetoworkspacesilent, 1"
|
||||
"$mainMod SHIFT, 2, movetoworkspacesilent, 2"
|
||||
"$mainMod SHIFT, 3, movetoworkspacesilent, 3"
|
||||
"$mainMod SHIFT, 4, movetoworkspacesilent, 4"
|
||||
"$mainMod SHIFT, 5, movetoworkspacesilent, 5"
|
||||
"$mainMod SHIFT, 6, movetoworkspacesilent, 6"
|
||||
"$mainMod SHIFT, 7, movetoworkspacesilent, 7"
|
||||
"$mainMod SHIFT, 8, movetoworkspacesilent, 8"
|
||||
"$mainMod SHIFT, 9, movetoworkspacesilent, 9"
|
||||
"$mainMod SHIFT, 0, movetoworkspacesilent, 10"
|
||||
|
||||
"$mainMod SHIFT, F, fullscreen"
|
||||
|
||||
# Scroll through existing workspaces with mainMod + scroll
|
||||
"$mainMod, mouse_down, workspace, e+1"
|
||||
"$mainMod, mouse_up, workspace, e-1"
|
||||
|
||||
# Keyboard backlight
|
||||
"$mainMod, F3, exec, brightnessctl -d *::kbd_backlight set +33%"
|
||||
"$mainMod, F2, exec, brightnessctl -d *::kbd_backlight set 33%-"
|
||||
|
||||
# Volume and Media Control
|
||||
", XF86AudioRaiseVolume, exec, pamixer -i 5 "
|
||||
", XF86AudioLowerVolume, exec, pamixer -d 5 "
|
||||
", XF86AudioMute, exec, pamixer -t"
|
||||
", XF86AudioMicMute, exec, pamixer --default-source -m"
|
||||
|
||||
# Brightness control
|
||||
", XF86MonBrightnessDown, exec, brightnessctl set 5%- "
|
||||
", XF86MonBrightnessUp, exec, brightnessctl set +5% "
|
||||
|
||||
# Configuration files
|
||||
''$mainMod ALT, N, exec, alacritty -e sh -c "rb"''
|
||||
''$mainMod ALT, C, exec, alacritty -e sh -c "conf"''
|
||||
''$mainMod ALT, H, exec, alacritty -e sh -c "$EDITOR ~/nix/home-manager/modules/wms/hyprland.nix"''
|
||||
''$mainMod ALT, W, exec, alacritty -e sh -c "$EDITOR ~/nix/home-manager/modules/wms/waybar.nix"''
|
||||
''$mainMod Shift, S, exec, grim -g "$(slurp)" - | swappy -f -''
|
||||
|
||||
# Waybar
|
||||
"$mainMod, B, exec, pkill -SIGUSR1 waybar"
|
||||
#"$mainMod, W, exec, pkill -SIGUSR2 waybar"
|
||||
|
||||
"$mainMod, W, exec, python3 ${lib.getExe wallpaper_changer}"
|
||||
|
||||
# Disable all effects
|
||||
"$mainMod Shift, G, exec, ~/.config/hypr/gamemode.sh "
|
||||
];
|
||||
|
||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
bindm = [
|
||||
"$mainMod, mouse:272, movewindow"
|
||||
"$mainMod, mouse:273, resizewindow"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
{
|
||||
xdg.configFile."mako/config".text = ''
|
||||
background-color=#303446
|
||||
text-color=#c6d0f5
|
||||
border-color=#8caaee
|
||||
progress-color=over #414559
|
||||
default-timeout=5000
|
||||
|
||||
[urgency=high]
|
||||
border-color=#ef9f76
|
||||
'';
|
||||
}
|
||||
@@ -1,455 +0,0 @@
|
||||
{ pkgs, config, ...}: {
|
||||
home.packages = [ pkgs.pulsemixer ];
|
||||
wayland.windowManager.hyprland.settings.windowrule = [
|
||||
"float, ^(pulsemixer)"
|
||||
"float, ^(nmtui)"
|
||||
];
|
||||
|
||||
xdg.configFile."waybar/scripts/wttr.py".source = pkgs.fetchurl {
|
||||
name = "waybar-wttr.py";
|
||||
url = "https://gist.githubusercontent.com/bjesus/f8db49e1434433f78e5200dc403d58a3/raw/47f9ffd573dc8e8edce0ea6708601b8e685a70ab/waybar-wttr.py";
|
||||
sha256 = "15j2cqg405q37wrrlm70mhp7rx6xnrn92rfm1ix6g3nl98ksh45g";
|
||||
};
|
||||
|
||||
programs.waybar =
|
||||
let
|
||||
colors = config.lib.stylix.colors;
|
||||
in {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
mainBar = {
|
||||
layer = "top";
|
||||
position = "top";
|
||||
margin = "9 13 -10 18";
|
||||
|
||||
modules-left = ["hyprland/workspaces" "hyprland/language" "keyboard-state" "hyprland/submap"];
|
||||
modules-center = ["mpris" "wlr/taskbar"];
|
||||
modules-right = ["group/system" "battery" "pulseaudio" "clock" "tray"];
|
||||
|
||||
"hyprland/workspaces" = {
|
||||
disable-scroll = true;
|
||||
};
|
||||
|
||||
"wlr/taskbar" = {
|
||||
on-click = "activate";
|
||||
on-click-middle = "close";
|
||||
on-click-right = "minimize";
|
||||
};
|
||||
|
||||
"group/system" = {
|
||||
orientation = "inherit";
|
||||
drawer = {
|
||||
transition-duration = 500;
|
||||
transition-left-to-right = false;
|
||||
};
|
||||
modules = [
|
||||
"network"
|
||||
"custom/mem"
|
||||
"cpu"
|
||||
"temperature"
|
||||
"backlight"
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
"hyprland/language" = {
|
||||
format-en = "US";
|
||||
format-ru = "RU";
|
||||
min-length = 5;
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
"keyboard-state" = {
|
||||
capslock = true;
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
locked = "CUPS";
|
||||
unlocked = "";
|
||||
};
|
||||
};
|
||||
|
||||
"clock" = {
|
||||
tooltip = false;
|
||||
format = "{:%a, %d %b %R}";
|
||||
};
|
||||
|
||||
"custom/weather" = {
|
||||
format = "{}";
|
||||
tooltip = true;
|
||||
interval = 1800;
|
||||
exec = "python3 $HOME/.config/waybar/scripts/wttr.py";
|
||||
return-type = "json";
|
||||
};
|
||||
|
||||
"pulseaudio" = {
|
||||
# scroll-step = 1; # %, can be a float
|
||||
reverse-scrolling = 1;
|
||||
format = "{volume}% {icon} {format_source}";
|
||||
format-bluetooth = "{volume}% {icon} {format_source}";
|
||||
format-bluetooth-muted = " {icon} {format_source}";
|
||||
format-muted = " {format_source}";
|
||||
format-source = "{volume}% ";
|
||||
format-source-muted = "";
|
||||
format-icons = {
|
||||
headphone = "";
|
||||
hands-free = "";
|
||||
headset = "";
|
||||
phone = "";
|
||||
portable = "";
|
||||
car = "";
|
||||
default = ["" "" ""];
|
||||
};
|
||||
on-click = "alacritty --class pulsemixer -e pulsemixer";
|
||||
min-length = 13;
|
||||
};
|
||||
|
||||
"custom/mem" = {
|
||||
format = "{} ";
|
||||
interval = 3;
|
||||
exec = "free -h | awk '/Mem:/{printf $3}'";
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
"cpu" = {
|
||||
interval = 2;
|
||||
format = "{usage}% ";
|
||||
min-length = 6;
|
||||
};
|
||||
|
||||
"temperature" = {
|
||||
# thermal-zone = 2;
|
||||
# hwmon-path = "/sys/class/hwmon/hwmon2/temp1_input";
|
||||
critical-threshold = 80;
|
||||
# format-critical = "{temperatureC}°C {icon}";
|
||||
format = "{temperatureC}°C {icon}";
|
||||
format-icons = ["" "" "" "" ""];
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
"network" = {
|
||||
format = "{ifname}";
|
||||
format-wifi = "{essid} ({signalStrength}%) ";
|
||||
format-ethernet = "{ifname} ";
|
||||
format-disconnected = "";
|
||||
tooltip-format = "{ifname}";
|
||||
tooltip-format-wifi = "{essid} ({signalStrength}%) ";
|
||||
tooltip-format-ethernet = "{ifname} ";
|
||||
tooltip-format-disconnected = "Disconnected";
|
||||
max-length = 50;
|
||||
on-click = "alacritty --class nmtui -e sh -c nmtui";
|
||||
};
|
||||
|
||||
"backlight" = {
|
||||
device = "intel_backlight";
|
||||
format = "{percent}% {icon}";
|
||||
format-icons = [""];
|
||||
min-length = 7;
|
||||
};
|
||||
|
||||
battery = {
|
||||
states = {
|
||||
warning = 30;
|
||||
critical = 15;
|
||||
};
|
||||
format = "{capacity}%";
|
||||
format-charging = "{capacity}% {time}";
|
||||
format-plugged = "{capacity}%";
|
||||
format-alt = "{time}";
|
||||
format-time = "{H}:{m}";
|
||||
};
|
||||
|
||||
mpris = {
|
||||
format = "{title}";
|
||||
format-len = "20";
|
||||
};
|
||||
|
||||
tray = {
|
||||
icon-size = 16;
|
||||
spacing = 0;
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
style = /*css*/
|
||||
''
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
/* `otf-font-awesome` is required to be installed for icons */
|
||||
font-family: JetBrains Mono;
|
||||
font-weight: bold;
|
||||
min-height: 20px;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
window#waybar.hidden {
|
||||
opacity: 0.2;
|
||||
}
|
||||
|
||||
#workspaces {
|
||||
margin-right: 8px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
transition: none;
|
||||
color: #${colors.base04};
|
||||
background: transparent;
|
||||
padding: 5px;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
#workspaces button.persistent {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
|
||||
#workspaces button:hover {
|
||||
transition: none;
|
||||
box-shadow: inherit;
|
||||
text-shadow: inherit;
|
||||
border-radius: inherit;
|
||||
color: #${colors.base05};
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
background: #${colors.base02};
|
||||
color: #${colors.base05};
|
||||
border-radius: inherit;
|
||||
}
|
||||
|
||||
#taskbar {
|
||||
border-radius: 10px;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#taskbar button {
|
||||
transition: none;
|
||||
background: transparent;
|
||||
border-radius: 10px;
|
||||
padding: 8px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
#taskbar button:hover {
|
||||
transition: none;
|
||||
box-shadow: inherit;
|
||||
text-shadow: inherit;
|
||||
border-radius: inherit;
|
||||
background: #${colors.base02};
|
||||
}
|
||||
|
||||
#taskbar button.active {
|
||||
background: #d197d9;
|
||||
}
|
||||
|
||||
#language {
|
||||
padding: 8px 0px 8px 8px;
|
||||
border-radius: 10px 0px 0px 10px;
|
||||
transition: none;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#keyboard-state {
|
||||
margin-right: 8px;
|
||||
padding: 8px 8px 8px 0px;
|
||||
border-radius: 0px 10px 10px 0px;
|
||||
transition: none;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#custom-pacman {
|
||||
padding-left: 16px;
|
||||
padding-right: 8px;
|
||||
border-radius: 10px 0px 0px 10px;
|
||||
transition: none;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#custom-mail {
|
||||
margin-right: 8px;
|
||||
padding-right: 16px;
|
||||
border-radius: 0px 10px 10px 0px;
|
||||
transition: none;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#submap {
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#clock {
|
||||
margin-right: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#network {
|
||||
margin-right: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#network.disconnected {
|
||||
color: #${colors.base00};
|
||||
background-color: #${colors.base08};
|
||||
}
|
||||
|
||||
#custom-weather {
|
||||
padding-right: 16px;
|
||||
border-radius: 0px 10px 10px 0px;
|
||||
transition: none;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
margin-right: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#pulseaudio.muted {
|
||||
background-color: #${colors.base08};
|
||||
color: #${colors.base01};
|
||||
}
|
||||
|
||||
#custom-mem {
|
||||
margin-right: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#cpu {
|
||||
margin-right: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#temperature {
|
||||
margin-right: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#temperature.critical {
|
||||
background-color: #${colors.base08};
|
||||
}
|
||||
|
||||
#backlight {
|
||||
margin-right: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#battery {
|
||||
margin-right: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#battery.charging {
|
||||
color: #${colors.base05};
|
||||
background-color: #${colors.base0B};
|
||||
}
|
||||
|
||||
#battery.warning:not(.charging) {
|
||||
background-color: #${colors.base09};
|
||||
color: black;
|
||||
}
|
||||
|
||||
#battery.critical:not(.charging) {
|
||||
background-color: #${colors.base08};
|
||||
color: #${colors.base05};
|
||||
animation-name: blink;
|
||||
animation-duration: 0.5s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
#tray {
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#mpris{
|
||||
background: #${colors.base00};
|
||||
border-radius: 10px;
|
||||
color: #${colors.base05};
|
||||
padding: 0px 8px;
|
||||
margin: 0px 8px;
|
||||
}
|
||||
|
||||
#mpris.playing {
|
||||
background-color: #${colors.base0B};
|
||||
color: #${colors.base01};
|
||||
}
|
||||
|
||||
#mpris.paused {
|
||||
background-color: #${colors.base0A};
|
||||
color: #${colors.base01};
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
to {
|
||||
background-color: #${colors.base05};
|
||||
color: #${colors.base00};
|
||||
}
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
{ pkgs, ... }: {
|
||||
xdg.configFile."wofi/style.css".source = pkgs.requireFile {
|
||||
xdg.configFile."wofi/style.css".source = pkgs.fetchurl {
|
||||
name = "style.css";
|
||||
url = "https://raw.githubusercontent.com/PaulGuerre/arch_dotfiles/main/wofi/style.css";
|
||||
sha256 = "16lr4j0nn6kpggr4wdz9s0jymqmn05vm7i4vsdslzp5vlarcv03j";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
tokens:
|
||||
apis:
|
||||
wallhaven: ENC[AES256_GCM,data:7vHkndUVda78lMscP25sAAxSjTcJ7a/Fb+Wu0NHtUG4=,iv:O9xJAYEwkX7RMoxOf6QHWt1wOaMAmTGzJkCBO/cGvXs=,tag:lwsWCtbC8NxMf11Sj1ifLw==,type:str]
|
||||
sops:
|
||||
kms: []
|
||||
gcp_kms: []
|
||||
azure_kv: []
|
||||
hc_vault: []
|
||||
age:
|
||||
- recipient: age1j3uuyax673fvl5x4dveupq3dylngnrq0e5uy7fmclsexkfd25vysk646wk
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBnbDl6ZWZpc2U2SnNYQVpJ
|
||||
cmtBRzVOZTdOaXd6MFFnTGFLbzBhNldlN25RCisyNnAwY21udlZCWEc4U2hPa2di
|
||||
WXN5cEduMXUwNXpmU0hBQzdkamtSd28KLS0tIHUzd3RTbUM4VnFYZkRYbXJCUDZl
|
||||
UkZPZUlLQVNUZ1ZGV3BZM3hib3JHMXcKqyQUcRMhoVHK78lAYl2vSJUCxBL6atLb
|
||||
VXT5DV67KKnUKyKUAQ+gjEP9EpvR16PBCZ+EcSFfx/azHONCtV3mZg==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2024-10-02T18:38:04Z"
|
||||
mac: ENC[AES256_GCM,data:xe8S8xpJtqd8ip5w7ZOWVSlkVEBpLVMSWCrJiz+bTd0Pgn5EVLtIro5JJu5hFbCspMj42sukuj0nI0fC/ryESm0eKwSzBQy0jGCr0jyd2Ie280Do4QYYasnoZ46GbhhHAxBLnr2FKHhZLS7dUzGp3nsgh1d3RAvf6hiB1GcYv5k=,iv:1DPhQgiwNzc8IUmgX6UMdK5sWzjP0pLJkEmRKJ5ol/U=,tag:LvieY4xTgy118/iOctRkOA==,type:str]
|
||||
pgp: []
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.9.0
|
||||
@@ -1,46 +0,0 @@
|
||||
{ config, ... }: {
|
||||
programs.zoxide.enable = true;
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
# enableAutosuggestions = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
|
||||
shellAliases =
|
||||
let
|
||||
flakeDir = "~/nix";
|
||||
in {
|
||||
rb = "sudo nixos-rebuild switch --flake ${flakeDir}";
|
||||
upd = "nix flake update ${flakeDir}";
|
||||
upg = "sudo nixos-rebuild switch --upgrade --flake ${flakeDir}";
|
||||
|
||||
hms = "home-manager switch --flake ${flakeDir}";
|
||||
|
||||
conf = "$EDITOR ${flakeDir}/nixos/hosts/$(hostname)/configuration.nix";
|
||||
pkgs = "$EDITOR ${flakeDir}/nixos/packages.nix";
|
||||
|
||||
ll = "ls -l";
|
||||
se = "sudoedit";
|
||||
ff = "fastfetch";
|
||||
cat = "bat";
|
||||
cd = "z";
|
||||
};
|
||||
|
||||
initExtra = ''
|
||||
if [ -z "''${WAYLAND_DISPLAY}" ] && [ "''${XDG_VTNR}" -eq 1 ]; then
|
||||
dbus-run-session Hyprland
|
||||
fi
|
||||
eval "$(zoxide init zsh)"
|
||||
'';
|
||||
|
||||
history.size = 10000;
|
||||
history.path = "${config.xdg.dataHome}/zsh/history";
|
||||
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
plugins = [ "git" "sudo" ];
|
||||
theme = "agnoster"; # blinks is also really nice
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,7 +1,15 @@
|
||||
{ pkgs, ... }: {
|
||||
imports = [
|
||||
./zsh.nix
|
||||
./modules/bundle.nix
|
||||
../../modules/bundle.nix
|
||||
|
||||
../../packages/coding.nix
|
||||
../../packages/desktop.nix
|
||||
../../packages/utils.nix
|
||||
|
||||
./modules/git.nix
|
||||
./modules/hyprland.nix
|
||||
./modules/style.nix
|
||||
./modules/waybar.nix
|
||||
];
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
@@ -10,44 +18,6 @@
|
||||
username = "sweetbread";
|
||||
homeDirectory = "/home/sweetbread";
|
||||
stateVersion = "23.11";
|
||||
|
||||
packages = with pkgs; [
|
||||
# Desktop apps
|
||||
google-chrome
|
||||
telegram-desktop
|
||||
vesktop
|
||||
obs-studio
|
||||
mpv
|
||||
obsidian
|
||||
vscode
|
||||
jetbrains.pycharm-community
|
||||
jetbrains.idea-community
|
||||
android-studio
|
||||
thunderbird
|
||||
|
||||
# Coding stuff
|
||||
cmake
|
||||
gnumake
|
||||
nodejs
|
||||
(python3.withPackages (ps: with ps; [ requests bpython ]))
|
||||
python311Packages.pip
|
||||
rocmPackages.llvm.clang-tools-extra
|
||||
rocmPackages.llvm.clang
|
||||
ncurses
|
||||
|
||||
# CLI utils
|
||||
scrot
|
||||
ffmpeg
|
||||
yt-dlp
|
||||
bat
|
||||
fd
|
||||
|
||||
# GUI utils
|
||||
feh
|
||||
imv
|
||||
gromit-mpx
|
||||
notify-desktop
|
||||
];
|
||||
};
|
||||
|
||||
services.syncthing.enable = true;
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
{ inputs, pkgs, ... }: {
|
||||
# imports = [ inputs.ags.homeManagerModules.default ];
|
||||
|
||||
programs.ags = {
|
||||
enable = true;
|
||||
|
||||
# null or path, leave as null if you don't want hm to manage the config
|
||||
configDir = ./ags;
|
||||
|
||||
# additional packages to add to gjs's runtime
|
||||
extraPackages = with pkgs; [
|
||||
gtksourceview
|
||||
webkitgtk
|
||||
accountsservice
|
||||
];
|
||||
};
|
||||
|
||||
# home.packages = [ pkgs.ags ];
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
# Simple Bar
|
||||
|
||||
setup
|
||||
|
||||
```bash
|
||||
mkdir -p ~/.config/ags
|
||||
git clone https://github.com/Aylur/ags.git /tmp/ags
|
||||
cp -r /tmp/ags/example/simple-bar/* ~/.config/ags
|
||||
|
||||
# optionally setup types
|
||||
ags --init -c ~/.config/ags/config.js
|
||||
```
|
||||
|
||||
running
|
||||
|
||||
```bash
|
||||
ags -c ~/.config/ags/config.js &
|
||||
```
|
||||
@@ -1,219 +0,0 @@
|
||||
const hyprland = await Service.import("hyprland")
|
||||
const notifications = await Service.import("notifications")
|
||||
const mpris = await Service.import("mpris")
|
||||
const audio = await Service.import("audio")
|
||||
const battery = await Service.import("battery")
|
||||
const systemtray = await Service.import("systemtray")
|
||||
|
||||
const date = Variable("", {
|
||||
poll: [1000, 'date "+%H:%M:%S %b %e."'],
|
||||
})
|
||||
|
||||
// widgets can be only assigned as a child in one container
|
||||
// so to make a reuseable widget, make it a function
|
||||
// then you can simply instantiate one by calling it
|
||||
|
||||
function Workspaces() {
|
||||
const activeId = hyprland.active.workspace.bind("id")
|
||||
const workspaces = hyprland.bind("workspaces")
|
||||
.as(ws => ws.map(({ id }) => Widget.Button({
|
||||
on_clicked: () => hyprland.messageAsync(`dispatch workspace ${id}`),
|
||||
child: Widget.Label(`${id}`),
|
||||
class_name: activeId.as(i => `${i === id ? "focused" : ""}`),
|
||||
})))
|
||||
|
||||
return Widget.Box({
|
||||
class_name: "workspaces",
|
||||
children: workspaces,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
function ClientTitle() {
|
||||
return Widget.Label({
|
||||
class_name: "client-title",
|
||||
label: hyprland.active.client.bind("title"),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
function Clock() {
|
||||
return Widget.Label({
|
||||
class_name: "clock",
|
||||
label: date.bind(),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// we don't need dunst or any other notification daemon
|
||||
// because the Notifications module is a notification daemon itself
|
||||
function Notification() {
|
||||
const popups = notifications.bind("popups")
|
||||
return Widget.Box({
|
||||
class_name: "notification",
|
||||
visible: popups.as(p => p.length > 0),
|
||||
children: [
|
||||
Widget.Icon({
|
||||
icon: "preferences-system-notifications-symbolic",
|
||||
}),
|
||||
Widget.Label({
|
||||
label: popups.as(p => p[0]?.summary || ""),
|
||||
}),
|
||||
],
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
function Media() {
|
||||
const label = Utils.watch("", mpris, "player-changed", () => {
|
||||
if (mpris.players[0]) {
|
||||
const { track_artists, track_title } = mpris.players[0]
|
||||
return `${track_artists.join(", ")} - ${track_title}`
|
||||
} else {
|
||||
return "Nothing is playing"
|
||||
}
|
||||
})
|
||||
|
||||
return Widget.Button({
|
||||
class_name: "media",
|
||||
on_primary_click: () => mpris.getPlayer("")?.playPause(),
|
||||
on_scroll_up: () => mpris.getPlayer("")?.next(),
|
||||
on_scroll_down: () => mpris.getPlayer("")?.previous(),
|
||||
child: Widget.Label({ label }),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
function Volume() {
|
||||
const icons = {
|
||||
101: "overamplified",
|
||||
67: "high",
|
||||
34: "medium",
|
||||
1: "low",
|
||||
0: "muted",
|
||||
}
|
||||
|
||||
function getIcon() {
|
||||
const icon = audio.speaker.is_muted ? 0 : [101, 67, 34, 1, 0].find(
|
||||
threshold => threshold <= audio.speaker.volume * 100)
|
||||
|
||||
return `audio-volume-${icons[icon]}-symbolic`
|
||||
}
|
||||
|
||||
const icon = Widget.Icon({
|
||||
icon: Utils.watch(getIcon(), audio.speaker, getIcon),
|
||||
})
|
||||
|
||||
const slider = Widget.Slider({
|
||||
hexpand: true,
|
||||
draw_value: false,
|
||||
on_change: ({ value }) => audio.speaker.volume = value,
|
||||
setup: self => self.hook(audio.speaker, () => {
|
||||
self.value = audio.speaker.volume || 0
|
||||
}),
|
||||
})
|
||||
|
||||
return Widget.Box({
|
||||
class_name: "volume",
|
||||
css: "min-width: 180px",
|
||||
children: [icon, slider],
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
function BatteryLabel() {
|
||||
const value = battery.bind("percent").as(p => p > 0 ? p / 100 : 0)
|
||||
const icon = battery.bind("percent").as(p =>
|
||||
`battery-level-${Math.floor(p / 10) * 10}-symbolic`)
|
||||
|
||||
return Widget.Box({
|
||||
class_name: "battery",
|
||||
visible: battery.bind("available"),
|
||||
children: [
|
||||
Widget.Icon({ icon }),
|
||||
Widget.LevelBar({
|
||||
widthRequest: 140,
|
||||
vpack: "center",
|
||||
value,
|
||||
}),
|
||||
],
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
function SysTray() {
|
||||
const items = systemtray.bind("items")
|
||||
.as(items => items.map(item => Widget.Button({
|
||||
child: Widget.Icon({ icon: item.bind("icon") }),
|
||||
on_primary_click: (_, event) => item.activate(event),
|
||||
on_secondary_click: (_, event) => item.openMenu(event),
|
||||
tooltip_markup: item.bind("tooltip_markup"),
|
||||
})))
|
||||
|
||||
return Widget.Box({
|
||||
children: items,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// layout of the bar
|
||||
function Left() {
|
||||
return Widget.Box({
|
||||
spacing: 8,
|
||||
children: [
|
||||
Workspaces(),
|
||||
ClientTitle(),
|
||||
],
|
||||
})
|
||||
}
|
||||
|
||||
function Center() {
|
||||
return Widget.Box({
|
||||
spacing: 8,
|
||||
children: [
|
||||
Media(),
|
||||
Notification(),
|
||||
],
|
||||
})
|
||||
}
|
||||
|
||||
function Right() {
|
||||
return Widget.Box({
|
||||
hpack: "end",
|
||||
spacing: 8,
|
||||
children: [
|
||||
Volume(),
|
||||
BatteryLabel(),
|
||||
Clock(),
|
||||
SysTray(),
|
||||
],
|
||||
})
|
||||
}
|
||||
|
||||
function Bar(monitor = 0) {
|
||||
return Widget.Window({
|
||||
name: `bar-${monitor}`, // name has to be unique
|
||||
class_name: "bar",
|
||||
monitor,
|
||||
anchor: ["top", "left", "right"],
|
||||
exclusivity: "exclusive",
|
||||
child: Widget.CenterBox({
|
||||
start_widget: Left(),
|
||||
center_widget: Center(),
|
||||
end_widget: Right(),
|
||||
}),
|
||||
})
|
||||
}
|
||||
|
||||
App.config({
|
||||
style: "./style.css",
|
||||
windows: [
|
||||
Bar(),
|
||||
|
||||
// you can call it, for each monitor
|
||||
// Bar(0),
|
||||
// Bar(1)
|
||||
],
|
||||
})
|
||||
|
||||
export { }
|
||||
@@ -1,40 +0,0 @@
|
||||
window.bar {
|
||||
background-color: @theme_bg_color;
|
||||
color: @theme_fg_color;
|
||||
}
|
||||
|
||||
button {
|
||||
min-width: 0;
|
||||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
button:active {
|
||||
background-color: @theme_selected_bg_color;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
border-bottom: 3px solid @theme_fg_color;
|
||||
}
|
||||
|
||||
label {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.workspaces button.focused {
|
||||
border-bottom: 3px solid @theme_selected_bg_color;
|
||||
}
|
||||
|
||||
.client-title {
|
||||
color: @theme_selected_bg_color;
|
||||
}
|
||||
|
||||
.notification {
|
||||
color: yellow;
|
||||
}
|
||||
|
||||
levelbar block,
|
||||
highlight {
|
||||
min-height: 10px;
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
{
|
||||
imports = [
|
||||
./git.nix
|
||||
./kitty.nix
|
||||
./qt.nix
|
||||
./sops.nix
|
||||
./style.nix
|
||||
./neofetch.nix
|
||||
./syncthing.nix
|
||||
./yazi.nix
|
||||
./ags.nix
|
||||
|
||||
./wms/hyprland.nix
|
||||
./wms/waybar.nix
|
||||
./wms/wofi.nix
|
||||
./wms/mako.nix
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
{ pkgs, lib, config, ... }: {
|
||||
imports = [(
|
||||
import ../../../patterns/hyprland.nix {
|
||||
inherit lib;
|
||||
inherit pkgs;
|
||||
inherit config;
|
||||
collection = "sweetbread/1764377";
|
||||
swww_flags = "--transition-type center";
|
||||
}
|
||||
)];
|
||||
|
||||
wayland.windowManager.hyprland = let
|
||||
colors = config.lib.stylix.colors;
|
||||
in {
|
||||
settings = {
|
||||
monitor = [
|
||||
"DP-3, 3440x1440@165.00Hz, auto-right, 1"
|
||||
# "HDMI-A-1, 3840x2160@60.00Hz, auto-left, 2"
|
||||
"HDMI-A-1, disabled"
|
||||
",preferred,auto,1"
|
||||
];
|
||||
|
||||
general = {
|
||||
gaps_in = 5;
|
||||
gaps_out = 20;
|
||||
border_size = 3;
|
||||
"col.active_border" = "rgba(${colors.base0C}ee) rgba(${colors.base0B}ee) 45deg";
|
||||
"col.inactive_border" = "rgba(${colors.base05}aa)";
|
||||
|
||||
layout = "dwindle";
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 10;
|
||||
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 16;
|
||||
passes = 2;
|
||||
new_optimizations = true;
|
||||
};
|
||||
|
||||
drop_shadow = true;
|
||||
shadow_range = 4;
|
||||
shadow_render_power = 3;
|
||||
"col.shadow" = "rgba(1a1a1aee)";
|
||||
};
|
||||
|
||||
animations = {
|
||||
enabled = true;
|
||||
|
||||
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
|
||||
|
||||
animation = [
|
||||
"windows, 1, 7, myBezier"
|
||||
"windowsOut, 1, 7, default, popin 80%"
|
||||
"border, 1, 10, default"
|
||||
"borderangle, 1, 8, default"
|
||||
"fade, 1, 7, default"
|
||||
"workspaces, 1, 6, default"
|
||||
];
|
||||
};
|
||||
|
||||
dwindle = {
|
||||
pseudotile = true;
|
||||
smart_split = true;
|
||||
};
|
||||
|
||||
master.new_status = "master";
|
||||
|
||||
gestures = {
|
||||
workspace_swipe = true;
|
||||
workspace_swipe_fingers = 3;
|
||||
workspace_swipe_invert = true;
|
||||
workspace_swipe_distance = 200;
|
||||
workspace_swipe_forever = true;
|
||||
};
|
||||
|
||||
misc = {
|
||||
animate_manual_resizes = true;
|
||||
animate_mouse_windowdragging = true;
|
||||
enable_swallow = true;
|
||||
render_ahead_of_time = false;
|
||||
disable_hyprland_logo = false;
|
||||
};
|
||||
|
||||
bind = [
|
||||
" , Print, exec, grimblast --notify copy output"
|
||||
"CTRL, Print, exec, grimblast --notify copy area"
|
||||
"ALT , Print, exec, grimblast --notify copy active"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
{ lib, pkgs, ... }: {
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
settings = lib.mkDefault {
|
||||
dynamic_background_opacity = "yes";
|
||||
background_opacity = 0.5;
|
||||
background_blur = true;
|
||||
background = "#1d2021";
|
||||
font_size = 13.0;
|
||||
cursor_blink_interval = "0.5 ease-in-out";
|
||||
};
|
||||
};
|
||||
programs.zsh.envExtra = "TERM=xterm-256color";
|
||||
}
|
||||
@@ -1,122 +0,0 @@
|
||||
{ config, pkgs, ... }: let
|
||||
icon = pkgs.fetchurl {
|
||||
url = "https://preview.redd.it/a2nga4jvjy291.png?width=640&crop=smart&auto=webp&s=7d1458b41101c960bc13c28a6b92c5a6ddc20210";
|
||||
name = "nixos-chan.png";
|
||||
sha256 = "sha256-9pleL+PiiylT8/aWw0iGve1iY3h0XohSQ7MVILzabHY=";
|
||||
};
|
||||
in {
|
||||
home.packages = [ pkgs.neofetch ];
|
||||
xdg.configFile."neofetch/config.conf".text = ''
|
||||
print_info() {
|
||||
info title
|
||||
info underline
|
||||
|
||||
prin "Hardware"
|
||||
info "- Host" model
|
||||
info "- Resolution" resolution
|
||||
info "- CPU" cpu
|
||||
info "- GPU" gpu gpu_driver
|
||||
info "- Memory" memory
|
||||
info "- Disk" disk
|
||||
info "- Battery" battery
|
||||
|
||||
echo
|
||||
prin "Software"
|
||||
|
||||
info "- OS" distro kernel
|
||||
# info "- Uptime" uptime
|
||||
info "- Packages" packages
|
||||
info "- Shell" shell
|
||||
prin "- Prompt" "Starship"
|
||||
info "- Terminal" term
|
||||
info "- DE" de
|
||||
info "- WM" wm
|
||||
|
||||
echo
|
||||
prin "Style"
|
||||
info "- WM Theme" wm_theme
|
||||
info "- Theme" theme
|
||||
prin "- Base16 Theme" "${baseNameOf config.stylix.base16Scheme}"
|
||||
info "- Icons" icons
|
||||
info "- Terminal Font" term_font
|
||||
info "- Font" font
|
||||
|
||||
# info "- Song" song
|
||||
[[ "$player" ]] && prin "- Music Player" "$player"
|
||||
# info "- Local IP" local_ip
|
||||
# info "- Public IP" public_ip
|
||||
# info "- Users" users
|
||||
info "- Locale" locale # This only works on glibc systems.
|
||||
|
||||
info cols
|
||||
}
|
||||
|
||||
title_fqdn="on"
|
||||
kernel_shorthand="on"
|
||||
distro_shorthand="on"
|
||||
os_arch="on"
|
||||
uptime_shorthand="on"
|
||||
memory_percent="off"
|
||||
memory_unit="mib"
|
||||
package_managers="on"
|
||||
shell_path="off"
|
||||
shell_version="on"
|
||||
speed_type="bios_limit"
|
||||
speed_shorthand="on"
|
||||
cpu_brand="on"
|
||||
cpu_speed="on"
|
||||
cpu_cores="logical"
|
||||
cpu_temp="off"
|
||||
gpu_brand="on"
|
||||
gpu_type="all"
|
||||
refresh_rate="on"
|
||||
gtk_shorthand="off"
|
||||
gtk2="on"
|
||||
gtk3="on"
|
||||
public_ip_host="http://ident.me"
|
||||
local_ip_interface=('auto')
|
||||
de_version="on"
|
||||
disk_show=('/' '/mnt/D')
|
||||
disk_subtitle="mount"
|
||||
disk_percent="on"
|
||||
music_player="auto"
|
||||
song_format="%artist% - %album% - %title%"
|
||||
song_shorthand="off"
|
||||
mpc_args=()
|
||||
colors=(distro)
|
||||
bold="on"
|
||||
underline_enabled="on"
|
||||
underline_char="-"
|
||||
separator=":"
|
||||
block_range=(0 15)
|
||||
color_blocks="on"
|
||||
block_width=3
|
||||
block_height=1
|
||||
col_offset="auto"
|
||||
bar_char_elapsed="="
|
||||
bar_char_total="."
|
||||
bar_border="on"
|
||||
bar_length=15
|
||||
bar_color_elapsed="distro"
|
||||
bar_color_total="distro"
|
||||
memory_display="infobar"
|
||||
battery_display="off"
|
||||
disk_display="infobar"
|
||||
image_backend="kitty"
|
||||
image_source=${icon}
|
||||
ascii_distro="auto"
|
||||
ascii_colors=(distro)
|
||||
ascii_bold="on"
|
||||
image_loop="off"
|
||||
thumbnail_dir="${config.xdg.cacheHome}/thumbnails/neofetch"
|
||||
crop_mode="normal"
|
||||
crop_offset="center"
|
||||
image_size="auto"
|
||||
catimg_size="2"
|
||||
gap=3
|
||||
yoffset=0
|
||||
xoffset=0
|
||||
background_color=
|
||||
stdout="off"
|
||||
'';
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme = "qtct";
|
||||
style.name = "kvantum";
|
||||
};
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
{ config, ... }: {
|
||||
sops = {
|
||||
defaultSopsFile = ../secrets.yaml;
|
||||
age.keyFile = "/home/sweetbread/.config/sops/age/keys.txt";
|
||||
|
||||
secrets."tokens/apis/wallhaven" = {};
|
||||
};
|
||||
}
|
||||
@@ -4,6 +4,7 @@
|
||||
targets = {
|
||||
hyprland.enable = false;
|
||||
waybar.enable = false;
|
||||
kitty.variant256Colors = true;
|
||||
};
|
||||
|
||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
services.syncthing.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{ pkgs, config, ... }: {
|
||||
imports = [(
|
||||
import ../../../patterns/waybar.nix {
|
||||
inherit pkgs;
|
||||
inherit config;
|
||||
active_color = "#${config.lib.stylix.colors.base0B}";
|
||||
}
|
||||
)];
|
||||
}
|
||||
@@ -1,313 +0,0 @@
|
||||
{ pkgs, lib, config, ... }: {
|
||||
home.packages = with pkgs; [
|
||||
swww
|
||||
kitty
|
||||
waybar
|
||||
pamixer
|
||||
wofi
|
||||
clipse
|
||||
grimblast
|
||||
xclip
|
||||
clipnotify
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland =
|
||||
let
|
||||
colors = config.lib.stylix.colors;
|
||||
|
||||
wallpaper_changer = pkgs.writers.writePython3Bin "wallpaper_changer" {
|
||||
flakeIgnore = [ "E501" "E111" "E701" "E241" "E731" ];
|
||||
} /*py*/ ''
|
||||
import requests as requests
|
||||
from random import choice
|
||||
from os import system, mkdir, listdir
|
||||
from os.path import exists
|
||||
|
||||
notify = lambda s: system(f"notify-desktop Wallpaper '{s}'")
|
||||
folder = "/home/sweetbread/Wallpapers"
|
||||
url = "https://wallhaven.cc/api/v1/collections/sweetbread/1764377"
|
||||
with open("${config.sops.secrets."tokens/apis/wallhaven".path}") as f:
|
||||
token = f.read()
|
||||
|
||||
notify("Updating wallpaper!")
|
||||
|
||||
try:
|
||||
json = requests.get(url, params={'apikey': token}).json()
|
||||
|
||||
wallpaper = choice(json['data'])
|
||||
link = wallpaper['path']
|
||||
format = wallpaper['file_type']
|
||||
id = wallpaper['id']
|
||||
|
||||
if format == "image/jpeg": ext = "jpg"
|
||||
else: ext = "png"
|
||||
|
||||
filename = f"{id}.{ext}"
|
||||
|
||||
if not exists(f"{folder}/{filename}"):
|
||||
if not exists(folder):
|
||||
mkdir(f"{folder}")
|
||||
|
||||
notify("Downloading...")
|
||||
with open(f"{folder}/{filename}", 'wb') as f:
|
||||
r = requests.get(link)
|
||||
f.write(r.content)
|
||||
|
||||
except requests.exceptions.ConnectionError:
|
||||
notify("Offline mode")
|
||||
filename = choice(listdir(folder))
|
||||
|
||||
finally:
|
||||
system(f"swww img {folder}/{filename} --transition-type center")
|
||||
'';
|
||||
|
||||
clipsync = pkgs.writers.writeBash "clipsync" ''
|
||||
while clipnotify; do
|
||||
xclip -q -sel clip -t image/png -o > /dev/null && \
|
||||
xclip -sel clip -t image/png -o | wl-copy
|
||||
xclip -q -sel clip -o > /dev/null && \
|
||||
xclip -sel clip -o | wl-copy
|
||||
done
|
||||
'';
|
||||
in {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
|
||||
plugins = with pkgs.hyprlandPlugins; [
|
||||
hyprbars
|
||||
];
|
||||
|
||||
settings = {
|
||||
"$mainMod" = "SUPER";
|
||||
|
||||
monitor = [
|
||||
"DP-3, 3440x1440@165.00Hz, auto-right, 1"
|
||||
# "HDMI-A-1, 3840x2160@60.00Hz, auto-left, 2"
|
||||
"HDMI-A-1, disabled"
|
||||
",preferred,auto,1"
|
||||
];
|
||||
|
||||
env = [
|
||||
"LIBVA_DRIVER_NAME,nvidia"
|
||||
"XDG_SESSION_TYPE,wayland"
|
||||
"GBM_BACKEND,nvidia"
|
||||
"__GLX_VENDOR_LIBRARY_NAME,nvidia"
|
||||
"WLR_NO_HARDWARE_CURSORS,1"
|
||||
"XDG_CURRENT_DESKTOP,Hyprland"
|
||||
"XDG_SESSION_TYPE,wayland"
|
||||
"XDG_SESSION_DESKTOP,Hyprland"
|
||||
"XCURSOR_SIZE,36"
|
||||
"QT_QPA_PLATFORM,wayland"
|
||||
"XDG_SCREENSHOTS_DIR,~/screens"
|
||||
];
|
||||
|
||||
debug = {
|
||||
disable_logs = false;
|
||||
enable_stdout_logs = true;
|
||||
};
|
||||
|
||||
input = {
|
||||
kb_layout = "us,ru";
|
||||
kb_variant = "lang";
|
||||
kb_options = "grp:caps_toggle";
|
||||
|
||||
follow_mouse = 1;
|
||||
|
||||
touchpad = {
|
||||
natural_scroll = false;
|
||||
};
|
||||
|
||||
sensitivity = 0; # -1.0 - 1.0, 0 means no modification.
|
||||
};
|
||||
|
||||
general = {
|
||||
gaps_in = 5;
|
||||
gaps_out = 20;
|
||||
border_size = 3;
|
||||
"col.active_border" = "rgba(${colors.base0C}ee) rgba(${colors.base0B}ee) 45deg";
|
||||
"col.inactive_border" = "rgba(${colors.base05}aa)";
|
||||
|
||||
layout = "dwindle";
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 10;
|
||||
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 16;
|
||||
passes = 2;
|
||||
new_optimizations = true;
|
||||
};
|
||||
|
||||
drop_shadow = true;
|
||||
shadow_range = 4;
|
||||
shadow_render_power = 3;
|
||||
"col.shadow" = "rgba(1a1a1aee)";
|
||||
};
|
||||
|
||||
animations = {
|
||||
enabled = true;
|
||||
|
||||
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
|
||||
# bezier = "myBezier, 0.33, 0.82, 0.9, -0.08";
|
||||
|
||||
animation = [
|
||||
"windows, 1, 7, myBezier"
|
||||
"windowsOut, 1, 7, default, popin 80%"
|
||||
"border, 1, 10, default"
|
||||
"borderangle, 1, 8, default"
|
||||
"fade, 1, 7, default"
|
||||
"workspaces, 1, 6, default"
|
||||
];
|
||||
};
|
||||
|
||||
dwindle = {
|
||||
pseudotile = true; # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||
smart_split = true;
|
||||
};
|
||||
|
||||
master = {
|
||||
new_status = "master";
|
||||
};
|
||||
|
||||
gestures = {
|
||||
workspace_swipe = true;
|
||||
workspace_swipe_fingers = 3;
|
||||
workspace_swipe_invert = true;
|
||||
workspace_swipe_distance = 200;
|
||||
workspace_swipe_forever = true;
|
||||
};
|
||||
|
||||
misc = {
|
||||
animate_manual_resizes = true;
|
||||
animate_mouse_windowdragging = true;
|
||||
enable_swallow = true;
|
||||
render_ahead_of_time = false;
|
||||
disable_hyprland_logo = false;
|
||||
};
|
||||
|
||||
windowrule = [
|
||||
"float, ^(imv)$"
|
||||
"float, ^(feh)$"
|
||||
"float, ^(mpv)$"
|
||||
"float, ^(nmtui)$"
|
||||
"float, title:^(Список друзей)"
|
||||
];
|
||||
|
||||
windowrulev2 = [
|
||||
"float, class:(clipse)"
|
||||
"size 622 652, class:(clipse)"
|
||||
];
|
||||
|
||||
exec-once = [
|
||||
"systemctl --user start plasma-polkit-agent"
|
||||
"swww init"
|
||||
"python3 ${lib.getExe wallpaper_changer}"
|
||||
"waybar"
|
||||
"${clipsync}"
|
||||
"clipse -listen"
|
||||
];
|
||||
|
||||
bind = [
|
||||
"$mainMod, V, exec, kitty --class clipse -e clipse "
|
||||
|
||||
"$mainMod, Return, exec, kitty"
|
||||
"$mainMod, Q, killactive,"
|
||||
"$mainMod, M, exit,"
|
||||
"$mainMod, E, exec, kitty -e sh -c yazi"
|
||||
"$mainMod, F, togglefloating,"
|
||||
"$mainMod, D, exec, wofi --show drun"
|
||||
"$mainMod, P, pseudo, # dwindle"
|
||||
"$mainMod, J, togglesplit, # dwindle"
|
||||
|
||||
# Move focus with mainMod + arrow keys
|
||||
"$mainMod, left, movefocus, l"
|
||||
"$mainMod, right, movefocus, r"
|
||||
"$mainMod, up, movefocus, u"
|
||||
"$mainMod, down, movefocus, d"
|
||||
|
||||
# Moving windows
|
||||
"$mainMod SHIFT, left, swapwindow, l"
|
||||
"$mainMod SHIFT, right, swapwindow, r"
|
||||
"$mainMod SHIFT, up, swapwindow, u"
|
||||
"$mainMod SHIFT, down, swapwindow, d"
|
||||
|
||||
# Window resizing X Y
|
||||
"$mainMod CTRL, left, resizeactive, -60 0"
|
||||
"$mainMod CTRL, right, resizeactive, 60 0"
|
||||
"$mainMod CTRL, up, resizeactive, 0 -60"
|
||||
"$mainMod CTRL, down, resizeactive, 0 60"
|
||||
|
||||
# Switch workspaces with mainMod + [0-9]
|
||||
"$mainMod, 1, workspace, 1"
|
||||
"$mainMod, 2, workspace, 2"
|
||||
"$mainMod, 3, workspace, 3"
|
||||
"$mainMod, 4, workspace, 4"
|
||||
"$mainMod, 5, workspace, 5"
|
||||
"$mainMod, 6, workspace, 6"
|
||||
"$mainMod, 7, workspace, 7"
|
||||
"$mainMod, 8, workspace, 8"
|
||||
"$mainMod, 9, workspace, 9"
|
||||
"$mainMod, 0, workspace, 10"
|
||||
|
||||
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||
"$mainMod SHIFT, 1, movetoworkspacesilent, 1"
|
||||
"$mainMod SHIFT, 2, movetoworkspacesilent, 2"
|
||||
"$mainMod SHIFT, 3, movetoworkspacesilent, 3"
|
||||
"$mainMod SHIFT, 4, movetoworkspacesilent, 4"
|
||||
"$mainMod SHIFT, 5, movetoworkspacesilent, 5"
|
||||
"$mainMod SHIFT, 6, movetoworkspacesilent, 6"
|
||||
"$mainMod SHIFT, 7, movetoworkspacesilent, 7"
|
||||
"$mainMod SHIFT, 8, movetoworkspacesilent, 8"
|
||||
"$mainMod SHIFT, 9, movetoworkspacesilent, 9"
|
||||
"$mainMod SHIFT, 0, movetoworkspacesilent, 10"
|
||||
|
||||
"$mainMod SHIFT, F, fullscreen"
|
||||
|
||||
# Scroll through existing workspaces with mainMod + scroll
|
||||
"$mainMod, mouse_down, workspace, e+1"
|
||||
"$mainMod, mouse_up, workspace, e-1"
|
||||
|
||||
# Keyboard backlight
|
||||
"$mainMod, F3, exec, brightnessctl -d *::kbd_backlight set +33%"
|
||||
"$mainMod, F2, exec, brightnessctl -d *::kbd_backlight set 33%-"
|
||||
|
||||
# Volume and Media Control
|
||||
", XF86AudioRaiseVolume, exec, pamixer -i 5 "
|
||||
", XF86AudioLowerVolume, exec, pamixer -d 5 "
|
||||
", XF86AudioMute, exec, pamixer -t"
|
||||
", XF86AudioMicMute, exec, pamixer --default-source -m"
|
||||
|
||||
# Brightness control
|
||||
", XF86MonBrightnessDown, exec, brightnessctl set 5%- "
|
||||
", XF86MonBrightnessUp, exec, brightnessctl set +5% "
|
||||
|
||||
# Configuration files
|
||||
''$mainMod ALT, N, exec, kitty -e sh -c "rb"''
|
||||
''$mainMod ALT, C, exec, kitty -e sh -c "conf"''
|
||||
''$mainMod ALT, H, exec, kitty -e sh -c "$EDITOR ~/nix/home-manager/modules/wms/hyprland.nix"''
|
||||
''$mainMod ALT, W, exec, kitty -e sh -c "$EDITOR ~/nix/home-manager/modules/wms/waybar.nix"''
|
||||
|
||||
" , Print, exec, grimblast --notify copy output"
|
||||
"CTRL, Print, exec, grimblast --notify copy area"
|
||||
"ALT , Print, exec, grimblast --notify copy active"
|
||||
|
||||
# Waybar
|
||||
"$mainMod, B, exec, pkill -SIGUSR1 waybar"
|
||||
#"$mainMod, W, exec, pkill -SIGUSR2 waybar"
|
||||
|
||||
"$mainMod, W, exec, python3 ${lib.getExe wallpaper_changer}"
|
||||
|
||||
# Disable all effects
|
||||
"$mainMod Shift, G, exec, ~/.config/hypr/gamemode.sh "
|
||||
];
|
||||
|
||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
bindm = [
|
||||
"$mainMod, mouse:272, movewindow"
|
||||
"$mainMod, mouse:273, resizewindow"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
colors = config.lib.stylix.colors;
|
||||
in {
|
||||
home.packages = [ pkgs.mako ];
|
||||
xdg.configFile."mako/config".text = ''
|
||||
background-color=#${colors.base00}
|
||||
text-color=#${colors.base05}
|
||||
border-color=#${colors.base0B}
|
||||
border-radius=10
|
||||
margin=16
|
||||
progress-color=over #${colors.base0A}
|
||||
default-timeout=5000
|
||||
|
||||
[urgency=high]
|
||||
border-color=#${colors.base09}
|
||||
|
||||
[urgency=low]
|
||||
border-color=#${colors.base04}
|
||||
'';
|
||||
}
|
||||
@@ -1,455 +0,0 @@
|
||||
{ pkgs, config, ...}: {
|
||||
home.packages = [ pkgs.pulsemixer ];
|
||||
wayland.windowManager.hyprland.settings.windowrule = [
|
||||
"float, ^(pulsemixer)"
|
||||
"float, ^(nmtui)"
|
||||
];
|
||||
|
||||
xdg.configFile."waybar/scripts/wttr.py".source = pkgs.requireFile {
|
||||
name = "waybar-wttr.py";
|
||||
url = "https://gist.githubusercontent.com/bjesus/f8db49e1434433f78e5200dc403d58a3/raw/47f9ffd573dc8e8edce0ea6708601b8e685a70ab/waybar-wttr.py";
|
||||
sha256 = "15j2cqg405q37wrrlm70mhp7rx6xnrn92rfm1ix6g3nl98ksh45g";
|
||||
};
|
||||
|
||||
programs.waybar =
|
||||
let
|
||||
colors = config.lib.stylix.colors;
|
||||
in {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
mainBar = {
|
||||
layer = "top";
|
||||
position = "top";
|
||||
margin = "9 13 -10 18";
|
||||
|
||||
modules-left = ["hyprland/workspaces" "hyprland/language" "keyboard-state" "hyprland/submap"];
|
||||
modules-center = ["mpris" "wlr/taskbar"];
|
||||
modules-right = ["group/system" "battery" "pulseaudio" "clock" "tray"];
|
||||
|
||||
"hyprland/workspaces" = {
|
||||
disable-scroll = true;
|
||||
};
|
||||
|
||||
"wlr/taskbar" = {
|
||||
on-click = "activate";
|
||||
on-click-middle = "close";
|
||||
on-click-right = "minimize";
|
||||
};
|
||||
|
||||
"group/system" = {
|
||||
orientation = "inherit";
|
||||
drawer = {
|
||||
transition-duration = 500;
|
||||
transition-left-to-right = false;
|
||||
};
|
||||
modules = [
|
||||
"network"
|
||||
"custom/mem"
|
||||
"cpu"
|
||||
"temperature"
|
||||
"backlight"
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
"hyprland/language" = {
|
||||
format-en = "US";
|
||||
format-ru = "RU";
|
||||
min-length = 5;
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
"keyboard-state" = {
|
||||
capslock = true;
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
locked = "CUPS";
|
||||
unlocked = "";
|
||||
};
|
||||
};
|
||||
|
||||
"clock" = {
|
||||
tooltip = false;
|
||||
format = "{:%a, %d %b %R}";
|
||||
};
|
||||
|
||||
"custom/weather" = {
|
||||
format = "{}";
|
||||
tooltip = true;
|
||||
interval = 1800;
|
||||
exec = "python3 $HOME/.config/waybar/scripts/wttr.py";
|
||||
return-type = "json";
|
||||
};
|
||||
|
||||
"pulseaudio" = {
|
||||
# scroll-step = 1; # %, can be a float
|
||||
reverse-scrolling = 1;
|
||||
format = "{volume}% {icon} {format_source}";
|
||||
format-bluetooth = "{volume}% {icon} {format_source}";
|
||||
format-bluetooth-muted = " {icon} {format_source}";
|
||||
format-muted = " {format_source}";
|
||||
format-source = "{volume}% ";
|
||||
format-source-muted = "";
|
||||
format-icons = {
|
||||
headphone = "";
|
||||
hands-free = "";
|
||||
headset = "";
|
||||
phone = "";
|
||||
portable = "";
|
||||
car = "";
|
||||
default = ["" "" ""];
|
||||
};
|
||||
on-click = "kitty --class pulsemixer -e pulsemixer";
|
||||
min-length = 13;
|
||||
};
|
||||
|
||||
"custom/mem" = {
|
||||
format = "{} ";
|
||||
interval = 3;
|
||||
exec = "free -h | awk '/Mem:/{printf $3}'";
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
"cpu" = {
|
||||
interval = 2;
|
||||
format = "{usage}% ";
|
||||
min-length = 6;
|
||||
};
|
||||
|
||||
"temperature" = {
|
||||
# thermal-zone = 2;
|
||||
# hwmon-path = "/sys/class/hwmon/hwmon2/temp1_input";
|
||||
critical-threshold = 80;
|
||||
# format-critical = "{temperatureC}°C {icon}";
|
||||
format = "{temperatureC}°C {icon}";
|
||||
format-icons = ["" "" "" "" ""];
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
"network" = {
|
||||
format = "{ifname}";
|
||||
format-wifi = "{essid} ({signalStrength}%) ";
|
||||
format-ethernet = "{ifname} ";
|
||||
format-disconnected = "";
|
||||
tooltip-format = "{ifname}";
|
||||
tooltip-format-wifi = "{essid} ({signalStrength}%) ";
|
||||
tooltip-format-ethernet = "{ifname} ";
|
||||
tooltip-format-disconnected = "Disconnected";
|
||||
max-length = 50;
|
||||
on-click = "kitty --class nmtui -e sh -c nmtui";
|
||||
};
|
||||
|
||||
"backlight" = {
|
||||
device = "intel_backlight";
|
||||
format = "{percent}% {icon}";
|
||||
format-icons = [""];
|
||||
min-length = 7;
|
||||
};
|
||||
|
||||
battery = {
|
||||
states = {
|
||||
warning = 30;
|
||||
critical = 15;
|
||||
};
|
||||
format = "{capacity}%";
|
||||
format-charging = "{capacity}% {time}";
|
||||
format-plugged = "{capacity}%";
|
||||
format-alt = "{time}";
|
||||
format-time = "{H}:{m}";
|
||||
};
|
||||
|
||||
mpris = {
|
||||
format = "{title}";
|
||||
format-len = "20";
|
||||
};
|
||||
|
||||
tray = {
|
||||
icon-size = 16;
|
||||
spacing = 0;
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
style = /*css*/
|
||||
''
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
/* `otf-font-awesome` is required to be installed for icons */
|
||||
font-family: JetBrains Mono;
|
||||
font-weight: bold;
|
||||
min-height: 20px;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
window#waybar.hidden {
|
||||
opacity: 0.2;
|
||||
}
|
||||
|
||||
#workspaces {
|
||||
margin-right: 8px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
transition: none;
|
||||
color: #${colors.base04};
|
||||
background: transparent;
|
||||
padding: 5px;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
#workspaces button.persistent {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
|
||||
#workspaces button:hover {
|
||||
transition: none;
|
||||
box-shadow: inherit;
|
||||
text-shadow: inherit;
|
||||
border-radius: inherit;
|
||||
color: #${colors.base05};
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
background: #${colors.base02};
|
||||
color: #${colors.base05};
|
||||
border-radius: inherit;
|
||||
}
|
||||
|
||||
#taskbar {
|
||||
border-radius: 10px;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#taskbar button {
|
||||
transition: none;
|
||||
background: transparent;
|
||||
border-radius: 10px;
|
||||
padding: 8px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
#taskbar button:hover {
|
||||
transition: none;
|
||||
box-shadow: inherit;
|
||||
text-shadow: inherit;
|
||||
border-radius: inherit;
|
||||
background: #${colors.base02};
|
||||
}
|
||||
|
||||
#taskbar button.active {
|
||||
background: #${colors.base0B};
|
||||
}
|
||||
|
||||
#language {
|
||||
padding: 8px 0px 8px 8px;
|
||||
border-radius: 10px 0px 0px 10px;
|
||||
transition: none;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#keyboard-state {
|
||||
margin-right: 8px;
|
||||
padding: 8px 8px 8px 0px;
|
||||
border-radius: 0px 10px 10px 0px;
|
||||
transition: none;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#custom-pacman {
|
||||
padding-left: 16px;
|
||||
padding-right: 8px;
|
||||
border-radius: 10px 0px 0px 10px;
|
||||
transition: none;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#custom-mail {
|
||||
margin-right: 8px;
|
||||
padding-right: 16px;
|
||||
border-radius: 0px 10px 10px 0px;
|
||||
transition: none;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#submap {
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#clock {
|
||||
margin-right: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#network {
|
||||
margin-right: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#network.disconnected {
|
||||
color: #${colors.base00};
|
||||
background-color: #${colors.base08};
|
||||
}
|
||||
|
||||
#custom-weather {
|
||||
padding-right: 16px;
|
||||
border-radius: 0px 10px 10px 0px;
|
||||
transition: none;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
margin-right: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#pulseaudio.muted {
|
||||
background-color: #${colors.base08};
|
||||
color: #${colors.base01};
|
||||
}
|
||||
|
||||
#custom-mem {
|
||||
margin-right: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#cpu {
|
||||
margin-right: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#temperature {
|
||||
margin-right: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#temperature.critical {
|
||||
background-color: #${colors.base08};
|
||||
}
|
||||
|
||||
#backlight {
|
||||
margin-right: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#battery {
|
||||
margin-right: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#battery.charging {
|
||||
color: #${colors.base05};
|
||||
background-color: #${colors.base0B};
|
||||
}
|
||||
|
||||
#battery.warning:not(.charging) {
|
||||
background-color: #${colors.base09};
|
||||
color: black;
|
||||
}
|
||||
|
||||
#battery.critical:not(.charging) {
|
||||
background-color: #${colors.base08};
|
||||
color: #${colors.base05};
|
||||
animation-name: blink;
|
||||
animation-duration: 0.5s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
#tray {
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#mpris{
|
||||
background: #${colors.base00};
|
||||
border-radius: 10px;
|
||||
color: #${colors.base05};
|
||||
padding: 0px 8px;
|
||||
margin: 0px 8px;
|
||||
}
|
||||
|
||||
#mpris.playing {
|
||||
background-color: #${colors.base0B};
|
||||
color: #${colors.base01};
|
||||
}
|
||||
|
||||
#mpris.paused {
|
||||
background-color: #${colors.base0A};
|
||||
color: #${colors.base01};
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
to {
|
||||
background-color: #${colors.base05};
|
||||
color: #${colors.base00};
|
||||
}
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{ pkgs, ... }: {
|
||||
xdg.configFile."wofi/style.css".source = pkgs.fetchurl {
|
||||
name = "style.css";
|
||||
url = "https://github.com/joao-vitor-sr/wofi-themes-collection/raw/main/themes/nord.css";
|
||||
sha256 = "sha256-rMDtE7Q0hmqd9LD+Ur/QR6cMan9ev6e9IyzpwY367c0=";
|
||||
};
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
{ pkgs, lib, ... }: let
|
||||
yazi-plugins = pkgs.fetchFromGitHub {
|
||||
owner = "yazi-rs";
|
||||
repo = "plugins";
|
||||
rev = "c5785059611624e20a37ba573620f30acc28a26a";
|
||||
hash = "sha256-wlSBtabIsEUJhuHmXwgpSnwZp9WaVQFBg6s1XXjubrE=";
|
||||
};
|
||||
in {
|
||||
programs.yazi = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
shellWrapperName = "y";
|
||||
|
||||
settings = {
|
||||
manager = {
|
||||
show_hidden = true;
|
||||
};
|
||||
preview = {
|
||||
max_width = 1000;
|
||||
max_height = 1000;
|
||||
};
|
||||
};
|
||||
|
||||
plugins = {
|
||||
chmod = "${yazi-plugins}/chmod.yazi";
|
||||
full-border = "${yazi-plugins}/full-border.yazi";
|
||||
max-preview = "${yazi-plugins}/max-preview.yazi";
|
||||
starship = pkgs.fetchFromGitHub {
|
||||
owner = "Rolv-Apneseth";
|
||||
repo = "starship.yazi";
|
||||
rev = "77a65f5a367f833ad5e6687261494044006de9c3";
|
||||
sha256 = "sha256-sAB0958lLNqqwkpucRsUqLHFV/PJYoJL2lHFtfHDZF8=";
|
||||
};
|
||||
};
|
||||
|
||||
initLua = ''
|
||||
require("full-border"):setup()
|
||||
require("starship"):setup()
|
||||
'';
|
||||
|
||||
keymap = {
|
||||
manager.prepend_keymap = [
|
||||
{
|
||||
on = "T";
|
||||
run = "plugin --sync max-preview";
|
||||
desc = "Maximize or restore the preview pane";
|
||||
}
|
||||
{
|
||||
on = ["c" "m"];
|
||||
run = "plugin chmod";
|
||||
desc = "Chmod on selected files";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
{ config, pkgs, ... }: {
|
||||
home.packages = [ pkgs.nh ];
|
||||
programs = {
|
||||
zoxide.enable = true;
|
||||
fzf.enable = true;
|
||||
|
||||
starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
|
||||
settings = {
|
||||
add_newline = true;
|
||||
format = ''
|
||||
$os$directory$git_branch$git_status
|
||||
$status$character
|
||||
'';
|
||||
right_format = "$all";
|
||||
|
||||
cmake.disabled = true;
|
||||
cmd_duration = {
|
||||
format = "";
|
||||
show_notifications = true;
|
||||
notification_timeout = 10000;
|
||||
};
|
||||
git_branch.format = "on [$branch(:$remote_branch)]($style) ";
|
||||
git_metrics.disabled = false;
|
||||
git_status = {
|
||||
conflicted = "!";
|
||||
up_to_date = "ok";
|
||||
stashed = "S";
|
||||
modified = "M";
|
||||
};
|
||||
directory = {
|
||||
truncation_length = 3;
|
||||
fish_style_pwd_dir_length = 1;
|
||||
read_only = " RO";
|
||||
};
|
||||
os.disabled = false;
|
||||
python = {
|
||||
symbol = "py ";
|
||||
python_binary = ["python3" "python"];
|
||||
};
|
||||
status.disabled = false;
|
||||
};
|
||||
};
|
||||
|
||||
zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
|
||||
shellAliases =
|
||||
let
|
||||
flakeDir = "~/nix";
|
||||
in {
|
||||
rb = "nh os switch ${flakeDir}";
|
||||
upd = "nix flake update ${flakeDir}";
|
||||
upg = "sudo nixos-rebuild switch --upgrade --flake ${flakeDir}";
|
||||
|
||||
hms = "nh home switch ${flakeDir}";
|
||||
|
||||
conf = "$EDITOR ${flakeDir}/nixos/hosts/$(hostname)/configuration.nix";
|
||||
pkgs = "$EDITOR ${flakeDir}/nixos/packages.nix";
|
||||
|
||||
ll = "ls -l";
|
||||
se = "sudoedit";
|
||||
ff = "fastfetch";
|
||||
cat = "bat";
|
||||
cd = "z";
|
||||
};
|
||||
|
||||
initExtra = ''
|
||||
if [ -z "''${WAYLAND_DISPLAY}" ] && [ "''${XDG_VTNR}" -eq 1 ]; then
|
||||
dbus-run-session Hyprland
|
||||
fi
|
||||
eval "$(zoxide init zsh)"
|
||||
eval "$(nh completions --shell zsh)"
|
||||
source "$(fzf-share)/key-bindings.zsh"
|
||||
source "$(fzf-share)/completion.zsh"
|
||||
'';
|
||||
|
||||
history.size = 10000;
|
||||
history.path = "${config.xdg.dataHome}/zsh/history";
|
||||
|
||||
oh-my-zsh.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user