mirror of
https://github.com/Ahwxorg/nixos-config.git
synced 2025-12-04 15:00:13 +01:00
chore: merge configs
This commit is contained in:
commit
c4d7eb051d
21 changed files with 448 additions and 1226 deletions
|
|
@ -2,6 +2,7 @@
|
|||
imports =
|
||||
[(import ./bat.nix)] # better cat command
|
||||
++ [(import ./git.nix)] # version control
|
||||
++ [(import ./security.nix)] # yubikey-touch-detector for now
|
||||
++ [(import ./gtk.nix)] # gtk theme
|
||||
++ [(import ./hyprland)] # window manager
|
||||
++ [(import ./kitty.nix)] # terminal
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
gaps_in = 5;
|
||||
gaps_out = 10;
|
||||
border_size = 2;
|
||||
"col.active_border" = "rgb(cba6f7) rgb(94e2d5) 45deg";
|
||||
"col.active_border" = "rgb(cda5ef) rgb(cda5ef) 45deg";
|
||||
"col.inactive_border" = "0x00000000";
|
||||
border_part_of_window = false;
|
||||
no_border_on_floating = false;
|
||||
|
|
@ -56,7 +56,7 @@
|
|||
};
|
||||
|
||||
dwindle = {
|
||||
no_gaps_when_only = false; # Is ugly with current Waybar setup
|
||||
no_gaps_when_only = true;
|
||||
force_split = 0;
|
||||
special_scale_factor = 1.0;
|
||||
split_width_multiplier = 1.0;
|
||||
|
|
@ -67,7 +67,7 @@
|
|||
|
||||
master = {
|
||||
special_scale_factor = 1;
|
||||
no_gaps_when_only = false;
|
||||
no_gaps_when_only = true;
|
||||
};
|
||||
|
||||
decoration = {
|
||||
|
|
@ -77,7 +77,7 @@
|
|||
# fullscreen_opacity = 1.0;
|
||||
|
||||
blur = {
|
||||
enabled = true;
|
||||
enabled = false;
|
||||
size = 1;
|
||||
passes = 1;
|
||||
# size = 4;
|
||||
|
|
@ -146,9 +146,9 @@
|
|||
# clipboard manager
|
||||
"$mainMod SHIFT, V, exec, cliphist list | wofi --dmenu | cliphist decode | wl-copy"
|
||||
|
||||
"$mainMod SHIFT, F, exec, firefox"
|
||||
"$mainMod SHIFT, T, exec, thunderbird"
|
||||
"$mainMod SHIFT, P, exec, pavucontrol"
|
||||
"$mainMod SHIFT, F, exec, firefox"
|
||||
"$mainMod SHIFT, T, exec, thunderbird"
|
||||
"$mainMod SHIFT, P, exec, pavucontrol-qt"
|
||||
|
||||
# screenshot
|
||||
"SUPER SHIFT, S, exec, grimblast --notify --cursor save area ~/Pictures/$(date +'%Y-%m-%d-At-%Ih%Mm%Ss').png"
|
||||
|
|
@ -266,6 +266,7 @@
|
|||
"opacity 1.0 override 1.0 override, class:(Unity)"
|
||||
"idleinhibit focus, class:^(mpv)$"
|
||||
"idleinhibit fullscreen, class:^(firefox)$"
|
||||
"float,class:^(pavucontrol-qt)$"
|
||||
"float,class:^(pavucontrol)$"
|
||||
"float,class:^(SoundWireServer)$"
|
||||
"float,class:^(.sameboy-wrapped)$"
|
||||
|
|
|
|||
|
|
@ -1,106 +1,100 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
text = "rgb(251, 241, 199)";
|
||||
in
|
||||
{
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
home.packages = [ pkgs.hyprlock ];
|
||||
xdg.configFile."hypr/hyprlock.conf".text = ''
|
||||
# BACKGROUND
|
||||
background {
|
||||
monitor =
|
||||
path = ${/home/liv/Pictures/wallpapers/others/liv-schiermonnikoog-zonsondergang.jpeg}
|
||||
blur_passes = 1
|
||||
contrast = 0.8916
|
||||
brightness = 0.8172
|
||||
vibrancy = 0.1696
|
||||
vibrancy_darkness = 0.0
|
||||
}
|
||||
|
||||
extraConfig = ''
|
||||
source = $HOME/nixos-config/modules/home/hyprland/mocha.conf
|
||||
# GENERAL
|
||||
general {
|
||||
hide_cursor = true
|
||||
no_fade_in = false
|
||||
grace = 0
|
||||
disable_loading_bar = false
|
||||
}
|
||||
|
||||
$accent = 0xb3$tealAlpha
|
||||
$accentAlpha = $tealAlpha
|
||||
$font = JetBrainsMono Nerd Font
|
||||
|
||||
# GENERAL
|
||||
general {
|
||||
disable_loading_bar = true
|
||||
hide_cursor = true
|
||||
}
|
||||
|
||||
# BACKGROUND
|
||||
background {
|
||||
monitor =
|
||||
path = ~/Pictures/wallpapers/others/street-by-ahwx.jpg
|
||||
blur_passes = 2
|
||||
color = $base
|
||||
}
|
||||
|
||||
# TIME
|
||||
label {
|
||||
monitor =
|
||||
text = cmd[update:30000] echo "$(date +"%R")"
|
||||
color = $text
|
||||
font_size = 90
|
||||
font_family = $font
|
||||
position = -130, -100
|
||||
halign = right
|
||||
valign = top
|
||||
shadow_passes = 2
|
||||
}
|
||||
|
||||
# DATE
|
||||
label {
|
||||
monitor =
|
||||
text = cmd[update:43200000] echo "$(date +"%A, %d %B %Y")"
|
||||
color = $text
|
||||
font_size = 25
|
||||
font_family = $font
|
||||
position = -130, -250
|
||||
halign = right
|
||||
valign = top
|
||||
shadow_passes = 2
|
||||
}
|
||||
|
||||
# KEYBOARD LAYOUT
|
||||
label {
|
||||
monitor =
|
||||
text = $LAYOUT
|
||||
color = $text
|
||||
font_size = 20
|
||||
font_family = $font
|
||||
rotate = 0 # degrees, counter-clockwise
|
||||
|
||||
position = -130, -310
|
||||
halign = right
|
||||
valign = top
|
||||
shadow_passes = 2
|
||||
}
|
||||
|
||||
# USER AVATAR
|
||||
image {
|
||||
monitor =
|
||||
path = $HOME/.face
|
||||
size = 350
|
||||
border_color = $accent
|
||||
rounding = -1
|
||||
|
||||
position = 0, 75
|
||||
halign = center
|
||||
valign = center
|
||||
shadow_passes = 2
|
||||
}
|
||||
|
||||
# INPUT FIELD
|
||||
input-field {
|
||||
monitor =
|
||||
size = 400, 70
|
||||
outline_thickness = 4
|
||||
dots_size = 0.2
|
||||
dots_spacing = 0.2
|
||||
dots_center = true
|
||||
outer_color = $accent
|
||||
inner_color = $surface0
|
||||
font_color = $text
|
||||
fade_on_empty = false
|
||||
placeholder_text = <span foreground="##$textAlpha"> Logged in as $USER</span>
|
||||
hide_input = false
|
||||
check_color = $accent
|
||||
fail_color = $red
|
||||
fail_text = <i>$FAIL <b>($ATTEMPTS)</b></i>
|
||||
capslock_color = $yellow
|
||||
position = 0, -185
|
||||
halign = center
|
||||
valign = center
|
||||
shadow_passes = 2
|
||||
}'';
|
||||
};
|
||||
# Time
|
||||
label {
|
||||
monitor =
|
||||
text = cmd[update:1000] echo "$(date +"%k:%M")"
|
||||
color = rgba(235, 219, 178, .9)
|
||||
font_size = 111
|
||||
font_family = JetBrainsMono NF Bold
|
||||
position = 0, 270
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
|
||||
# Day
|
||||
label {
|
||||
monitor =
|
||||
text = cmd[update:1000] echo "- $(date +"%A, %B %d") -"
|
||||
color = rgba(235, 219, 178, .9)
|
||||
font_size = 20
|
||||
font_family = CaskaydiaCove Nerd Font
|
||||
position = 0, 160
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
|
||||
|
||||
# USER-BOX
|
||||
shape {
|
||||
monitor =
|
||||
size = 350, 50
|
||||
color = rgba(225, 225, 225, .2)
|
||||
rounding = 15
|
||||
border_size = 0
|
||||
border_color = rgba(255, 255, 255, 0)
|
||||
rotate = 0
|
||||
|
||||
position = 0, -230
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
|
||||
# USER
|
||||
label {
|
||||
monitor =
|
||||
text = $USER
|
||||
color = rgba(235, 219, 178, .9)
|
||||
font_size = 16
|
||||
font_family = CaskaydiaCove Nerd Font
|
||||
position = 0, -230
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
|
||||
# INPUT FIELD
|
||||
input-field {
|
||||
monitor =
|
||||
size = 350, 50
|
||||
outline_thickness = 0
|
||||
rounding = 15
|
||||
dots_size = 0.25 # Scale of input-field height, 0.2 - 0.8
|
||||
dots_spacing = 0.4 # Scale of dots' absolute size, 0.0 - 1.0
|
||||
dots_center = true
|
||||
outer_color = rgba(255, 255, 255, 0)
|
||||
inner_color = rgba(225, 225, 225, 0.2)
|
||||
color = rgba(235, 219, 178, .9)
|
||||
font_color = rgba(235, 219, 178, .9)
|
||||
fade_on_empty = false
|
||||
placeholder_text = <i><span foreground="##ebdbb2e5">Enter Password</span></i>
|
||||
hide_input = false
|
||||
position = 0, -300
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,16 +1,37 @@
|
|||
{ inputs, pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
anki-bin # Learn languages
|
||||
vimv # Bulk rename
|
||||
audacity # Record audio stuff
|
||||
obs-studio # Record video stuff
|
||||
exiftool # Read exif data from CLI
|
||||
pinta # "Paint.NET-like editor"
|
||||
kdenlive # Video editor
|
||||
translate-shell # Google Translate but in the CLI
|
||||
wireguard-tools # VPN connections
|
||||
openresolv # required for wireguard-tools
|
||||
gajim # XMPP client
|
||||
nheko # Matrix client
|
||||
linuxKernel.packages.linux_hardened.v4l2loopback # Use A7ii as webcam
|
||||
# wikit # Wikipedia summaries from the terminal, not added to Nix yet
|
||||
# reader # Firefox reader mode but in the terminal, not added to Nix yet
|
||||
vimv # edit filenames in batch with $EDITOR
|
||||
iamb # Try CLI Matrix
|
||||
pastel # generate, analyze, convert and manipulate colors
|
||||
glow # Render Markdown from the terminal
|
||||
htmlq # jq but for HTML
|
||||
lemmeknow # Identify anything
|
||||
android-tools # ADB/Fastboot
|
||||
eva # Calculator
|
||||
tofi # drun type launcher
|
||||
# termpdfpy # Read PDFs from the terminal, errors out for now
|
||||
anki-bin # Learn languages
|
||||
vimv # Bulk rename
|
||||
audacity # Record audio stuff
|
||||
obs-studio # Record video stuff
|
||||
exiftool # Read exif data from CLI
|
||||
pinta # "Paint.NET-like editor"
|
||||
kdenlive # Video editor
|
||||
translate-shell # Google Translate but in the CLI
|
||||
wireguard-tools # VPN connections
|
||||
openresolv # required for wireguard-tools
|
||||
prusa-slicer
|
||||
blender
|
||||
progress
|
||||
epy
|
||||
zip
|
||||
ripdrag
|
||||
pwgen
|
||||
jq
|
||||
tmux
|
||||
|
|
@ -33,10 +54,11 @@
|
|||
ripgrep
|
||||
yt-dlp
|
||||
wineWowPackages.wayland
|
||||
element-desktop # wayland version is very laggy for me
|
||||
# element-desktop # wayland version is very laggy for me
|
||||
spotify
|
||||
thunderbird
|
||||
neofetch
|
||||
nodejs_22
|
||||
yarn
|
||||
|
||||
# C / C++
|
||||
|
|
@ -53,7 +75,7 @@
|
|||
mpv # video player
|
||||
openssl
|
||||
pamixer # pulseaudio command line mixer
|
||||
pavucontrol # pulseaudio volume controle (GUI)
|
||||
lxqt.pavucontrol-qt # pulseaudio volume controle (GUI)
|
||||
playerctl # controller for media players
|
||||
wl-clipboard # clipboard utils for wayland (wl-copy, wl-paste)
|
||||
cliphist # clipboard history manager
|
||||
|
|
@ -65,4 +87,8 @@
|
|||
inputs.alejandra.defaultPackage.${system}
|
||||
inputs.nixvim.packages.${pkgs.system}.default
|
||||
];
|
||||
|
||||
# environment.systemPackages = with pkgs; [
|
||||
# nodePackages.
|
||||
# ]
|
||||
}
|
||||
|
|
|
|||
6
modules/home/security.nix
Normal file
6
modules/home/security.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{ ... }:
|
||||
{
|
||||
# services = {
|
||||
# yubikey-touch-detector.enable = true;
|
||||
# };
|
||||
}
|
||||
|
|
@ -58,6 +58,7 @@
|
|||
'';
|
||||
plugins = with pkgs.tmuxPlugins; [
|
||||
yank
|
||||
fzf-tmux-url
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
{ config, lib, pkgs, user, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[(import ./scripts.nix)];
|
||||
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
package = pkgs.waybar.overrideAttrs (oa: {
|
||||
|
|
@ -10,799 +13,6 @@
|
|||
enable = false;
|
||||
target = "graphical-session.target";
|
||||
};
|
||||
style = ''
|
||||
* {
|
||||
font-family: "JetBrainsMono Nerd Font";
|
||||
font-size: 12pt;
|
||||
font-weight: bold;
|
||||
border-radius: 0px;
|
||||
transition-property: background-color;
|
||||
transition-duration: 0.5s;
|
||||
}
|
||||
@keyframes blink_red {
|
||||
to {
|
||||
background-color: rgb(242, 143, 173);
|
||||
color: rgb(26, 24, 38);
|
||||
}
|
||||
}
|
||||
.warning, .critical, .urgent {
|
||||
animation-name: blink_red;
|
||||
animation-duration: 1s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
window#waybar {
|
||||
background-color: transparent;
|
||||
}
|
||||
window > box {
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
margin-top: 5px;
|
||||
background-color: rgb(30, 30, 46);
|
||||
}
|
||||
#workspaces {
|
||||
padding-left: 0px;
|
||||
padding-right: 4px;
|
||||
}
|
||||
#workspaces button {
|
||||
padding-top: 5px;
|
||||
padding-bottom: 5px;
|
||||
padding-left: 6px;
|
||||
padding-right: 6px;
|
||||
}
|
||||
#workspaces button.active {
|
||||
background-color: rgb(181, 232, 224);
|
||||
color: rgb(26, 24, 38);
|
||||
}
|
||||
#workspaces button.urgent {
|
||||
color: rgb(26, 24, 38);
|
||||
}
|
||||
#workspaces button:hover {
|
||||
background-color: rgb(248, 189, 150);
|
||||
color: rgb(26, 24, 38);
|
||||
}
|
||||
tooltip {
|
||||
background: rgb(48, 45, 65);
|
||||
}
|
||||
tooltip label {
|
||||
color: rgb(217, 224, 238);
|
||||
}
|
||||
#mode, #clock, #memory, #temperature,#cpu,#mpd, #custom-wall, #temperature, #backlight, #pulseaudio, #network, #battery, #custom-powermenu, #custom-cava-internal {
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
/* #mode { */
|
||||
/* margin-left: 10px; */
|
||||
/* background-color: rgb(248, 189, 150); */
|
||||
/* color: rgb(26, 24, 38); */
|
||||
/* } */
|
||||
#memory {
|
||||
color: rgb(181, 232, 224);
|
||||
}
|
||||
#cpu {
|
||||
color: rgb(245, 194, 231);
|
||||
}
|
||||
#clock {
|
||||
color: rgb(217, 224, 238);
|
||||
}
|
||||
/* #idle_inhibitor {
|
||||
color: rgb(221, 182, 242);
|
||||
}*/
|
||||
#custom-wall {
|
||||
color: rgb(221, 182, 242);
|
||||
}
|
||||
#temperature {
|
||||
color: rgb(150, 205, 251);
|
||||
}
|
||||
#backlight {
|
||||
color: rgb(248, 189, 150);
|
||||
}
|
||||
#pulseaudio {
|
||||
color: rgb(245, 224, 220);
|
||||
}
|
||||
#network {
|
||||
color: #ABE9B3;
|
||||
}
|
||||
|
||||
#network.disconnected {
|
||||
color: rgb(255, 255, 255);
|
||||
}
|
||||
#battery.charging, #battery.full, #battery.discharging {
|
||||
color: rgb(250, 227, 176);
|
||||
}
|
||||
#battery.critical:not(.charging) {
|
||||
color: rgb(242, 143, 173);
|
||||
}
|
||||
#custom-powermenu {
|
||||
color: rgb(242, 143, 173);
|
||||
}
|
||||
#tray {
|
||||
padding-right: 8px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
#mpd.paused {
|
||||
color: #414868;
|
||||
font-style: italic;
|
||||
}
|
||||
#mpd.stopped {
|
||||
background: transparent;
|
||||
}
|
||||
#mpd {
|
||||
color: #c0caf5;
|
||||
}
|
||||
#custom-cava-internal{
|
||||
font-family: "Hack Nerd Font" ;
|
||||
}
|
||||
'';
|
||||
settings = [{
|
||||
"layer" = "top";
|
||||
"position" = "top";
|
||||
modules-left = [
|
||||
"hyprland/workspaces"
|
||||
"temperature"
|
||||
#"idle_inhibitor"
|
||||
"mpd"
|
||||
"custom/cava-internal"
|
||||
];
|
||||
modules-center = [
|
||||
"clock"
|
||||
];
|
||||
modules-right = [
|
||||
"pulseaudio"
|
||||
"backlight"
|
||||
"memory"
|
||||
"cpu"
|
||||
"network"
|
||||
"battery"
|
||||
"custom/powermenu"
|
||||
"tray"
|
||||
];
|
||||
"custom/cava-internal" = {
|
||||
"exec" = "sleep 1s && cava-internal";
|
||||
"tooltip" = false;
|
||||
};
|
||||
"hyprland/workspaces" = {
|
||||
"format" = "{icon}";
|
||||
"on-click" = "activate";
|
||||
# "on-scroll-up" = "hyprctl dispatch workspace e+1";
|
||||
# "on-scroll-down" = "hyprctl dispatch workspace e-1";
|
||||
};
|
||||
"idle_inhibitor" = {
|
||||
"format" = "{icon}";
|
||||
"format-icons" = {
|
||||
"activated" = "";
|
||||
"deactivated" = "";
|
||||
};
|
||||
"tooltip" = false;
|
||||
};
|
||||
"backlight" = {
|
||||
"device" = "intel_backlight";
|
||||
"on-scroll-up" = "light -A 5";
|
||||
"on-scroll-down" = "light -U 5";
|
||||
"format" = "{icon} {percent}%";
|
||||
"format-icons" = [ "" "" "" "" ];
|
||||
};
|
||||
"pulseaudio" = {
|
||||
"scroll-step" = 1;
|
||||
"format" = "{icon} {volume}%";
|
||||
"format-muted" = " Muted";
|
||||
"format-icons" = {
|
||||
"default" = [ "" "" "" ];
|
||||
};
|
||||
"on-click" = "pamixer -t";
|
||||
"tooltip" = false;
|
||||
};
|
||||
"battery" = {
|
||||
"interval" = 10;
|
||||
"states" = {
|
||||
"warning" = 20;
|
||||
"critical" = 10;
|
||||
};
|
||||
"format" = "{icon} {capacity}%";
|
||||
"format-icons" = [ "" "" "" "" "" "" "" "" "" "" ];
|
||||
"format-full" = "{icon} {capacity}%";
|
||||
"format-charging" = " {capacity}%";
|
||||
"tooltip" = false;
|
||||
};
|
||||
"clock" = {
|
||||
"interval" = 1;
|
||||
"format" = "{:%I:%M %p %A %b %d}";
|
||||
"tooltip" = true;
|
||||
/* "tooltip-format"= "{=%A; %d %B %Y}\n<tt>{calendar}</tt>" */
|
||||
"tooltip-format" = "上午:高数\n下午:Ps\n晚上:Golang\n<tt>{calendar}</tt>";
|
||||
};
|
||||
"memory" = {
|
||||
"interval" = 1;
|
||||
"format" = " {percentage}%";
|
||||
"states" = {
|
||||
"warning" = 85;
|
||||
};
|
||||
};
|
||||
"cpu" = {
|
||||
"interval" = 1;
|
||||
"format" = " {usage}%";
|
||||
};
|
||||
"mpd" = {
|
||||
"max-length" = 25;
|
||||
"format" = "<span foreground='#bb9af7'></span> {title}";
|
||||
"format-paused" = " {title}";
|
||||
"format-stopped" = "<span foreground='#bb9af7'></span>";
|
||||
"format-disconnected" = "";
|
||||
"on-click" = "mpc --quiet toggle";
|
||||
"on-click-right" = "mpc update; mpc ls | mpc add";
|
||||
"on-click-middle" = "kitty --class='ncmpcpp' ncmpcpp ";
|
||||
"on-scroll-up" = "mpc --quiet prev";
|
||||
"on-scroll-down" = "mpc --quiet next";
|
||||
"smooth-scrolling-threshold" = 5;
|
||||
"tooltip-format" = "{title} - {artist} ({elapsedTime:%M:%S}/{totalTime:%H:%M:%S})";
|
||||
};
|
||||
"network" = {
|
||||
"format-disconnected" = " Disconnected";
|
||||
"format-ethernet" = " {ifname} ({ipaddr})";
|
||||
"format-linked" = " {essid} (No IP)";
|
||||
"format-wifi" = " {essid}";
|
||||
"interval" = 1;
|
||||
"tooltip" = false;
|
||||
};
|
||||
"temperature" = {
|
||||
# "hwmon-path"= "${env:HWMON_PATH}";
|
||||
#"critical-threshold"= 80;
|
||||
"tooltip" = false;
|
||||
"format" = " {temperatureC}°C";
|
||||
};
|
||||
"custom/powermenu" = {
|
||||
"format" = "";
|
||||
"on-click" = "pkill rofi || ~/.config/rofi/powermenu.sh";
|
||||
"tooltip" = false;
|
||||
};
|
||||
"tray" = {
|
||||
"icon-size" = 15;
|
||||
"spacing" = 5;
|
||||
};
|
||||
}];
|
||||
};
|
||||
#other config & style
|
||||
home.file = {
|
||||
".config/waybar/light_config".text = ''
|
||||
[
|
||||
{
|
||||
"backlight": {
|
||||
"device": "intel_backlight",
|
||||
"format": "{icon} {percent}%",
|
||||
"format-icons": [
|
||||
"", "", "", ""
|
||||
],
|
||||
"on-scroll-down": "light -U 5",
|
||||
"on-scroll-up": "light -A 5"
|
||||
},
|
||||
"battery": {
|
||||
"format": "{icon} {capacity}%",
|
||||
"format-charging": " {capacity}%",
|
||||
"format-full": "{icon} {capacity}%",
|
||||
"format-icons": [
|
||||
"", "", "", "", "", "", "", "", "", ""
|
||||
],
|
||||
"interval": 10,
|
||||
"states": {
|
||||
"critical": 10,
|
||||
"warning": 20
|
||||
},
|
||||
"tooltip": false
|
||||
},
|
||||
"clock": {
|
||||
"format": "{:%I:%M %p %A %b %d}",
|
||||
"interval": 1,
|
||||
"tooltip": true,
|
||||
"tooltip-format": "上午:高数\n下午:Ps\n晚上:Golang\n<tt>{calendar}</tt>"
|
||||
},
|
||||
"cpu": {
|
||||
"format": " {usage}%",
|
||||
"interval": 1
|
||||
},
|
||||
"custom/cava-internal": {
|
||||
"exec": "sleep 1s && cava-internal",
|
||||
"tooltip": false
|
||||
},
|
||||
"custom/powermenu": {
|
||||
"format": "",
|
||||
"on-click": "pkill rofi || ~/.config/rofi/powermenu.sh",
|
||||
"tooltip": false
|
||||
},
|
||||
"idle_inhibitor": {
|
||||
"format": "{icon}",
|
||||
"format-icons": {
|
||||
"activated": "",
|
||||
"deactivated": ""
|
||||
},
|
||||
"tooltip": false
|
||||
},
|
||||
"layer": "top",
|
||||
"memory": {
|
||||
"format": " {percentage}%",
|
||||
"interval": 1,
|
||||
"states": {
|
||||
"warning": 85
|
||||
}
|
||||
},
|
||||
"modules-center": [
|
||||
"clock"
|
||||
],
|
||||
"modules-left": [
|
||||
"hyprland/workspaces",
|
||||
"temperature",
|
||||
//"idle_inhibitor",
|
||||
"mpd",
|
||||
"custom/cava-internal"
|
||||
],
|
||||
"modules-right": [
|
||||
"pulseaudio",
|
||||
"backlight",
|
||||
"memory",
|
||||
"cpu",
|
||||
"network",
|
||||
"battery",
|
||||
"custom/powermenu",
|
||||
"tray"
|
||||
],
|
||||
"mpd": {
|
||||
"format": "<span foreground='#FF99FF'></span> {title}",
|
||||
"format-disconnected": "",
|
||||
"format-paused": " {title}",
|
||||
"format-stopped": "<span foreground='#bb9af7'></span>",
|
||||
"max-length": 25,
|
||||
"on-click": "mpc --quiet toggle",
|
||||
"on-click-middle": "kitty --class='ncmpcpp' ncmpcpp ",
|
||||
"on-click-right": "mpc update; mpc ls | mpc add",
|
||||
"on-scroll-down": "mpc --quiet next",
|
||||
"on-scroll-up": "mpc --quiet prev",
|
||||
"smooth-scrolling-threshold": 5,
|
||||
"tooltip-format": "{title} - {artist} ({elapsedTime:%M:%S}/{totalTime:%H:%M:%S})"
|
||||
},
|
||||
"network": {
|
||||
"interval": 1,
|
||||
"format-wifi": " {essid}",
|
||||
"format-ethernet": " {ifname} ({ipaddr})",
|
||||
"format-linked": " {essid} (No IP)",
|
||||
"format-disconnected": " Disconnected",
|
||||
"tooltip": false,
|
||||
},
|
||||
"position": "top",
|
||||
"pulseaudio": {
|
||||
"format": "{icon} {volume}%",
|
||||
"format-icons": {
|
||||
"default": [
|
||||
"",
|
||||
"",
|
||||
""
|
||||
]
|
||||
},
|
||||
"format-muted": " Muted",
|
||||
"on-click": "pamixer -t",
|
||||
"scroll-step": 1,
|
||||
"tooltip": false
|
||||
},
|
||||
"temperature": {
|
||||
"format": " {temperatureC}°C",
|
||||
"tooltip": false
|
||||
},
|
||||
"tray": {
|
||||
"icon-size": 15,
|
||||
"spacing": 5
|
||||
},
|
||||
"hyprland/workspaces": {
|
||||
"format": "{icon}",
|
||||
"on-click": "activate",
|
||||
"active-only": false,
|
||||
}
|
||||
}
|
||||
]
|
||||
'';
|
||||
".config/waybar/light_style.css".text = ''
|
||||
* {
|
||||
font-family: "JetBrainsMono Nerd Font";
|
||||
font-size: 12pt;
|
||||
font-weight: bold;
|
||||
border-radius: 0px;
|
||||
transition-property: background-color;
|
||||
transition-duration: 0.5s;
|
||||
}
|
||||
@keyframes blink_red {
|
||||
to {
|
||||
background-color: rgb(242, 143, 173);
|
||||
color: rgb(26, 24, 38);
|
||||
}
|
||||
}
|
||||
.warning, .critical, .urgent {
|
||||
animation-name: blink_red;
|
||||
animation-duration: 1s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
window#waybar {
|
||||
background-color: transparent;
|
||||
}
|
||||
window > box {
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
margin-top: 5px;
|
||||
background-color: rgb(250, 244, 252);
|
||||
}
|
||||
#workspaces {
|
||||
padding-left: 0px;
|
||||
padding-right: 4px;
|
||||
}
|
||||
#workspaces button {
|
||||
padding-top: 5px;
|
||||
padding-bottom: 5px;
|
||||
padding-left: 6px;
|
||||
padding-right: 6px;
|
||||
color:#99CCFF;
|
||||
}
|
||||
#workspaces button.active {
|
||||
background-color: rgb(181, 232, 224);
|
||||
color: rgb(26, 24, 38);
|
||||
}
|
||||
#workspaces button.urgent {
|
||||
color: rgb(26, 24, 38);
|
||||
}
|
||||
#workspaces button:hover {
|
||||
background-color: #CCCCFF;
|
||||
color: rgb(26, 24, 38);
|
||||
}
|
||||
tooltip {
|
||||
/* background: rgb(250, 244, 252); */
|
||||
background: rgb(250, 244, 252);
|
||||
}
|
||||
tooltip label {
|
||||
color: rgb(65, 72, 104);
|
||||
}
|
||||
#mode, #clock, #memory, #temperature,#cpu,#mpd, #custom-wall, #temperature, #backlight, #pulseaudio, #network, #battery, #custom-powermenu, #custom-cava-internal {
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
/* #mode { */
|
||||
/* margin-left: 10px; */
|
||||
/* background-color: rgb(248, 189, 150); */
|
||||
/* color: rgb(26, 24, 38); */
|
||||
/* } */
|
||||
#memory {
|
||||
color: #66CCFF;
|
||||
}
|
||||
#cpu {
|
||||
color: #FF99FF;
|
||||
}
|
||||
#clock {
|
||||
color: rgb(65, 72, 104);
|
||||
}
|
||||
/*
|
||||
#idle_inhibitor {
|
||||
color: #FF6699;
|
||||
}*/
|
||||
#custom-wall {
|
||||
color: #FF6699;
|
||||
}
|
||||
#temperature {
|
||||
color: #9933FF;
|
||||
}
|
||||
#backlight {
|
||||
color: #6666FF;
|
||||
}
|
||||
#pulseaudio {
|
||||
color: #FF9900;
|
||||
}
|
||||
#network {
|
||||
color: #00CC66;
|
||||
}
|
||||
|
||||
#network.disconnected {
|
||||
color: #99CCCC;
|
||||
}
|
||||
#battery.charging, #battery.full, #battery.discharging {
|
||||
color: #FF99CC;
|
||||
}
|
||||
#battery.critical:not(.charging) {
|
||||
color: rgb(242, 143, 173);
|
||||
}
|
||||
#custom-powermenu {
|
||||
color: #FF0066;
|
||||
}
|
||||
#tray {
|
||||
padding-right: 8px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
#tray menu {
|
||||
background: rgb(250, 244, 252);
|
||||
color:rgb(192, 202, 245);
|
||||
}
|
||||
#mpd.paused {
|
||||
color: rgb(192, 202, 245);
|
||||
font-style: italic;
|
||||
}
|
||||
#mpd.stopped {
|
||||
background: transparent;
|
||||
}
|
||||
#mpd {
|
||||
color: rgb(65, 72, 104);
|
||||
|
||||
/* color: #c0caf5; */
|
||||
}
|
||||
#custom-cava-internal{
|
||||
font-family: "Hack Nerd Font" ;
|
||||
}
|
||||
'';
|
||||
};
|
||||
home.file = {
|
||||
".config/waybar/nord_config".text = ''
|
||||
[
|
||||
{
|
||||
"backlight": {
|
||||
"device": "intel_backlight",
|
||||
"format": "{icon} {percent}%",
|
||||
"format-icons": [
|
||||
"", "", "", ""
|
||||
],
|
||||
"on-scroll-down": "light -U 5",
|
||||
"on-scroll-up": "light -A 5"
|
||||
},
|
||||
"battery": {
|
||||
"format": "{icon} {capacity}%",
|
||||
"format-charging": " {capacity}%",
|
||||
"format-full": "{icon} {capacity}%",
|
||||
"format-icons": [
|
||||
"", "", "", "", "", "", "", "", "", ""
|
||||
],
|
||||
"interval": 10,
|
||||
"states": {
|
||||
"critical": 10,
|
||||
"warning": 20
|
||||
},
|
||||
"tooltip": false
|
||||
},
|
||||
"clock": {
|
||||
"format": "{:%I:%M %p %A %b %d}",
|
||||
"interval": 1,
|
||||
"tooltip": true,
|
||||
"tooltip-format": "上午:高数\n下午:Ps\n晚上:Golang\n<tt>{calendar}</tt>"
|
||||
},
|
||||
"cpu": {
|
||||
"format": " {usage}%",
|
||||
"interval": 1
|
||||
},
|
||||
"custom/cava-internal": {
|
||||
"exec": "sleep 1s && cava-internal",
|
||||
"tooltip": false
|
||||
},
|
||||
"custom/powermenu": {
|
||||
"format": "",
|
||||
"on-click": "pkill rofi || ~/.config/rofi/powermenu.sh",
|
||||
"tooltip": false
|
||||
},
|
||||
"idle_inhibitor": {
|
||||
"format": "{icon}",
|
||||
"format-icons": {
|
||||
"activated": "",
|
||||
"deactivated": ""
|
||||
},
|
||||
"tooltip": false
|
||||
},
|
||||
"layer": "top",
|
||||
"memory": {
|
||||
"format": " {percentage}%",
|
||||
"interval": 1,
|
||||
"states": {
|
||||
"warning": 85
|
||||
}
|
||||
},
|
||||
"modules-center": [
|
||||
"clock"
|
||||
],
|
||||
"modules-left": [
|
||||
"hyprland/workspaces",
|
||||
"temperature",
|
||||
//"idle_inhibitor",
|
||||
"mpd",
|
||||
"custom/cava-internal"
|
||||
],
|
||||
"modules-right": [
|
||||
"pulseaudio",
|
||||
"backlight",
|
||||
"memory",
|
||||
"cpu",
|
||||
"network",
|
||||
"battery",
|
||||
"custom/powermenu",
|
||||
"tray"
|
||||
],
|
||||
"mpd": {
|
||||
"format": "<span foreground='#8EBBBA'></span> {title}",
|
||||
"format-disconnected": "",
|
||||
"format-paused": " {title}",
|
||||
"format-stopped": "<span foreground='#bb9af7'></span>",
|
||||
"max-length": 25,
|
||||
"on-click": "mpc --quiet toggle",
|
||||
"on-click-middle": "kitty --class='ncmpcpp' ncmpcpp ",
|
||||
"on-click-right": "mpc update; mpc ls | mpc add",
|
||||
"on-scroll-down": "mpc --quiet next",
|
||||
"on-scroll-up": "mpc --quiet prev",
|
||||
"smooth-scrolling-threshold": 5,
|
||||
"tooltip-format": "{title} - {artist} ({elapsedTime:%M:%S}/{totalTime:%H:%M:%S})"
|
||||
},
|
||||
"network": {
|
||||
"format-disconnected": " Disconnected",
|
||||
"format-ethernet": " {ifname} ({ipaddr})",
|
||||
"format-linked": " {essid} (No IP)",
|
||||
"format-wifi": " {essid}",
|
||||
"interval": 1,
|
||||
"tooltip": false
|
||||
},
|
||||
"position": "top",
|
||||
"pulseaudio": {
|
||||
"format": "{icon} {volume}%",
|
||||
"format-icons": {
|
||||
"default": [
|
||||
"",
|
||||
"",
|
||||
""
|
||||
]
|
||||
},
|
||||
"format-muted": " Muted",
|
||||
"on-click": "pamixer -t",
|
||||
"scroll-step": 1,
|
||||
"tooltip": false
|
||||
},
|
||||
"temperature": {
|
||||
"format": " {temperatureC}°C",
|
||||
"tooltip": false
|
||||
},
|
||||
"tray": {
|
||||
"icon-size": 15,
|
||||
"spacing": 5
|
||||
},
|
||||
"hyprland/workspaces": {
|
||||
"format": "{icon}",
|
||||
"on-click": "activate",
|
||||
"active-only": false,
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
'';
|
||||
".config/waybar/nord_style.css".text = ''
|
||||
* {
|
||||
font-family: "JetBrainsMono Nerd Font";
|
||||
font-size: 12pt;
|
||||
font-weight: bold;
|
||||
border-radius: 0px;
|
||||
transition-property: background-color;
|
||||
transition-duration: 0.5s;
|
||||
}
|
||||
@keyframes blink_red {
|
||||
to {
|
||||
background-color: rgb(242, 143, 173);
|
||||
color: rgb(26, 24, 38);
|
||||
}
|
||||
}
|
||||
.warning, .critical, .urgent {
|
||||
animation-name: blink_red;
|
||||
animation-duration: 1s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
window#waybar {
|
||||
background-color: transparent;
|
||||
}
|
||||
window > box {
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
margin-top: 5px;
|
||||
background-color: #3b4252;
|
||||
}
|
||||
#workspaces {
|
||||
padding-left: 0px;
|
||||
padding-right: 4px;
|
||||
}
|
||||
#workspaces button {
|
||||
padding-top: 5px;
|
||||
padding-bottom: 5px;
|
||||
padding-left: 6px;
|
||||
padding-right: 6px;
|
||||
color:#D8DEE9;
|
||||
}
|
||||
#workspaces button.active {
|
||||
background-color: rgb(181, 232, 224);
|
||||
color: rgb(26, 24, 38);
|
||||
}
|
||||
#workspaces button.urgent {
|
||||
color: rgb(26, 24, 38);
|
||||
}
|
||||
#workspaces button:hover {
|
||||
background-color: #B38DAC;
|
||||
color: rgb(26, 24, 38);
|
||||
}
|
||||
tooltip {
|
||||
/* background: rgb(250, 244, 252); */
|
||||
background: #3b4253;
|
||||
}
|
||||
tooltip label {
|
||||
color: #E4E8EF;
|
||||
}
|
||||
#mode, #clock, #memory, #temperature,#cpu,#mpd, #custom-wall, #temperature, #backlight, #pulseaudio, #network, #battery, #custom-powermenu, #custom-cava-internal {
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
/* #mode { */
|
||||
/* margin-left: 10px; */
|
||||
/* background-color: rgb(248, 189, 150); */
|
||||
/* color: rgb(26, 24, 38); */
|
||||
/* } */
|
||||
#memory {
|
||||
color: #8EBBBA;
|
||||
}
|
||||
#cpu {
|
||||
color: #B38DAC;
|
||||
}
|
||||
#clock {
|
||||
color: #E4E8EF;
|
||||
}
|
||||
/*
|
||||
#idle_inhibitor {
|
||||
color: #FF6699;
|
||||
}*/
|
||||
#custom-wall {
|
||||
color: #B38DAC;
|
||||
}
|
||||
#temperature {
|
||||
color: #80A0C0;
|
||||
}
|
||||
#backlight {
|
||||
color: #A2BD8B;
|
||||
}
|
||||
#pulseaudio {
|
||||
color: #E9C98A;
|
||||
}
|
||||
#network {
|
||||
color: #99CC99;
|
||||
}
|
||||
|
||||
#network.disconnected {
|
||||
color: #CCCCCC;
|
||||
}
|
||||
#battery.charging, #battery.full, #battery.discharging {
|
||||
color: #CF876F;
|
||||
}
|
||||
#battery.critical:not(.charging) {
|
||||
color: #D6DCE7;
|
||||
}
|
||||
#custom-powermenu {
|
||||
color: #BD6069;
|
||||
}
|
||||
#tray {
|
||||
padding-right: 8px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
#tray menu {
|
||||
background: #3b4252;
|
||||
color: #DEE2EA;
|
||||
}
|
||||
#mpd.paused {
|
||||
color: rgb(192, 202, 245);
|
||||
font-style: italic;
|
||||
}
|
||||
#mpd.stopped {
|
||||
background: transparent;
|
||||
}
|
||||
#mpd {
|
||||
color: #E4E8EF;
|
||||
|
||||
/* color: #c0caf5; */
|
||||
}
|
||||
#custom-cava-internal{
|
||||
font-family: "Hack Nerd Font" ;
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [ (import ./waybar.nix) ]
|
||||
++ [ (import ./settings.nix) ]
|
||||
++ [ (import ./style.nix) ];
|
||||
}
|
||||
|
|
@ -1,118 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.waybar.settings.mainBar = {
|
||||
position= "top";
|
||||
layer= "top";
|
||||
height= 5;
|
||||
margin-top= 0;
|
||||
margin-bottom= 0;
|
||||
margin-left= 0;
|
||||
margin-right= 0;
|
||||
modules-left= [
|
||||
# "custom/launcher"
|
||||
"hyprland/workspaces"
|
||||
];
|
||||
modules-center= [
|
||||
"clock"
|
||||
];
|
||||
modules-right= [
|
||||
# "cpu"
|
||||
# "memory"
|
||||
# "disk"
|
||||
"pulseaudio"
|
||||
"battery"
|
||||
#"network"
|
||||
"tray"
|
||||
];
|
||||
clock= {
|
||||
calendar = {
|
||||
format = { today = "<span color='#b4befe'><b><u>{}</u></b></span>"; };
|
||||
};
|
||||
format = " {:%H:%M}";
|
||||
tooltip= "true";
|
||||
tooltip-format= "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
|
||||
format-alt= " {:%d/%m}";
|
||||
};
|
||||
"hyprland/workspaces"= {
|
||||
active-only= false;
|
||||
disable-scroll= true;
|
||||
format = "{icon}";
|
||||
on-click= "activate";
|
||||
format-icons= {
|
||||
"1"= "1";
|
||||
"2"= "2";
|
||||
"3"= "3";
|
||||
"4"= "4";
|
||||
"5"= "5";
|
||||
"6"= "6";
|
||||
"7"= "7";
|
||||
"8"= "8";
|
||||
"9"= "9";
|
||||
"10"= "10";
|
||||
urgent= "";
|
||||
default = "";
|
||||
sort-by-number= true;
|
||||
};
|
||||
# persistent-workspaces = {
|
||||
# "1"= [];
|
||||
# "2"= [];
|
||||
# "3"= [];
|
||||
# };
|
||||
};
|
||||
memory= {
|
||||
format= " {}%";
|
||||
format-alt= " {used} GiB"; #
|
||||
interval= 2;
|
||||
};
|
||||
cpu= {
|
||||
format= " {usage}%";
|
||||
format-alt= " {avg_frequency} GHz";
|
||||
interval= 2;
|
||||
};
|
||||
disk = {
|
||||
# path = "/";
|
||||
format = " {percentage_used}%";
|
||||
interval= 60;
|
||||
};
|
||||
network = {
|
||||
format-wifi = " {signalStrength}%";
|
||||
format-ethernet = " ";
|
||||
tooltip-format = "Connected to {essid} {ifname} via {gwaddr}";
|
||||
format-linked = "{ifname} (No IP)";
|
||||
format-disconnected = " ";
|
||||
};
|
||||
tray= {
|
||||
icon-size= 20;
|
||||
spacing = 2; # was 8 originally
|
||||
};
|
||||
pulseaudio= {
|
||||
format= "{icon} {volume}%";
|
||||
format-muted= " {volume}%";
|
||||
format-icons= {
|
||||
default= [" "];
|
||||
};
|
||||
scroll-step= 5;
|
||||
on-click= "pamixer -t";
|
||||
};
|
||||
battery = {
|
||||
format = "{icon} {capacity}%";
|
||||
format-icons = [" " " " " " " " " "];
|
||||
format-charging = " {capacity}%";
|
||||
format-full = " {capacity}%";
|
||||
format-warning = " {capacity}%";
|
||||
interval = 5;
|
||||
states = {
|
||||
warning = 20;
|
||||
};
|
||||
format-time = "{H}h{M}m";
|
||||
tooltip = true;
|
||||
tooltip-format = "{time}";
|
||||
};
|
||||
"custom/launcher"= {
|
||||
format= "";
|
||||
on-click= "pkill wofi || wofi --show drun";
|
||||
on-click-right= "pkill wofi || wallpaper-picker";
|
||||
tooltip= "false";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,99 +0,0 @@
|
|||
{ ... }:
|
||||
let custom = {
|
||||
font = "JetBrainsMono Nerd Font";
|
||||
font_size = "10px";
|
||||
font_weight = "bold";
|
||||
text_color = "#cdd6f4";
|
||||
secondary_accent= "89b4fa";
|
||||
tertiary_accent = "f5f5f5";
|
||||
background = "11111B";
|
||||
opacity = "0.98";
|
||||
};
|
||||
in
|
||||
{
|
||||
programs.waybar.style = ''
|
||||
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
min-height: 0px;
|
||||
font-family: ${custom.font};
|
||||
font-weight: ${custom.font_weight};
|
||||
opacity: ${custom.opacity};
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: none;
|
||||
}
|
||||
|
||||
#workspaces {
|
||||
font-size: 10px;
|
||||
padding-left: 15px;
|
||||
|
||||
}
|
||||
#workspaces button {
|
||||
color: ${custom.text_color};
|
||||
padding-left: 6px;
|
||||
padding-right: 6px;
|
||||
}
|
||||
#workspaces button.empty {
|
||||
color: #6c7086;
|
||||
}
|
||||
#workspaces button.active {
|
||||
color: #b4befe;
|
||||
}
|
||||
|
||||
#tray, #pulseaudio, #network, #cpu, #memory, #disk, #clock, #battery {
|
||||
font-size: ${custom.font_size};
|
||||
color: ${custom.text_color};
|
||||
}
|
||||
|
||||
#cpu {
|
||||
padding-left: 15px;
|
||||
padding-right: 9px;
|
||||
margin-left: 7px;
|
||||
}
|
||||
#memory {
|
||||
padding-left: 9px;
|
||||
padding-right: 9px;
|
||||
}
|
||||
#disk {
|
||||
padding-left: 9px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
#tray {
|
||||
padding: 0 20px;
|
||||
margin-left: 7px;
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
padding-left: 15px;
|
||||
padding-right: 9px;
|
||||
margin-left: 7px;
|
||||
}
|
||||
#battery {
|
||||
padding-left: 9px;
|
||||
padding-right: 9px;
|
||||
}
|
||||
#network {
|
||||
padding-left: 9px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
#clock {
|
||||
padding-left: 9px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
#custom-launcher {
|
||||
font-size: 20px;
|
||||
color: #b4befe;
|
||||
font-weight: ${custom.font_weight};
|
||||
padding-left: 10px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
'';
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
};
|
||||
programs.waybar.package = pkgs.waybar.overrideAttrs (oa: {
|
||||
mesonFlags = (oa.mesonFlags or [ ]) ++ [ "-Dexperimental=true" ];
|
||||
});
|
||||
}
|
||||
110
modules/home/waybar/scripts.nix
Normal file
110
modules/home/waybar/scripts.nix
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
{ pkgs, username, ... }:
|
||||
|
||||
{
|
||||
home.file = {
|
||||
"/home/${username}/.local/bin/waybar-screenrecord" = {
|
||||
executable = true;
|
||||
text = ''
|
||||
#!/bin/sh
|
||||
|
||||
output_off="{\"text\": \"<span color='#aaaaaa'></span>\", \"tooltip\": \"Not recording\", \"alt\": \"\", \"class\": \"\" }"
|
||||
output_rec="{\"text\": \"<span color='#e98989'></span>\", \"tooltip\": \"Recording\", \"alt\": \"\", \"class\": \"\" }"
|
||||
|
||||
pidof wf-recorder > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
if [[ "$1" == "toggle" ]]
|
||||
then
|
||||
killall -s SIGINT wf-recorder > /dev/null 2>&1
|
||||
notify-send -a screenrecorder -t 3000 'Screen recording' "Screen recording was stopped!"
|
||||
echo -n $output_off
|
||||
exit 0
|
||||
fi
|
||||
echo -n $output_rec
|
||||
exit 0
|
||||
else
|
||||
if [[ "$1" == "toggle" ]]
|
||||
then
|
||||
geometry=$(slurp)
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
notify-send -a screenrecorder -t 3000 'Screen recording' "Screen recording was started!"
|
||||
sleep 3
|
||||
wf-recorder -f "$HOME/downloads/$(date +'screenrecording_%Y-%m-%d-%H%M%S.mp4')" -g "$geometry" > /dev/null 2>&1 &
|
||||
echo -n $output_rec
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
echo -n $output_off
|
||||
exit 0
|
||||
fi
|
||||
'';
|
||||
};
|
||||
"/home/${username}/.local/bin/waybar-bluetooth" = {
|
||||
executable = true;
|
||||
text = ''
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
typeset -A known=(
|
||||
'headphones' '38:18:4C:D1:AE:48'
|
||||
'airpods' '2C:18:09:EF:BD:11'
|
||||
)
|
||||
|
||||
function get_addr_or_fail () {
|
||||
if [ "$known[$1]" = "" ]
|
||||
then
|
||||
printf 'No device specified\n'
|
||||
exit 1
|
||||
fi
|
||||
printf "$known[$1]"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
"list")
|
||||
for k v ("''${(@kv)known}") printf "$k\n"
|
||||
;;
|
||||
"toggle")
|
||||
device=""
|
||||
tmp="$2"
|
||||
if [ "$tmp" = "" ]
|
||||
then
|
||||
tmp=$($0 list | bemenu)
|
||||
fi
|
||||
device=$(get_addr_or_fail "$tmp")
|
||||
is_connected=$(bluetoothctl info $device | grep -i 'connected: yes')
|
||||
if [ "$is_connected" != "" ]
|
||||
then
|
||||
bluetoothctl disconnect $device
|
||||
else
|
||||
bluetoothctl connect $device
|
||||
fi
|
||||
;;
|
||||
"status")
|
||||
device=$(get_addr_or_fail "$2")
|
||||
is_connected=$(bluetoothctl info $device | grep -i 'connected: yes')
|
||||
if [ "$is_connected" != "" ]
|
||||
then
|
||||
echo "{\"text\": \"Connected\", \"class\": \"custom-btdevice\", \"alt\": \"connected\" }"
|
||||
else
|
||||
echo "{\"text\": \"Disconnected\", \"class\": \"custom-btdevice\", \"alt\": \"disconnected\" }"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
printf "$0 list|toggle <device>|status <device>\n"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
'';
|
||||
# "/home/${username}/.local/bin/waybar-cpu" = {
|
||||
# executable = true;
|
||||
# text = ''
|
||||
# '';
|
||||
# };
|
||||
};
|
||||
};
|
||||
home.packages = with pkgs; [
|
||||
wf-recorder
|
||||
bemenu
|
||||
];
|
||||
}
|
||||
|
||||
3
modules/home/wlsunset.nix
Normal file
3
modules/home/wlsunset.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{ ... }: {
|
||||
services.wlsunset.enable = true;
|
||||
}
|
||||
|
|
@ -17,6 +17,8 @@
|
|||
# Make Vi mode transitions faster (in hundredths of a second)
|
||||
# KEYTIMEOUT = 1;
|
||||
LANG = "en_US.UTF-8";
|
||||
EDITOR = "nvim";
|
||||
SYSTEMD_LESS = "FRXMK"; # Fix weird sideways scrolling in systemctl status ...
|
||||
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE = "fg=#808080";
|
||||
ZSH_AUTOSUGGEST_USE_ASYNC = 1;
|
||||
HISTSIZE = 100000;
|
||||
|
|
@ -94,8 +96,34 @@
|
|||
bindkey -M menuselect 'j' vi-down-line-or-history
|
||||
bindkey -M menuselect 'l' vi-forward-char
|
||||
|
||||
|
||||
function jitsi-link() {
|
||||
url=$(printf "https://meet.jit.si/%s" "$(uuidgen)")
|
||||
printf "%s" "''${url}" | wl-copy
|
||||
printf "%s\n" "''${url}"
|
||||
}
|
||||
'';
|
||||
|
||||
zsh-abbr = {
|
||||
enable = true;
|
||||
abbreviations = {
|
||||
mkdir="mkdir -p";
|
||||
vim="nvim";
|
||||
v="nvim";
|
||||
vi="nvim";
|
||||
nv="nvim";
|
||||
nvi="nvim";
|
||||
gc="git clone";
|
||||
ga="git add .";
|
||||
gcm="git commit -m";
|
||||
gph="git push -u origin main";
|
||||
g="git";
|
||||
|
||||
calc="eva";
|
||||
wikipedia="wikit";
|
||||
};
|
||||
};
|
||||
|
||||
# setOptions = [
|
||||
# # Corrections
|
||||
# "CORRECT"
|
||||
|
|
@ -115,6 +143,7 @@
|
|||
# ];
|
||||
|
||||
shellAliases = {
|
||||
convert = "magick";
|
||||
ls = "eza -lh --git";
|
||||
la = "eza -A --git";
|
||||
ll = "eza -l --git";
|
||||
|
|
@ -149,16 +178,6 @@
|
|||
};
|
||||
file = "zsh-syntax-highlighting.zsh";
|
||||
}
|
||||
{
|
||||
name = "zsh-abbr";
|
||||
src = fetchFromGitHub {
|
||||
owner = "olets";
|
||||
repo = "zsh-abbr";
|
||||
rev = "752e9fcc4daff680545c30f8f857913d66f6f5e6";
|
||||
sha256 = "sha256-HY/F43fpWn1PBYb2c+qp0CyF3hpSFHUZdZLZRS1d9Yc=";
|
||||
};
|
||||
file = "zsh-abbr.sh";
|
||||
}
|
||||
{
|
||||
name = "zsh-autopair";
|
||||
src = fetchFromGitHub {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue