Compare commits
No commits in common. "8e34b7d8f31e529ff9d4d3fb18ac4de256a255b9" and "17410678000f1fd465c97433e2d2d198d16d54ff" have entirely different histories.
8e34b7d8f3
...
1741067800
Binary file not shown.
Before Width: | Height: | Size: 1006 KiB |
@ -10,8 +10,6 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
hyprland.url = "github:hyprwm/Hyprland"; # packages hyprland
|
hyprland.url = "github:hyprwm/Hyprland"; # packages hyprland
|
||||||
|
|
||||||
# stylix.url = "github:danth/stylix";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = attrs @ { self, nixpkgs, home-manager, hyprland, ... }: {
|
outputs = attrs @ { self, nixpkgs, home-manager, hyprland, ... }: {
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
./kitty.nix
|
./kitty.nix
|
||||||
./librewolf.nix
|
./librewolf.nix
|
||||||
./neovim.nix
|
./neovim.nix
|
||||||
./swaylock.nix
|
|
||||||
./waybar.nix
|
./waybar.nix
|
||||||
./xcursor.nix
|
./xcursor.nix
|
||||||
./xresources.nix
|
./xresources.nix
|
||||||
|
@ -13,11 +13,6 @@
|
|||||||
gtk-xft-rgba = "rgb";
|
gtk-xft-rgba = "rgb";
|
||||||
gtk-recent-files-enable = false;
|
gtk-recent-files-enable = false;
|
||||||
};
|
};
|
||||||
gtk4.extraConfig = {
|
|
||||||
Settings = ''
|
|
||||||
gtk-application-prefer-dark-theme=1
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
iconTheme = {
|
iconTheme = {
|
||||||
package = pkgs.fluent-icon-theme;
|
package = pkgs.fluent-icon-theme;
|
||||||
name = "Fluent-dark";
|
name = "Fluent-dark";
|
||||||
|
@ -8,16 +8,12 @@ in {
|
|||||||
env = XDG_SESSION_DESKTOP,hyprland
|
env = XDG_SESSION_DESKTOP,hyprland
|
||||||
env = GDK_BACKEND,wayland
|
env = GDK_BACKEND,wayland
|
||||||
env = QT_QPA_PLATFORM,wayland
|
env = QT_QPA_PLATFORM,wayland
|
||||||
|
|
||||||
monitor=eDP-1,1920x1080@60.096001,0x0,1
|
|
||||||
|
|
||||||
general {
|
general {
|
||||||
gaps_in = 0
|
gaps_in = 1
|
||||||
gaps_out = -1
|
gaps_out = 1
|
||||||
border_size = 0
|
border_size = 1
|
||||||
col.active_border = rgba(002B36ee) 45deg
|
layout = master
|
||||||
col.inactive_border = rgba(07364299)
|
|
||||||
layout = dwindle
|
|
||||||
}
|
}
|
||||||
|
|
||||||
input {
|
input {
|
||||||
@ -34,69 +30,17 @@ in {
|
|||||||
repeat_delay = 300
|
repeat_delay = 300
|
||||||
}
|
}
|
||||||
|
|
||||||
decoration {
|
|
||||||
rounding = 10
|
|
||||||
blur = yes
|
|
||||||
blur_size = 3
|
|
||||||
blur_passes = 1
|
|
||||||
blur_new_optimizations = on
|
|
||||||
drop_shadow = yes
|
|
||||||
shadow_range = 4
|
|
||||||
col.shadow = rgba(1a1a1aee)
|
|
||||||
}
|
|
||||||
|
|
||||||
# animations {
|
|
||||||
# enabled = true
|
|
||||||
# bezier = myBezier, 0.05, 0.9, 0.1, 1.05
|
|
||||||
# animation = windows, 1, 7, myBezier
|
|
||||||
# animation = windowsOut, 1, 7, default, popin 80%
|
|
||||||
# animation = workspace, 1, 6, default
|
|
||||||
# animation = border, 1, 10, default
|
|
||||||
# animation = borderangle, 1, 8, default
|
|
||||||
# animation = fade, 1, 7, default
|
|
||||||
# }
|
|
||||||
|
|
||||||
dwindle {
|
|
||||||
preserve_split = yes
|
|
||||||
# pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
|
||||||
}
|
|
||||||
|
|
||||||
master {
|
master {
|
||||||
new_is_master = true
|
new_is_master = no
|
||||||
new_on_top = no
|
new_on_top = no
|
||||||
}
|
mfact = 0.65
|
||||||
|
special_scale_factor = 1
|
||||||
misc {
|
|
||||||
disable_hyprland_logo = true
|
|
||||||
disable_splash_rendering = true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
exec-once = waybar
|
exec-once = waybar
|
||||||
exec-once = sleep 0.1; swww init && swww img ${../assets/wallpaper_street.jpg}
|
|
||||||
|
|
||||||
$SUPER = ${modifier}
|
|
||||||
$SUPER_SHIFT = ${modifier}_SHIFT
|
|
||||||
$SUPER_ALT = ${modifier}_ALT
|
|
||||||
|
|
||||||
bind = $SUPER, Q, killactive
|
|
||||||
bind = $SUPER, T, exec, kitty
|
|
||||||
bind = $SUPER, B, exec, librewolf
|
|
||||||
bind = $SUPER, F, fullscreen,1
|
|
||||||
bind = $SUPER_SHIFT, F, fullscreen,0
|
|
||||||
bind = $SUPER_SHIFT, H, splitratio, -0.05
|
|
||||||
bind = $SUPER_SHIFT, L, splitratio, +0.05
|
|
||||||
# bind = $SUPER, V, togglesplit,
|
|
||||||
|
|
||||||
# Move/resize windows with super + LMB/RMB and dragging
|
|
||||||
bindm = $SUPER, mouse:272, movewindow
|
|
||||||
bindm = $SUPER, mouse:273, resizewindow
|
|
||||||
|
|
||||||
# Change volume with keys
|
|
||||||
bindl=, XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && notify-send -t 2000 "Muted" "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
|
|
||||||
bindl=, XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+ && notify-send -t 2000 "Raised volume to" "$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | tail -c 3)%"
|
|
||||||
bindl=, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- && notify-send -t 2000 "Lowered volume to" "$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | tail -c 3)%"
|
|
||||||
bindl=, XF86MonBrightnessDown, exec, brightnessctl set 5%- && notify-send -t 2000 "Decreased brightness to" "$(brightnessctl get)"
|
|
||||||
bindl=, XF86MonBrightnessUp, exec, brightnessctl set +5% && notify-send -t 2000 "Increased brightness to" "$(brightnessctl get)"
|
|
||||||
|
|
||||||
|
$SUPER = ${modifier};
|
||||||
|
bind = $SUPER, Q, exec, kitty
|
||||||
|
bind = $SUPER, F, exec, librewolf
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
@ -1,20 +1,5 @@
|
|||||||
{
|
{
|
||||||
programs.kitty = {
|
programs.kitty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
|
||||||
enable_audio_bell = false;
|
|
||||||
close_on_child_death = true;
|
|
||||||
cursor_blink_interval = 0;
|
|
||||||
|
|
||||||
open_url_with = "librewolf";
|
|
||||||
wayland_titlebar_color = "background";
|
|
||||||
|
|
||||||
allow_remote_control = true;
|
|
||||||
listen_on = "unix:/tmp/kitty";
|
|
||||||
dynamic_background_opacity = true;
|
|
||||||
|
|
||||||
window_padding_width = 5;
|
|
||||||
tab_bar_margin_width = 5;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,21 +0,0 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
programs.swaylock = {
|
|
||||||
package = pkgs."swaylock-effects";
|
|
||||||
|
|
||||||
settings = {
|
|
||||||
show-keyboard-layout = true;
|
|
||||||
daemonize = true;
|
|
||||||
effect-blur = "20x2";
|
|
||||||
clock = true;
|
|
||||||
indicator = true;
|
|
||||||
font-size = 25;
|
|
||||||
indicator-radius = 85;
|
|
||||||
indicator-thickness = 16;
|
|
||||||
screenshots = true;
|
|
||||||
fade-in = 1;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
520
home/waybar.nix
520
home/waybar.nix
@ -4,212 +4,390 @@
|
|||||||
{
|
{
|
||||||
"layer": "top",
|
"layer": "top",
|
||||||
"position": "top",
|
"position": "top",
|
||||||
"height": 20,
|
"mod": "dock",
|
||||||
"exclusive": true,
|
"exclusive": true,
|
||||||
"passthrough": false,
|
"passthrough": false,
|
||||||
"gtk-layer-shell": true,
|
"gtk-layer-shell": true,
|
||||||
|
"height": 0,
|
||||||
"modules-left": [
|
"modules-left": [
|
||||||
"temperature",
|
"clock",
|
||||||
"cpu",
|
"custom/weather",
|
||||||
"memory"
|
"wlr/workspaces"
|
||||||
],
|
],
|
||||||
"modules-center": ["hyprland/window"],
|
"modules-center": ["hyprland/window"],
|
||||||
"modules-right": [
|
"modules-right": [
|
||||||
|
"tray",
|
||||||
|
"custom/updates",
|
||||||
|
"custom/language",
|
||||||
"battery",
|
"battery",
|
||||||
"clock"
|
"backlight",
|
||||||
|
"pulseaudio",
|
||||||
|
"pulseaudio#microphone"
|
||||||
],
|
],
|
||||||
|
|
||||||
"hyprland/window": {
|
"hyprland/window": {
|
||||||
"format": "{}"
|
"format": "{}"
|
||||||
},
|
},
|
||||||
|
"wlr/workspaces": {
|
||||||
|
"disable-scroll": true,
|
||||||
|
"all-outputs": true,
|
||||||
|
"on-click": "activate",
|
||||||
|
//"format": "{icon}",
|
||||||
|
"persistent_workspaces": {
|
||||||
|
"1": [],
|
||||||
|
"2": [],
|
||||||
|
"3": [],
|
||||||
|
"4": [],
|
||||||
|
"5": [],
|
||||||
|
"6": [],
|
||||||
|
"7": [],
|
||||||
|
"8": [],
|
||||||
|
"9": [],
|
||||||
|
"10": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"custom/updates": {
|
||||||
|
"format": " {}",
|
||||||
|
"interval": 7200, // every two hours
|
||||||
|
"exec": "i=$(checkupdates); echo \"$i\" |wc -l; echo \"$i\" |column -t |tr '\n' '\r'", // # of updates and tooltip details
|
||||||
|
"exec-if": "exit 0", // always run; consider advanced run conditions
|
||||||
|
"on-click": "kitty -e sudo pacman -Syu", // update system
|
||||||
|
"signal": 8
|
||||||
|
},
|
||||||
|
"custom/weather" : {
|
||||||
|
"tooltip" : true,
|
||||||
|
"format" : "{}",
|
||||||
|
"interval" : 30,
|
||||||
|
"exec" : "~/.config/waybar/waybar-wttr.py",
|
||||||
|
"return-type" : "json"
|
||||||
|
},
|
||||||
|
"tray": {
|
||||||
|
"icon-size": 13,
|
||||||
|
"spacing": 10
|
||||||
|
},
|
||||||
"clock": {
|
"clock": {
|
||||||
"format": "{:%H:%M}",
|
"format": "{: %R %d/%m}",
|
||||||
"format-alt": "{:%b %d %Y}",
|
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>"
|
||||||
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
|
|
||||||
},
|
},
|
||||||
"cpu": {
|
"backlight": {
|
||||||
"interval": 10,
|
"device": "intel_backlight",
|
||||||
"format": " {}%",
|
"format": "{icon} {percent}%",
|
||||||
"max-length": 10,
|
"format-icons": ["", "", ""],
|
||||||
"on-click": "",
|
"on-scroll-up": "brightnessctl set 1%+",
|
||||||
},
|
"on-scroll-down": "brightnessctl set 1%-",
|
||||||
"memory": {
|
"min-length": 6
|
||||||
"interval": 30,
|
|
||||||
"format": " {}%",
|
|
||||||
"format-alt":" {used:0.1f}GB",
|
|
||||||
"max-length": 10,
|
|
||||||
},
|
|
||||||
"temperature": {
|
|
||||||
"interval": 10,
|
|
||||||
"format": " {temperatureC}°C",
|
|
||||||
"format-alt":"temprature",
|
|
||||||
"max-length": 10,
|
|
||||||
},
|
},
|
||||||
"battery": {
|
"battery": {
|
||||||
"bat": "BAT0",
|
"states": {
|
||||||
"adapter": "ADP0",
|
"good": 95,
|
||||||
"interval": 60,
|
"warning": 30,
|
||||||
"states": {
|
"critical": 20
|
||||||
"warning": 30,
|
},
|
||||||
"critical": 15
|
"format": "{icon} {capacity}%",
|
||||||
},
|
"format-charging": " {capacity}%",
|
||||||
"max-length": 20,
|
"format-plugged": " {capacity}%",
|
||||||
"format": "{icon}",
|
"format-alt": "{time} {icon}",
|
||||||
"format-warning": "{icon}",
|
"format-icons": ["", "", "", "", "", "", "", "", "", "", ""]
|
||||||
"format-critical": "{icon}",
|
|
||||||
"format-charging": "<span font-family='Font Awesome 6 Free'></span>",
|
|
||||||
"format-plugged": "",
|
|
||||||
"format-notcharging": "",
|
|
||||||
"format-alt": "{icon}<small> {time}</small>",
|
|
||||||
"format-full": "",
|
|
||||||
"format-icons": ["", "", ""]
|
|
||||||
},
|
},
|
||||||
|
"pulseaudio": {
|
||||||
|
"format": "{icon} {volume}%",
|
||||||
|
"tooltip": false,
|
||||||
|
"format-muted": " Muted",
|
||||||
|
"on-click": "pamixer -t",
|
||||||
|
"on-scroll-up": "pamixer -i 5",
|
||||||
|
"on-scroll-down": "pamixer -d 5",
|
||||||
|
"scroll-step": 5,
|
||||||
|
"format-icons": {
|
||||||
|
"headphone": "",
|
||||||
|
"hands-free": "",
|
||||||
|
"headset": "",
|
||||||
|
"phone": "",
|
||||||
|
"portable": "",
|
||||||
|
"car": "",
|
||||||
|
"default": ["", "", ""]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pulseaudio#microphone": {
|
||||||
|
"format": "{format_source}",
|
||||||
|
"format-source": " {volume}%",
|
||||||
|
"format-source-muted": " Muted",
|
||||||
|
"on-click": "pamixer --default-source -t",
|
||||||
|
"on-scroll-up": "pamixer --default-source -i 5",
|
||||||
|
"on-scroll-down": "pamixer --default-source -d 5",
|
||||||
|
"scroll-step": 5
|
||||||
|
}
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
xdg.configFile."waybar/style.css".text = /* css */ ''
|
xdg.configFile."waybar/style.css".text = /* css */ ''
|
||||||
* {
|
* {
|
||||||
/* `otf-font-awesome` is required to be installed for icons */
|
border: none;
|
||||||
font-family: Material Design Icons, JetBrainsMono Nerd Font, Iosevka Nerd Font;
|
border-radius: 0;
|
||||||
font-size: 12px;
|
font-family: Cartograph CF Nerd Font, monospace;
|
||||||
border: none;
|
font-weight: bold;
|
||||||
border-radius: 0;
|
font-size: 14px;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
window#waybar {
|
window#waybar {
|
||||||
background-color: rgba(26, 27, 38, 0.5);
|
background: rgba(21, 18, 27, 0);
|
||||||
color: #ffffff;
|
color: #cdd6f4;
|
||||||
transition-property: background-color;
|
|
||||||
transition-duration: 0.5s;
|
|
||||||
}
|
|
||||||
|
|
||||||
window#waybar.hidden {
|
|
||||||
opacity: 0.1;
|
|
||||||
}
|
|
||||||
|
|
||||||
#window {
|
|
||||||
color: #64727d;
|
|
||||||
}
|
|
||||||
|
|
||||||
#clock,
|
|
||||||
#temperature,
|
|
||||||
#mpris,
|
|
||||||
#cpu,
|
|
||||||
#memory {
|
|
||||||
color: #e5e5e5;
|
|
||||||
border-radius: 6px;
|
|
||||||
padding: 2px 10px;
|
|
||||||
background-color: #252733;
|
|
||||||
border-radius: 8px;
|
|
||||||
font-size: 16px;
|
|
||||||
|
|
||||||
margin-left: 4px;
|
|
||||||
margin-right: 4px;
|
|
||||||
|
|
||||||
margin-top: 8.5px;
|
|
||||||
margin-bottom: 8.5px;
|
|
||||||
}
|
|
||||||
#temperature{
|
|
||||||
color: #7a95c9;
|
|
||||||
}
|
|
||||||
#cpu {
|
|
||||||
color: #fb958b;
|
|
||||||
}
|
|
||||||
|
|
||||||
#memory {
|
|
||||||
color: #a1c999;
|
|
||||||
}
|
|
||||||
|
|
||||||
#battery {
|
|
||||||
background-color: #252733;
|
|
||||||
padding: 0em 2em;
|
|
||||||
|
|
||||||
font-size: 14px;
|
|
||||||
|
|
||||||
padding-left: 7.5px;
|
|
||||||
padding-right: 7.5px;
|
|
||||||
|
|
||||||
padding-top: 3px;
|
|
||||||
padding-bottom: 3px;
|
|
||||||
|
|
||||||
margin-top: 7px;
|
|
||||||
margin-bottom: 7px;
|
|
||||||
|
|
||||||
font-size: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#battery {
|
|
||||||
color: #8fbcbb;
|
|
||||||
border-radius: 0px 8px 8px 0px;
|
|
||||||
padding-right: 2px;
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#battery.critical,
|
|
||||||
#battery.warning,
|
|
||||||
#battery.full,
|
|
||||||
#battery.plugged {
|
|
||||||
color: #8fbcbb;
|
|
||||||
padding-left: 6px;
|
|
||||||
padding-right: 12px;
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#battery.charging {
|
|
||||||
font-size: 18px;
|
|
||||||
padding-right: 13px;
|
|
||||||
padding-left: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#battery.full,
|
|
||||||
#battery.plugged {
|
|
||||||
font-size: 22.5px;
|
|
||||||
padding-right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes blink {
|
|
||||||
to {
|
|
||||||
background-color: rgba(30, 34, 42, 0.5);
|
|
||||||
color: #abb2bf;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#battery.warning {
|
|
||||||
color: #ecd3a0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#battery.critical:not(.charging) {
|
|
||||||
color: #fb958b;
|
|
||||||
}
|
|
||||||
|
|
||||||
#clock {
|
|
||||||
color: #8a909e;
|
|
||||||
font-weight: bold;
|
|
||||||
margin-top: 7px;
|
|
||||||
margin-bottom: 7px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tooltip {
|
tooltip {
|
||||||
font-family: Iosevka Nerd Font;
|
background: #1e1e2e;
|
||||||
border-radius: 15px;
|
border-radius: 10px;
|
||||||
padding: 15px;
|
border-width: 2px;
|
||||||
background-color: #1f232b;
|
border-style: solid;
|
||||||
|
border-color: #11111b;
|
||||||
}
|
}
|
||||||
|
|
||||||
tooltip label {
|
#workspaces button {
|
||||||
font-family: Iosevka Nerd Font;
|
padding: 5px;
|
||||||
padding: 5px;
|
color: #313244;
|
||||||
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
label:focus {
|
#workspaces button.active {
|
||||||
background-color: #1f232b;
|
color: #a6adc8;
|
||||||
}
|
}
|
||||||
|
|
||||||
#custom-wallpaper {
|
#workspaces button.focused {
|
||||||
color: #dbd9d8;
|
color: #a6adc8;
|
||||||
padding-right: 5;
|
background: #eba0ac;
|
||||||
padding-left: 0;
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.urgent {
|
||||||
|
color: #11111b;
|
||||||
|
background: #a6e3a1;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button:hover {
|
||||||
|
background: #11111b;
|
||||||
|
color: #cdd6f4;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-language,
|
||||||
|
#custom-updates,
|
||||||
|
#custom-caffeine,
|
||||||
|
#custom-weather,
|
||||||
|
#window,
|
||||||
|
#clock,
|
||||||
|
#battery,
|
||||||
|
#pulseaudio,
|
||||||
|
#network,
|
||||||
|
#workspaces,
|
||||||
|
#tray,
|
||||||
|
#backlight {
|
||||||
|
background: #1e1e2e;
|
||||||
|
padding: 0px 10px;
|
||||||
|
margin: 3px 0px;
|
||||||
|
margin-top: 10px;
|
||||||
|
border: 1px solid #181825;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tray {
|
||||||
|
border-radius: 10px;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces {
|
||||||
|
background: #1e1e2e;
|
||||||
|
border-radius: 10px;
|
||||||
|
margin-left: 10px;
|
||||||
|
padding-right: 0px;
|
||||||
|
padding-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-caffeine {
|
||||||
|
color: #89dceb;
|
||||||
|
border-radius: 10px 0px 0px 10px;
|
||||||
|
border-right: 0px;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-language {
|
||||||
|
color: #f38ba8;
|
||||||
|
border-left: 0px;
|
||||||
|
border-right: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-updates {
|
||||||
|
color: #f5c2e7;
|
||||||
|
border-radius: 10px 0px 0px 10px;
|
||||||
|
border-left: 0px;
|
||||||
|
border-right: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#window {
|
||||||
|
border-radius: 10px;
|
||||||
|
margin-left: 60px;
|
||||||
|
margin-right: 60px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock {
|
||||||
|
color: #fab387;
|
||||||
|
border-radius: 10px 0px 0px 10px;
|
||||||
|
margin-left: 5px;
|
||||||
|
border-right: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#network {
|
||||||
|
color: #f9e2af;
|
||||||
|
border-left: 0px;
|
||||||
|
border-right: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#pulseaudio {
|
||||||
|
color: #89b4fa;
|
||||||
|
border-left: 0px;
|
||||||
|
border-right: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#pulseaudio.microphone {
|
||||||
|
color: #cba6f7;
|
||||||
|
border-radius: 0px 10px 10px 0px;
|
||||||
|
border-left: 0px;
|
||||||
|
border-right: 0px;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery {
|
||||||
|
color: #a6e3a1;
|
||||||
|
border-radius: 0 10px 10px 0;
|
||||||
|
margin-right: 10px;
|
||||||
|
border-left: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-weather {
|
||||||
|
border-radius: 0px 10px 10px 0px;
|
||||||
|
border-right: 0px;
|
||||||
|
margin-left: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
'';
|
||||||
|
xdg.configFile."waybar/waybar-wttr.py".text = /* python */ ''
|
||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import json
|
||||||
|
import requests
|
||||||
|
from datetime import datetime
|
||||||
|
|
||||||
|
WEATHER_CODES = {
|
||||||
|
'113': '☀️ ',
|
||||||
|
'116': '⛅ ',
|
||||||
|
'119': '☁️ ',
|
||||||
|
'122': '☁️ ',
|
||||||
|
'143': '☁️ ',
|
||||||
|
'176': '🌧️',
|
||||||
|
'179': '🌧️',
|
||||||
|
'182': '🌧️',
|
||||||
|
'185': '🌧️',
|
||||||
|
'200': '⛈️ ',
|
||||||
|
'227': '🌨️',
|
||||||
|
'230': '🌨️',
|
||||||
|
'248': '☁️ ',
|
||||||
|
'260': '☁️ ',
|
||||||
|
'263': '🌧️',
|
||||||
|
'266': '🌧️',
|
||||||
|
'281': '🌧️',
|
||||||
|
'284': '🌧️',
|
||||||
|
'293': '🌧️',
|
||||||
|
'296': '🌧️',
|
||||||
|
'299': '🌧️',
|
||||||
|
'302': '🌧️',
|
||||||
|
'305': '🌧️',
|
||||||
|
'308': '🌧️',
|
||||||
|
'311': '🌧️',
|
||||||
|
'314': '🌧️',
|
||||||
|
'317': '🌧️',
|
||||||
|
'320': '🌨️',
|
||||||
|
'323': '🌨️',
|
||||||
|
'326': '🌨️',
|
||||||
|
'329': '❄️ ',
|
||||||
|
'332': '❄️ ',
|
||||||
|
'335': '❄️ ',
|
||||||
|
'338': '❄️ ',
|
||||||
|
'350': '🌧️',
|
||||||
|
'353': '🌧️',
|
||||||
|
'356': '🌧️',
|
||||||
|
'359': '🌧️',
|
||||||
|
'362': '🌧️',
|
||||||
|
'365': '🌧️',
|
||||||
|
'368': '🌧️',
|
||||||
|
'371': '❄️',
|
||||||
|
'374': '🌨️',
|
||||||
|
'377': '🌨️',
|
||||||
|
'386': '🌨️',
|
||||||
|
'389': '🌨️',
|
||||||
|
'392': '🌧️',
|
||||||
|
'395': '❄️ '
|
||||||
|
}
|
||||||
|
|
||||||
|
data = {}
|
||||||
|
|
||||||
|
|
||||||
|
weather = requests.get("https://wttr.in/?format=j1").json()
|
||||||
|
|
||||||
|
|
||||||
|
def format_time(time):
|
||||||
|
return time.replace("00", "").zfill(2)
|
||||||
|
|
||||||
|
|
||||||
|
def format_temp(temp):
|
||||||
|
return (hour['FeelsLikeF']+"°").ljust(3)
|
||||||
|
|
||||||
|
|
||||||
|
def format_chances(hour):
|
||||||
|
chances = {
|
||||||
|
"chanceoffog": "Fog",
|
||||||
|
"chanceoffrost": "Frost",
|
||||||
|
"chanceofovercast": "Overcast",
|
||||||
|
"chanceofrain": "Rain",
|
||||||
|
"chanceofsnow": "Snow",
|
||||||
|
"chanceofsunshine": "Sunshine",
|
||||||
|
"chanceofthunder": "Thunder",
|
||||||
|
"chanceofwindy": "Wind"
|
||||||
|
}
|
||||||
|
|
||||||
|
conditions = []
|
||||||
|
for event in chances.keys():
|
||||||
|
if int(hour[event]) > 0:
|
||||||
|
conditions.append(chances[event]+" "+hour[event]+"%")
|
||||||
|
return ", ".join(conditions)
|
||||||
|
|
||||||
|
tempint = int(weather['current_condition'][0]['FeelsLikeF'])
|
||||||
|
extrachar = ""
|
||||||
|
if tempint > 0 and tempint < 10:
|
||||||
|
extrachar = '+'
|
||||||
|
|
||||||
|
|
||||||
|
data['text'] = ' '+WEATHER_CODES[weather['current_condition'][0]['weatherCode']] + \
|
||||||
|
" "+extrachar+weather['current_condition'][0]['FeelsLikeF']+"°"
|
||||||
|
|
||||||
|
data['tooltip'] = f"<b>{weather['current_condition'][0]['weatherDesc'][0]['value']} {weather['current_condition'][0]['temp_C']}°</b>\n"
|
||||||
|
data['tooltip'] += f"Feels like: {weather['current_condition'][0]['FeelsLikeF']}°\n"
|
||||||
|
data['tooltip'] += f"Wind: {weather['current_condition'][0]['windspeedKmph']}Km/h\n"
|
||||||
|
data['tooltip'] += f"Humidity: {weather['current_condition'][0]['humidity']}%\n"
|
||||||
|
for i, day in enumerate(weather['weather']):
|
||||||
|
data['tooltip'] += f"\n<b>"
|
||||||
|
if i == 0:
|
||||||
|
data['tooltip'] += "Today, "
|
||||||
|
if i == 1:
|
||||||
|
data['tooltip'] += "Tomorrow, "
|
||||||
|
data['tooltip'] += f"{day['date']}</b>\n"
|
||||||
|
data['tooltip'] += f"⬆️ {day['maxtempF']}° ⬇️ {day['mintempF']}° "
|
||||||
|
data['tooltip'] += f"🌅 {day['astronomy'][0]['sunrise']} 🌇 {day['astronomy'][0]['sunset']}\n"
|
||||||
|
for hour in day['hourly']:
|
||||||
|
if i == 0:
|
||||||
|
if int(format_time(hour['time'])) < datetime.now().hour-2:
|
||||||
|
continue
|
||||||
|
data['tooltip'] += f"{format_time(hour['time'])} {WEATHER_CODES[hour['weatherCode']]} {format_temp(hour['FeelsLikeF'])} {hour['weatherDesc'][0]['value']}, {format_chances(hour)}\n"
|
||||||
|
|
||||||
|
|
||||||
|
print(json.dumps(data))
|
||||||
|
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
imports = [
|
imports = [
|
||||||
./boot.nix
|
./boot.nix
|
||||||
./fonts.nix
|
./fonts.nix
|
||||||
./greetd.nix
|
|
||||||
./home-manager.nix
|
./home-manager.nix
|
||||||
./locale.nix
|
./locale.nix
|
||||||
./hyprland.nix
|
./hyprland.nix
|
||||||
|
@ -18,9 +18,9 @@
|
|||||||
|
|
||||||
fontconfig = {
|
fontconfig = {
|
||||||
defaultFonts = {
|
defaultFonts = {
|
||||||
serif = [ "Noto Serif" ];
|
serif = [ "Noto Serif CJK JP" "Noto Serif" ];
|
||||||
sansSerif = [ "Noto Sans" ];
|
sansSerif = [ "Noto Sans CJK JP" "Noto Sans" ];
|
||||||
monospace = [ "Noto Mono" ];
|
monospace = [ "Noto Mono CJK JP" "Noto Mono" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
allowBitmaps = false;
|
allowBitmaps = false;
|
||||||
|
@ -1,21 +0,0 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
services.greetd = {
|
|
||||||
enable = true;
|
|
||||||
restart = false;
|
|
||||||
|
|
||||||
settings = {
|
|
||||||
default_session = {
|
|
||||||
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd Hyprland";
|
|
||||||
user = "greeter";
|
|
||||||
};
|
|
||||||
|
|
||||||
initial_session = {
|
|
||||||
command = "${pkgs.hyprland}/bin/Hyprland";
|
|
||||||
user = "stefan";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +1,8 @@
|
|||||||
{ config, pkgs, ... }: {
|
{ config, pkgs, ... }: {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
brightnessctl
|
|
||||||
git
|
git
|
||||||
neofetch
|
neofetch
|
||||||
swww
|
|
||||||
tree
|
tree
|
||||||
wget
|
wget
|
||||||
wl-clipboard
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -1,46 +0,0 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
theme = "monokai";
|
|
||||||
opacity = 0.95;
|
|
||||||
font-size = 11;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
stylix.image = ../assets/wallpaper.png;
|
|
||||||
stylix.polarity = "dark";
|
|
||||||
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/${theme}.yaml";
|
|
||||||
|
|
||||||
stylix.opacity = {
|
|
||||||
terminal = opacity;
|
|
||||||
popups = opacity;
|
|
||||||
};
|
|
||||||
|
|
||||||
stylix.fonts = {
|
|
||||||
serif = {
|
|
||||||
package = pkgs.noto-fonts-cjk-sans;
|
|
||||||
name = "Noto Sans CJK JP";
|
|
||||||
};
|
|
||||||
|
|
||||||
sansSerif = {
|
|
||||||
package = pkgs.noto-fonts-cjk-sans;
|
|
||||||
name = "Noto Sans CJK JP";
|
|
||||||
};
|
|
||||||
|
|
||||||
monospace = {
|
|
||||||
package = pkgs.maple-mono;
|
|
||||||
name = "Maple Mono";
|
|
||||||
};
|
|
||||||
|
|
||||||
emoji = {
|
|
||||||
package = pkgs.noto-fonts-emoji;
|
|
||||||
name = "Noto Color Emoji";
|
|
||||||
};
|
|
||||||
|
|
||||||
sizes = {
|
|
||||||
applications = font-size;
|
|
||||||
desktop = font-size;
|
|
||||||
popups = font-size;
|
|
||||||
terminal = font-size;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user