Compare commits
3 Commits
683bd41f4f
...
1741067800
Author | SHA1 | Date | |
---|---|---|---|
1741067800 | |||
19c4f11670 | |||
dfbab59b45 |
@ -4,10 +4,13 @@
|
|||||||
./bat.nix
|
./bat.nix
|
||||||
./dunst.nix
|
./dunst.nix
|
||||||
./git.nix
|
./git.nix
|
||||||
|
./gtk.nix
|
||||||
./hyprland.nix
|
./hyprland.nix
|
||||||
./kitty.nix
|
./kitty.nix
|
||||||
./librewolf.nix
|
./librewolf.nix
|
||||||
./neovim.nix
|
./neovim.nix
|
||||||
./waybar.nix
|
./waybar.nix
|
||||||
|
./xcursor.nix
|
||||||
|
./xresources.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -6,5 +6,23 @@
|
|||||||
package = pkgs.papirus-icon-theme;
|
package = pkgs.papirus-icon-theme;
|
||||||
name = "Papirus";
|
name = "Papirus";
|
||||||
};
|
};
|
||||||
|
settings = {
|
||||||
|
global = {
|
||||||
|
geometry = "1870x5-25+45";
|
||||||
|
width = 350;
|
||||||
|
separator_height = 5;
|
||||||
|
padding = 24;
|
||||||
|
horizontal_padding = 24;
|
||||||
|
frame_width = 3;
|
||||||
|
idle_threshold = 120;
|
||||||
|
alignment = "center";
|
||||||
|
word_wrap = "yes";
|
||||||
|
transparency = 5;
|
||||||
|
format = "<b>%s</b>: %b";
|
||||||
|
markup = "full";
|
||||||
|
min_icon_size = 32;
|
||||||
|
max_icon_size = 128;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
21
home/gtk.nix
Normal file
21
home/gtk.nix
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{ pkgs, ... }: {
|
||||||
|
gtk = {
|
||||||
|
enable = true;
|
||||||
|
cursorTheme = {
|
||||||
|
package = pkgs.phinger-cursors;
|
||||||
|
name = "phinger-cursors";
|
||||||
|
};
|
||||||
|
gtk3.extraConfig = {
|
||||||
|
gtk-decoration-layout = "menu";
|
||||||
|
gtk-xft-antialias = 1;
|
||||||
|
gtk-xft-hinting = 1;
|
||||||
|
gtk-xft-hintstyle = "hintfull";
|
||||||
|
gtk-xft-rgba = "rgb";
|
||||||
|
gtk-recent-files-enable = false;
|
||||||
|
};
|
||||||
|
iconTheme = {
|
||||||
|
package = pkgs.fluent-icon-theme;
|
||||||
|
name = "Fluent-dark";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -2,11 +2,17 @@
|
|||||||
modifier = "SUPER";
|
modifier = "SUPER";
|
||||||
in {
|
in {
|
||||||
xdg.configFile."hypr/hyprland.conf".text = ''
|
xdg.configFile."hypr/hyprland.conf".text = ''
|
||||||
|
|
||||||
|
env = XDG_CURRENT_DESKTOP,Hyprland
|
||||||
|
env = XDG_SESSION_TYPE,wayland
|
||||||
|
env = XDG_SESSION_DESKTOP,hyprland
|
||||||
|
env = GDK_BACKEND,wayland
|
||||||
|
env = QT_QPA_PLATFORM,wayland
|
||||||
|
|
||||||
general {
|
general {
|
||||||
gaps_in = 0
|
gaps_in = 1
|
||||||
gaps_out = -1
|
gaps_out = 1
|
||||||
border_size = 0
|
border_size = 1
|
||||||
layout = master
|
layout = master
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -31,7 +37,7 @@ in {
|
|||||||
special_scale_factor = 1
|
special_scale_factor = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
exec-once = waybar
|
||||||
|
|
||||||
$SUPER = ${modifier};
|
$SUPER = ${modifier};
|
||||||
bind = $SUPER, Q, exec, kitty
|
bind = $SUPER, Q, exec, kitty
|
||||||
|
618
home/waybar.nix
618
home/waybar.nix
@ -1,429 +1,393 @@
|
|||||||
{
|
{
|
||||||
|
|
||||||
xdg.configFile."waybar/config".text = /* json */ ''
|
xdg.configFile."waybar/config".text = /* json */ ''
|
||||||
|
|
||||||
{
|
{
|
||||||
"layer": "top",
|
"layer": "top",
|
||||||
"position": "bottom",
|
"position": "top",
|
||||||
"height": 35,
|
"mod": "dock",
|
||||||
"spacing": 4,
|
"exclusive": true,
|
||||||
"margin-top": 0,
|
"passthrough": false,
|
||||||
"margin-bottom":0,
|
"gtk-layer-shell": true,
|
||||||
|
"height": 0,
|
||||||
// Choose the order of the modules
|
"modules-left": [
|
||||||
|
"clock",
|
||||||
|
"custom/weather",
|
||||||
|
"wlr/workspaces"
|
||||||
|
],
|
||||||
|
"modules-center": ["hyprland/window"],
|
||||||
|
"modules-right": [
|
||||||
|
"tray",
|
||||||
|
"custom/updates",
|
||||||
|
"custom/language",
|
||||||
|
"battery",
|
||||||
|
"backlight",
|
||||||
|
"pulseaudio",
|
||||||
|
"pulseaudio#microphone"
|
||||||
|
],
|
||||||
|
|
||||||
"modules-left":[ "custom/launcher", "wlr/taskbar"],
|
"hyprland/window": {
|
||||||
"modules-center":["custom/media"],
|
"format": "{}"
|
||||||
"modules-right":["backlight", "battery", "battery#bat2", "idle_inhibitor", "custom/updater", "pulseaudio", "custom/snip", "custom/wallpaper", "tray", "clock", "custom/power"],
|
},
|
||||||
// Modules configuration
|
"wlr/workspaces": {
|
||||||
|
"disable-scroll": true,
|
||||||
"wlr/taskbar": {
|
"all-outputs": true,
|
||||||
"format": "{icon}",
|
|
||||||
"icon-size": 20,
|
|
||||||
"icon-theme": "Star",
|
|
||||||
"tooltip-format": "{title}",
|
|
||||||
"on-click": "activate",
|
"on-click": "activate",
|
||||||
"on-click-middle": "close",
|
//"format": "{icon}",
|
||||||
"on-click-right": "minimize"
|
"persistent_workspaces": {
|
||||||
},
|
"1": [],
|
||||||
"keyboard-state": {
|
"2": [],
|
||||||
"numlock": true,
|
"3": [],
|
||||||
"capslock": true,
|
"4": [],
|
||||||
"format": " {name} {icon}",
|
"5": [],
|
||||||
"format-icons": {
|
"6": [],
|
||||||
"locked": "",
|
"7": [],
|
||||||
"unlocked": ""
|
"8": [],
|
||||||
|
"9": [],
|
||||||
|
"10": []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sway/language": {
|
"custom/updates": {
|
||||||
"format": " {}",
|
"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
|
||||||
},
|
},
|
||||||
"idle_inhibitor": {
|
"custom/weather" : {
|
||||||
"format": "{icon}",
|
"tooltip" : true,
|
||||||
"format-icons": {
|
"format" : "{}",
|
||||||
"activated": "",
|
"interval" : 30,
|
||||||
"deactivated": ""
|
"exec" : "~/.config/waybar/waybar-wttr.py",
|
||||||
}
|
"return-type" : "json"
|
||||||
},
|
},
|
||||||
"tray": {
|
"tray": {
|
||||||
"icon-size": 20,
|
"icon-size": 13,
|
||||||
"spacing": 10
|
"spacing": 10
|
||||||
},
|
},
|
||||||
"clock": {
|
"clock": {
|
||||||
// "timezone": "America/New_York",
|
"format": "{: %R %d/%m}",
|
||||||
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
|
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>"
|
||||||
"format-alt": "{:%Y-%m-%d}"
|
|
||||||
},
|
|
||||||
"cpu": {
|
|
||||||
"format": "{usage}% ",
|
|
||||||
"tooltip": false
|
|
||||||
},
|
|
||||||
"memory": {
|
|
||||||
"format": "{}% "
|
|
||||||
},
|
|
||||||
"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": ["", "", ""]
|
|
||||||
},
|
},
|
||||||
"backlight": {
|
"backlight": {
|
||||||
// "device": "acpi_video1",
|
"device": "intel_backlight",
|
||||||
"format": "{icon}",
|
"format": "{icon} {percent}%",
|
||||||
"format-icons": ["", ""],
|
"format-icons": ["", "", ""],
|
||||||
"on-click": "bash $HOME/.config/system_scripts/brightness up",
|
"on-scroll-up": "brightnessctl set 1%+",
|
||||||
"on-click-right": "bash $HOME/.config/system_scripts/brightness down",
|
"on-scroll-down": "brightnessctl set 1%-",
|
||||||
"on-scroll-up": "",
|
"min-length": 6
|
||||||
"on-scroll-down": ""
|
|
||||||
},
|
},
|
||||||
"battery": {
|
"battery": {
|
||||||
"states": {
|
"states": {
|
||||||
// "good": 95,
|
"good": 95,
|
||||||
"warning": 30,
|
"warning": 30,
|
||||||
"critical": 15
|
"critical": 20
|
||||||
},
|
},
|
||||||
"format": "{icon}",
|
"format": "{icon} {capacity}%",
|
||||||
"format-charging": "{capacity}% ",
|
"format-charging": " {capacity}%",
|
||||||
"format-plugged": "{capacity}% ",
|
"format-plugged": " {capacity}%",
|
||||||
"format-alt": "{time} {icon}",
|
"format-alt": "{time} {icon}",
|
||||||
// "format-good": "", // An empty format will hide the module
|
"format-icons": ["", "", "", "", "", "", "", "", "", "", ""]
|
||||||
// "format-full": "",
|
|
||||||
"format-icons": ["", "", "", "", ""]
|
|
||||||
},
|
|
||||||
"battery#bat2": {
|
|
||||||
"bat": "CMB1"
|
|
||||||
},
|
|
||||||
"network": {
|
|
||||||
// "interface": "wlp2*", // (Optional) To force the use of this interface
|
|
||||||
"format-wifi": "{essid} ({signalStrength}%) ",
|
|
||||||
"format-ethernet": "Connected ",
|
|
||||||
"tooltip-format": "{ifname} via {gwaddr} ",
|
|
||||||
"format-linked": "{ifname} (No IP) ",
|
|
||||||
"format-disconnected": "Disconnected ⚠",
|
|
||||||
"format-alt": "{ifname}: {ipaddr}/{cidr}",
|
|
||||||
"on-click-right": "bash ~/.config/rofi/wifi_menu/rofi_wifi_menu"
|
|
||||||
},
|
},
|
||||||
"pulseaudio": {
|
"pulseaudio": {
|
||||||
// "scroll-step": 1, // %, can be a float
|
"format": "{icon} {volume}%",
|
||||||
"format": "{icon}",
|
"tooltip": false,
|
||||||
"format-bluetooth": "{volume}% {icon}",
|
"format-muted": " Muted",
|
||||||
"format-bluetooth-muted": "{icon} {format_source}",
|
"on-click": "pamixer -t",
|
||||||
"format-muted": "{format_source}",
|
"on-scroll-up": "pamixer -i 5",
|
||||||
"format-source": "",
|
"on-scroll-down": "pamixer -d 5",
|
||||||
"format-source-muted": "",
|
"scroll-step": 5,
|
||||||
"format-icons": {
|
"format-icons": {
|
||||||
"headphone": "",
|
"headphone": "",
|
||||||
"hands-free": "",
|
"hands-free": "",
|
||||||
"headset": "",
|
"headset": "",
|
||||||
"phone": "",
|
"phone": "",
|
||||||
"portable": "",
|
"portable": "",
|
||||||
"car": "",
|
"car": "",
|
||||||
"default": ["", "", ""]
|
"default": ["", "", ""]
|
||||||
},
|
}
|
||||||
"on-click": "bash $HOME/.config/system_scripts/volume up",
|
|
||||||
"on-click-right": "bash $HOME/.config/system_scripts/volume down",
|
|
||||||
"on-scroll-up": "",
|
|
||||||
"on-scroll-down": ""
|
|
||||||
},
|
},
|
||||||
"custom/media": {
|
"pulseaudio#microphone": {
|
||||||
"format": "{icon} {}",
|
"format": "{format_source}",
|
||||||
"return-type": "json",
|
"format-source": " {volume}%",
|
||||||
"max-length": 30,
|
"format-source-muted": " Muted",
|
||||||
"format-icons": {
|
"on-click": "pamixer --default-source -t",
|
||||||
"spotify": " ",
|
"on-scroll-up": "pamixer --default-source -i 5",
|
||||||
"default": ""
|
"on-scroll-down": "pamixer --default-source -d 5",
|
||||||
},
|
"scroll-step": 5
|
||||||
"escape": true,
|
|
||||||
"exec": "$HOME/.config/system_scripts/mediaplayer.py 2> /dev/null",
|
|
||||||
"on-click": "playerctl play-pause"
|
|
||||||
},
|
|
||||||
"custom/launcher":{
|
|
||||||
"format": "",
|
|
||||||
"on-click": "wofi --show drun",
|
|
||||||
"on-click-right": "killall wofi"
|
|
||||||
},
|
|
||||||
"custom/power":{
|
|
||||||
"format": " ",
|
|
||||||
"on-click": "nwg-bar",
|
|
||||||
"on-click-right": "killall nwg-bar"
|
|
||||||
},
|
|
||||||
"custom/updater":{
|
|
||||||
"format": "{} Updates",
|
|
||||||
"exec": "checkupdates | wc -l",
|
|
||||||
"exec-if": "[[ $(checkupdates | wc -l) != 0 ]]",
|
|
||||||
"interval": 15,
|
|
||||||
"on-click": "alacritty -e yay -Syu"
|
|
||||||
},
|
|
||||||
"custom/snip":{
|
|
||||||
"format": "",
|
|
||||||
"on-click": "grimshot --notify save area $HOME/Pictures/$(zenity --entry --text 'Set filename:' --entry-text '.png')"
|
|
||||||
},
|
|
||||||
"custom/wallpaper":{
|
|
||||||
"format": "",
|
|
||||||
"on-click": "bash ~/.config/system_scripts/pkill_bc"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
xdg.configFile."waybar/style.css".text = /* css */ ''
|
xdg.configFile."waybar/style.css".text = /* css */ ''
|
||||||
* {
|
* {
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 0px;
|
border-radius: 0;
|
||||||
/* `otf-font-awesome` is required to be installed for icons */
|
font-family: Cartograph CF Nerd Font, monospace;
|
||||||
font-family: Material, Roboto, Helvetica, Arial, sans-serif;
|
font-weight: bold;
|
||||||
font-size: 13px;
|
font-size: 14px;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
/*border-radius: 20px;*/
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
window#waybar {
|
window#waybar {
|
||||||
background-image: linear-gradient(to right, #000000 0%, #434343 51%, #000000 100%);
|
background: rgba(21, 18, 27, 0);
|
||||||
color: #ffffff;
|
color: #cdd6f4;
|
||||||
transition-property: background-color;
|
|
||||||
transition-duration: .5s;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
window#waybar.hidden {
|
tooltip {
|
||||||
opacity: 0.2;
|
background: #1e1e2e;
|
||||||
|
border-radius: 10px;
|
||||||
|
border-width: 2px;
|
||||||
|
border-style: solid;
|
||||||
|
border-color: #11111b;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#workspaces button {
|
#workspaces button {
|
||||||
background: #1f1f1f;
|
padding: 5px;
|
||||||
color: #ffffff;
|
color: #313244;
|
||||||
border-radius: 20px;
|
margin-right: 5px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
|
#workspaces button.active {
|
||||||
#workspaces button:hover {
|
color: #a6adc8;
|
||||||
background: lightblue;
|
|
||||||
color: black;
|
|
||||||
border-bottom: 3px solid #ffffff;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#workspaces button.focused {
|
#workspaces button.focused {
|
||||||
background: #1f1f1f;
|
color: #a6adc8;
|
||||||
}
|
background: #eba0ac;
|
||||||
|
border-radius: 10px;
|
||||||
#workspaces button.focused:hover {
|
|
||||||
background: lightblue;
|
|
||||||
color: black;
|
|
||||||
border-bottom: 3px solid #ffffff;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#workspaces button.urgent {
|
#workspaces button.urgent {
|
||||||
background-color: #eb4d4b;
|
color: #11111b;
|
||||||
|
background: #a6e3a1;
|
||||||
|
border-radius: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#mode {
|
#workspaces button:hover {
|
||||||
background-color: #64727D;
|
background: #11111b;
|
||||||
border-bottom: 3px solid #ffffff;
|
color: #cdd6f4;
|
||||||
|
border-radius: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#custom-language,
|
||||||
|
#custom-updates,
|
||||||
|
#custom-caffeine,
|
||||||
|
#custom-weather,
|
||||||
|
#window,
|
||||||
#clock,
|
#clock,
|
||||||
#battery,
|
#battery,
|
||||||
#cpu,
|
|
||||||
#memory,
|
|
||||||
#disk,
|
|
||||||
#temperature,
|
|
||||||
#backlight,
|
|
||||||
#network,
|
|
||||||
#pulseaudio,
|
#pulseaudio,
|
||||||
#custom-media,
|
#network,
|
||||||
#custom-launcher,
|
#workspaces,
|
||||||
#custom-power,
|
|
||||||
#custom-wallpaper,
|
|
||||||
#custom-updater,
|
|
||||||
#custom-snip,
|
|
||||||
#taskbar,
|
|
||||||
#tray,
|
#tray,
|
||||||
#mode,
|
#backlight {
|
||||||
#idle_inhibitor,
|
background: #1e1e2e;
|
||||||
#mpd {
|
padding: 0px 10px;
|
||||||
padding: 0 10px;
|
margin: 3px 0px;
|
||||||
color: #ffffff;
|
margin-top: 10px;
|
||||||
|
border: 1px solid #181825;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tray {
|
||||||
|
border-radius: 10px;
|
||||||
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#window,
|
|
||||||
#workspaces {
|
#workspaces {
|
||||||
margin: 0px 4px;
|
background: #1e1e2e;
|
||||||
|
border-radius: 10px;
|
||||||
|
margin-left: 10px;
|
||||||
|
padding-right: 0px;
|
||||||
|
padding-left: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If workspaces is the leftmost module, omit left margin */
|
#custom-caffeine {
|
||||||
.modules-left > widget:first-child > #workspaces {
|
color: #89dceb;
|
||||||
margin-left: 0px;
|
border-radius: 10px 0px 0px 10px;
|
||||||
|
border-right: 0px;
|
||||||
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If workspaces is the rightmost module, omit right margin */
|
#custom-language {
|
||||||
.modules-right > widget:last-child > #workspaces {
|
color: #f38ba8;
|
||||||
margin-right: 0px;
|
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 {
|
#clock {
|
||||||
background-color: #090909;
|
color: #fab387;
|
||||||
color: #ffffff;
|
border-radius: 10px 0px 0px 10px;
|
||||||
|
margin-left: 5px;
|
||||||
|
border-right: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#battery {
|
#network {
|
||||||
background-color: #ffffff;
|
color: #f9e2af;
|
||||||
color: #000000;
|
border-left: 0px;
|
||||||
}
|
border-right: 0px;
|
||||||
|
|
||||||
#battery.charging, #battery.plugged {
|
|
||||||
color: #ffffff;
|
|
||||||
background-color: #26A65B;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes blink {
|
|
||||||
to {
|
|
||||||
background-color: #ffffff;
|
|
||||||
color: #000000;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#battery.critical:not(.charging) {
|
|
||||||
background-color: #f53c3c;
|
|
||||||
color: #ffffff;
|
|
||||||
animation-name: blink;
|
|
||||||
animation-duration: 0.5s;
|
|
||||||
animation-timing-function: linear;
|
|
||||||
animation-iteration-count: infinite;
|
|
||||||
animation-direction: alternate;
|
|
||||||
}
|
|
||||||
|
|
||||||
label:focus {
|
|
||||||
background-color: #000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
#cpu {
|
|
||||||
color: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
#memory {
|
|
||||||
color: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
#disk {
|
|
||||||
color: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
#backlight {
|
|
||||||
background-color: #90b1b1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#pulseaudio {
|
#pulseaudio {
|
||||||
color: #ffffff;
|
color: #89b4fa;
|
||||||
font-size: 18px;
|
border-left: 0px;
|
||||||
|
border-right: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pulseaudio.muted {
|
#pulseaudio.microphone {
|
||||||
color: red;
|
color: #cba6f7;
|
||||||
}
|
border-radius: 0px 10px 10px 0px;
|
||||||
|
border-left: 0px;
|
||||||
#custom-media {
|
border-right: 0px;
|
||||||
color: whitesmoke;
|
|
||||||
margin: 5px;
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-media.custom-spotify {
|
|
||||||
background-color: #8EC5FC;
|
|
||||||
background-image: linear-gradient(to right, #434343 0%, #000000 51%, #434343 100%);
|
|
||||||
color: whitesmoke;
|
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#custom-media.custom-vlc {
|
#battery {
|
||||||
background-color: #8EC5FC;
|
color: #a6e3a1;
|
||||||
background-image: linear-gradient(to right, #434343 0%, #000000 51%, #434343 100%);
|
border-radius: 0 10px 10px 0;
|
||||||
color: whitesmoke;
|
margin-right: 10px;
|
||||||
margin-right: 5px;
|
border-left: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#custom-power{
|
#custom-weather {
|
||||||
background-image: linear-gradient(to left, #000000 0%, #000000 51%, #434343 100%);
|
border-radius: 0px 10px 10px 0px;
|
||||||
font-size: 20px;
|
border-right: 0px;
|
||||||
margin-right: 5px;
|
margin-left: 0px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#custom-launcher{
|
'';
|
||||||
background-image: linear-gradient(to right, #000000 0%, #000000 51%, #434343 100%);
|
xdg.configFile."waybar/waybar-wttr.py".text = /* python */ ''
|
||||||
font-size: 20px;
|
#!/usr/bin/env python
|
||||||
margin-left: 5px;
|
|
||||||
|
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': '❄️ '
|
||||||
}
|
}
|
||||||
|
|
||||||
#custom-wallpaper{
|
data = {}
|
||||||
color: white;
|
|
||||||
font-size:18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-updater {
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-snip {
|
weather = requests.get("https://wttr.in/?format=j1").json()
|
||||||
color: white;
|
|
||||||
font-size: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#taskbar{
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
#temperature {
|
def format_time(time):
|
||||||
color: #ffffff;
|
return time.replace("00", "").zfill(2)
|
||||||
}
|
|
||||||
|
|
||||||
#temperature.critical {
|
|
||||||
background-color: #eb4d4b;
|
|
||||||
}
|
|
||||||
|
|
||||||
#tray {
|
|
||||||
color: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
#tray > .passive {
|
def format_temp(temp):
|
||||||
-gtk-icon-effect: dim;
|
return (hour['FeelsLikeF']+"°").ljust(3)
|
||||||
color: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
#tray > .needs-attention {
|
|
||||||
-gtk-icon-effect: highlight;
|
|
||||||
color: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
#idle_inhibitor {
|
def format_chances(hour):
|
||||||
font-size: 18px;
|
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)
|
||||||
|
|
||||||
#idle_inhibitor.activated {
|
tempint = int(weather['current_condition'][0]['FeelsLikeF'])
|
||||||
color: #ffffff;
|
extrachar = ""
|
||||||
|
if tempint > 0 and tempint < 10:
|
||||||
|
extrachar = '+'
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#language {
|
data['text'] = ' '+WEATHER_CODES[weather['current_condition'][0]['weatherCode']] + \
|
||||||
color: #ffffff;
|
" "+extrachar+weather['current_condition'][0]['FeelsLikeF']+"°"
|
||||||
min-width: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#keyboard-state {
|
data['tooltip'] = f"<b>{weather['current_condition'][0]['weatherDesc'][0]['value']} {weather['current_condition'][0]['temp_C']}°</b>\n"
|
||||||
background: #97e1ad;
|
data['tooltip'] += f"Feels like: {weather['current_condition'][0]['FeelsLikeF']}°\n"
|
||||||
color: #000000;
|
data['tooltip'] += f"Wind: {weather['current_condition'][0]['windspeedKmph']}Km/h\n"
|
||||||
min-width: 16px;
|
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"
|
||||||
|
|
||||||
#keyboard-state > label {
|
|
||||||
padding: 0px 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#keyboard-state > label.locked {
|
print(json.dumps(data))
|
||||||
background: rgba(0, 0, 0, 0.2);
|
|
||||||
}
|
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
6
home/xcursor.nix
Normal file
6
home/xcursor.nix
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
home.file.".icons/default/index.theme".text = /* ini */ ''
|
||||||
|
[icon theme]
|
||||||
|
Inherits=phinger-cursors
|
||||||
|
'';
|
||||||
|
}
|
10
home/xresources.nix
Normal file
10
home/xresources.nix
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
xresources.properties = {
|
||||||
|
"Xft.hinting" = true;
|
||||||
|
"Xft.antialias" = true;
|
||||||
|
"Xft.autohint" = false;
|
||||||
|
"Xft.lcdfilter" = "lcddefault";
|
||||||
|
"Xft.hintstyle" = "hintfull";
|
||||||
|
"Xft.rgba" = "rgb";
|
||||||
|
};
|
||||||
|
}
|
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./boot.nix
|
./boot.nix
|
||||||
|
./fonts.nix
|
||||||
./home-manager.nix
|
./home-manager.nix
|
||||||
./locale.nix
|
./locale.nix
|
||||||
./hyprland.nix
|
./hyprland.nix
|
||||||
|
29
modules/fonts.nix
Normal file
29
modules/fonts.nix
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
fonts = {
|
||||||
|
enableDefaultFonts = false;
|
||||||
|
|
||||||
|
fonts = with pkgs; [
|
||||||
|
noto-fonts
|
||||||
|
noto-fonts-cjk-sans
|
||||||
|
noto-fonts-cjk-serif
|
||||||
|
noto-fonts-emoji
|
||||||
|
maple-mono
|
||||||
|
font-awesome
|
||||||
|
nerdfonts
|
||||||
|
kanji-stroke-order-font
|
||||||
|
liberation_ttf
|
||||||
|
];
|
||||||
|
|
||||||
|
fontconfig = {
|
||||||
|
defaultFonts = {
|
||||||
|
serif = [ "Noto Serif CJK JP" "Noto Serif" ];
|
||||||
|
sansSerif = [ "Noto Sans CJK JP" "Noto Sans" ];
|
||||||
|
monospace = [ "Noto Mono CJK JP" "Noto Mono" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
allowBitmaps = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -1,6 +1,7 @@
|
|||||||
{ config, pkgs, ... }: {
|
{ config, pkgs, ... }: {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
git
|
git
|
||||||
|
neofetch
|
||||||
tree
|
tree
|
||||||
wget
|
wget
|
||||||
];
|
];
|
||||||
|
120
scripts/waybar-wttr.py
Normal file
120
scripts/waybar-wttr.py
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
#!/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))
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user