mirror of
https://github.com/szymon-jozef/amazing-dotfiles.git
synced 2026-09-07 12:10:45 +02:00
waybar
This commit is contained in:
@@ -1,70 +0,0 @@
|
||||
[general]
|
||||
# Start Satty in fullscreen mode
|
||||
fullscreen = true
|
||||
# Exit directly after copy/save action
|
||||
early-exit = true
|
||||
# Draw corners of rectangles round if the value is greater than 0 (0 disables rounded corners)
|
||||
corner-roundness = 12
|
||||
# Select the tool on startup [possible values: pointer, crop, line, arrow, rectangle, text, marker, blur, brush]
|
||||
initial-tool = "crop"
|
||||
# Configure the command to be called on copy, for example `wl-copy`
|
||||
copy-command = "wl-copy"
|
||||
# Increase or decrease the size of the annotations
|
||||
annotation-size-factor = 2
|
||||
# Filename to use for saving action. Omit to disable saving to file. Might contain format specifiers: https://docs.rs/chrono/latest/chrono/format/strftime/index.html
|
||||
output-filename = "/home/szymon/Obrazy/zrzuty/%d-%m-%Y_%H:%M:%S.png"
|
||||
# After copying the screenshot, save it to a file as well
|
||||
save-after-copy = true
|
||||
# Hide toolbars by default
|
||||
default-hide-toolbars = false
|
||||
# The primary highlighter to use, the other is accessible by holding CTRL at the start of a highlight [possible values: block, freehand]
|
||||
primary-highlighter = "block"
|
||||
# Disable notifications
|
||||
disable-notifications = false
|
||||
# Actions to trigger on right click (order is important)
|
||||
# [possible values: save-to-clipboard, save-to-file, exit]
|
||||
actions-on-right-click = []
|
||||
# Actions to trigger on Enter key (order is important)
|
||||
# [possible values: save-to-clipboard, save-to-file, exit]
|
||||
actions-on-enter = ["save-to-clipboard"]
|
||||
# Actions to trigger on Escape key (order is important)
|
||||
# [possible values: save-to-clipboard, save-to-file, exit]
|
||||
actions-on-escape = ["exit"]
|
||||
# Action to perform when the Enter key is pressed [possible values: save-to-clipboard, save-to-file]
|
||||
# Deprecated: use actions-on-enter instead
|
||||
action-on-enter = "save-to-clipboard"
|
||||
# Right click to copy
|
||||
# Deprecated: use actions-on-right-click instead
|
||||
right-click-copy = false
|
||||
# request no window decoration. Please note that the compositor has the final say in this. At this point. requires xdg-decoration-unstable-v1.
|
||||
no-window-decoration = true
|
||||
# experimental feature: adjust history size for brush input smooting (0: disabled, default: 0, try e.g. 5 or 10)
|
||||
brush-smooth-history-size = 10
|
||||
|
||||
# Font to use for text annotations
|
||||
[font]
|
||||
family = "Roboto"
|
||||
style = "Bold"
|
||||
|
||||
# Custom colours for the colour palette
|
||||
[color-palette]
|
||||
# These will be shown in the toolbar for quick selection
|
||||
palette = [
|
||||
"#00ffff",
|
||||
"#a52a2a",
|
||||
"#dc143c",
|
||||
"#ff1493",
|
||||
"#ffd700",
|
||||
"#008000",
|
||||
]
|
||||
|
||||
# These will be available in the color picker as presets
|
||||
# Leave empty to use GTK's default
|
||||
custom = [
|
||||
"#00ffff",
|
||||
"#a52a2a",
|
||||
"#dc143c",
|
||||
"#ff1493",
|
||||
"#ffd700",
|
||||
"#008000",
|
||||
]
|
||||
11
flake.nix
11
flake.nix
@@ -7,7 +7,6 @@
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
catppuccin.url = "github:catppuccin/nix";
|
||||
};
|
||||
|
||||
@@ -20,7 +19,7 @@
|
||||
}:
|
||||
|
||||
let
|
||||
user = "szymon";
|
||||
username = "szymon";
|
||||
# for git
|
||||
email = "szymon_jozef@proton.me";
|
||||
full_name = "Szymon P";
|
||||
@@ -30,10 +29,8 @@
|
||||
"arch" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = import nixpkgs { system = "x86_64-linux"; };
|
||||
extraSpecialArgs = {
|
||||
inherit username email full_name;
|
||||
isNixOS = false;
|
||||
username = user;
|
||||
email = email;
|
||||
full_name = full_name;
|
||||
};
|
||||
modules = [
|
||||
./home.nix
|
||||
@@ -44,10 +41,8 @@
|
||||
"nixos" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = import nixpkgs { system = "x86_64-linux"; };
|
||||
extraSpecialArgs = {
|
||||
inherit username email full_name;
|
||||
isNixOS = true;
|
||||
username = user;
|
||||
email = email;
|
||||
full_name = full_name;
|
||||
};
|
||||
modules = [
|
||||
./home.nix
|
||||
|
||||
20
home.nix
20
home.nix
@@ -1,18 +1,13 @@
|
||||
{
|
||||
pkgs,
|
||||
isNixOS,
|
||||
username,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
# Home Manager needs a bit of information about you and the paths it should
|
||||
# manage.
|
||||
home.username = username;
|
||||
home.homeDirectory = "/home/${username}";
|
||||
|
||||
home.file."test-os.txt".text = if isNixOS then "this is nixos" else "this is arch";
|
||||
|
||||
nix = {
|
||||
package = pkgs.nix;
|
||||
settings.experimental-features = [
|
||||
@@ -21,6 +16,7 @@
|
||||
];
|
||||
};
|
||||
|
||||
# === THEME ===
|
||||
catppuccin = {
|
||||
enable = true;
|
||||
flavor = "mocha";
|
||||
@@ -41,32 +37,28 @@
|
||||
./modules/kitty.nix
|
||||
./modules/satty.nix
|
||||
./modules/ashell.nix
|
||||
./modules/waybar.nix
|
||||
];
|
||||
|
||||
home.stateVersion = "25.11"; # Please read the comment before changing.
|
||||
|
||||
# The home.packages option allows you to install Nix packages into your
|
||||
# environment.
|
||||
|
||||
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
||||
# plain files is through 'home.file'.
|
||||
# === DOTFILES IMPORT ===
|
||||
home.file = {
|
||||
".config/fastfetch".source = ./dotfiles/fastfetch;
|
||||
".config/MangoHud".source = ./dotfiles/mangohud;
|
||||
".config/nvim".source = ./dotfiles/nvim;
|
||||
".config/gtk-3.0/settings.ini".source = ./dotfiles/gtk-3.0/settings.ini;
|
||||
".config/gtk-4.0".source = ./dotfiles/gtk-4.0;
|
||||
".config/waybar".source = ./dotfiles/waybar;
|
||||
".config/hypr".source = ./dotfiles/hypr;
|
||||
".config/mimeapps.list".source = ./dotfiles/mimeapps.list;
|
||||
".local/bin".source = ./scripts;
|
||||
};
|
||||
|
||||
# === VARS ===
|
||||
|
||||
home.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
VISUAL = "nvim";
|
||||
};
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
home.stateVersion = "25.11"; # DONT CHANGE ME UwU
|
||||
}
|
||||
|
||||
@@ -17,5 +17,6 @@
|
||||
slurp
|
||||
wl-clipboard
|
||||
bc
|
||||
nh
|
||||
];
|
||||
}
|
||||
|
||||
343
modules/waybar.nix
Normal file
343
modules/waybar.nix
Normal file
@@ -0,0 +1,343 @@
|
||||
{
|
||||
pkgs,
|
||||
isNixOS,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
package =
|
||||
if isNixOS then pkgs.waybar else (pkgs.writeShellScriptBin "waybar" "exec /usr/bin/waybar \"$@\"");
|
||||
settings = {
|
||||
mainBar = {
|
||||
layer = "top";
|
||||
position = "right";
|
||||
spacing = 4;
|
||||
margin-top = 10;
|
||||
margin-bottom = 10;
|
||||
margin-left = 8;
|
||||
margin-right = 8;
|
||||
mode = "dock";
|
||||
reload_style_on_change = true;
|
||||
width = 70;
|
||||
output = [
|
||||
"DP-1"
|
||||
"eDP-1"
|
||||
"LVDS-1"
|
||||
];
|
||||
|
||||
modules-left = [
|
||||
"clock"
|
||||
"custom/notifications"
|
||||
"privacy"
|
||||
"custom/spotify"
|
||||
"pulseaudio"
|
||||
];
|
||||
modules-center = [
|
||||
"hyprland/workspaces"
|
||||
];
|
||||
modules-right = [
|
||||
"battery"
|
||||
"tray"
|
||||
];
|
||||
|
||||
"hyprland/workspaces" = {
|
||||
format = "{} - {icon}";
|
||||
on-click = "activate";
|
||||
on-click-right = "close";
|
||||
all-outputs = true;
|
||||
active-only = false;
|
||||
sort-by-number = true;
|
||||
format-icons = {
|
||||
"1" = "";
|
||||
"2" = "";
|
||||
"3" = "";
|
||||
"4" = "";
|
||||
"5" = "";
|
||||
"6" = "";
|
||||
"7" = "";
|
||||
"8" = "";
|
||||
"9" = "";
|
||||
"10" = "";
|
||||
default = "";
|
||||
};
|
||||
};
|
||||
|
||||
tray = {
|
||||
spacing = 10;
|
||||
};
|
||||
|
||||
clock = {
|
||||
format = "<big>{:%R}</big>";
|
||||
format-alt = "<small>{:%d.%m.%Y}</small>";
|
||||
tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
|
||||
calendar = {
|
||||
mode = "year";
|
||||
mode-mon-col = 3;
|
||||
weeks-pos = "right";
|
||||
on-scroll = 1;
|
||||
format = {
|
||||
months = "<span color='#ffead3'><b>{}</b></span>";
|
||||
days = "<span color='#ecc6d9'><b>{}</b></span>";
|
||||
weeks = "<span color='#99ffdd'><b>W{}</b></span>";
|
||||
weekdays = "<span color='#ffcc66'><b>{}</b></span>";
|
||||
today = "<span color='#ff6699'><b><u>{}</u></b></span>";
|
||||
};
|
||||
actions = {
|
||||
on-click-right = "mode";
|
||||
on-scroll-up = "tz_up";
|
||||
on-scroll-down = "tz_down";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
network = {
|
||||
format-wifi = " ({signalStrength}%) ";
|
||||
format-ethernet = "";
|
||||
tooltip-format = "{ifname} via {gwaddr} with {ipaddr}/{cidr} ";
|
||||
format-linked = "{ifname} (No IP) ";
|
||||
format-disconnected = "Disconnected ⚠";
|
||||
on-click = "kitty nmtui";
|
||||
};
|
||||
|
||||
pulseaudio = {
|
||||
format = "{volume}% {icon}";
|
||||
format-bluetooth = "{volume}% {icon} {format_source}";
|
||||
format-bluetooth-muted = " {icon} {format_source}";
|
||||
format-muted = " ";
|
||||
format-source = " {volume}% ";
|
||||
format-source-muted = " ";
|
||||
format-icons = {
|
||||
headphone = "";
|
||||
hands-free = " ";
|
||||
headset = " ";
|
||||
phone = " ";
|
||||
portable = " ";
|
||||
car = " ";
|
||||
default = [
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
on-click = "pavucontrol -t 3";
|
||||
on-click-right = "pactl set-sink-mute @DEFAULT_SINK@ toggle";
|
||||
};
|
||||
|
||||
"custom/spotify" = {
|
||||
format = "{}";
|
||||
return-type = "json";
|
||||
on-click = "playerctl play-pause --player spotify";
|
||||
on-click-right = "killall spotify";
|
||||
on-scroll-up = "playerctl next --player spotify";
|
||||
on-scroll-down = "playerctl previous --player spotify";
|
||||
restart-interval = 0;
|
||||
hide-empty-text = true;
|
||||
justify = "center";
|
||||
max-length = 40;
|
||||
exec =
|
||||
let
|
||||
playerctl = "${pkgs.playerctl}/bin/playerctl";
|
||||
jq = "${pkgs.jq}/bin/jq";
|
||||
pkill = "${pkgs.procps}/bin/pkill";
|
||||
|
||||
mediaPlayerScript = pkgs.writeShellScript "mediaplayer" ''
|
||||
if [ -z "$1" ]; then
|
||||
echo "Użycie: $0 <nazwa_odtwarzacza>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
player="$1"
|
||||
|
||||
${playerctl} -p "$player" metadata --format "{{status}} {{artist}} - {{title}}" --follow | while read -r line; do
|
||||
# Nix wymaga ''${ dla zmiennych basha w stringach nixowych
|
||||
current_status=$(${playerctl} --player="$player" status 2>/dev/null)
|
||||
|
||||
case "$current_status" in
|
||||
"Playing")
|
||||
icon=""
|
||||
;;
|
||||
"Paused")
|
||||
icon=""
|
||||
;;
|
||||
*)
|
||||
icon=""
|
||||
;;
|
||||
esac
|
||||
|
||||
tooltip=$(${playerctl} --player="$player" metadata --format "{{artist}} - {{title}}" 2>/dev/null)
|
||||
|
||||
${jq} -nc --arg text "$icon" --arg tooltip "$tooltip" \
|
||||
'{"text": $text, "tooltip": $tooltip}'
|
||||
|
||||
if [[ -n "$icon" ]]; then
|
||||
${pkill} -SIGRTMIN+1 waybar
|
||||
fi
|
||||
done
|
||||
'';
|
||||
in
|
||||
"${mediaPlayerScript} spotify";
|
||||
};
|
||||
|
||||
"custom/notifications" = {
|
||||
format = "<big>{text}</big>";
|
||||
on-click-right = "~/.local/bin/check-do-not-disturb.sh change";
|
||||
exec = "~/.local/bin/check-do-not-disturb.sh show";
|
||||
exec-on-event = "~/.local/bin/check-do-not-disturb.sh show";
|
||||
tooltip = false;
|
||||
return-type = "text";
|
||||
signal = 2;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
style = ''
|
||||
@define-color rosewater #f5e0dc;
|
||||
@define-color flamingo #f2cdcd;
|
||||
@define-color pink #f5c2e7;
|
||||
@define-color mauve #cba6f7;
|
||||
@define-color red #f38ba8;
|
||||
@define-color maroon #eba0ac;
|
||||
@define-color peach #fab387;
|
||||
@define-color yellow #f9e2af;
|
||||
@define-color green #a6e3a1;
|
||||
@define-color teal #94e2d5;
|
||||
@define-color sky #89dceb;
|
||||
@define-color sapphire #74c7ec;
|
||||
@define-color blue #89b4fa;
|
||||
@define-color lavender #b4befe;
|
||||
@define-color text #cdd6f4;
|
||||
@define-color subtext1 #bac2de;
|
||||
@define-color subtext0 #a6adc8;
|
||||
@define-color overlay2 #9399b2;
|
||||
@define-color overlay1 #7f849c;
|
||||
@define-color overlay0 #6c7086;
|
||||
@define-color surface2 #585b70;
|
||||
@define-color surface1 #45475a;
|
||||
@define-color surface0 #313244;
|
||||
@define-color base #1e1e2e;
|
||||
@define-color mantle #181825;
|
||||
@define-color crust #11111b;
|
||||
|
||||
/* Global styles */
|
||||
* {
|
||||
transition: 0.2s all ease-in-out;
|
||||
font-size: 14px;
|
||||
font-family: inherit;
|
||||
padding: 3px;
|
||||
margin: 1px 2px;
|
||||
color: @text;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
*:hover {
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
/* Window */
|
||||
window#waybar {
|
||||
background-color: @base;
|
||||
border-radius: 15px;
|
||||
}
|
||||
|
||||
/* Workspaces */
|
||||
#workspaces button {
|
||||
padding: 2px;
|
||||
margin: 1px;
|
||||
background: transparent;
|
||||
color: @lavender;
|
||||
box-shadow: inset 0 1.5px;
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
background-color: @surface1;
|
||||
box-shadow: inset 2px 5px;
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
background-color: @surface0;
|
||||
box-shadow: inset 1px 4px 0 1px;
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
background-color: @red;
|
||||
animation-name: blink;
|
||||
animation-duration: 1s;
|
||||
animation-timing-function: steps(12);
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
/* Clock */
|
||||
#clock {
|
||||
font-style: oblique;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* Modules */
|
||||
.modules-left,
|
||||
.modules-right,
|
||||
.modules-center {
|
||||
background-color: @crust;
|
||||
}
|
||||
|
||||
/* Tray */
|
||||
#tray>.needs-attention {
|
||||
background-color: @red;
|
||||
}
|
||||
|
||||
/* Custom */
|
||||
#custom-spotify:hover {
|
||||
background-color: @green;
|
||||
}
|
||||
|
||||
#network:hover {
|
||||
background-color: @sky;
|
||||
}
|
||||
|
||||
#custom-notifications:hover {
|
||||
background-color: @sapphire;
|
||||
}
|
||||
|
||||
/* Battery */
|
||||
#battery {
|
||||
background-color: @base;
|
||||
}
|
||||
|
||||
#battery.warning:not(.charging) {
|
||||
background: @yellow;
|
||||
color: @foreground;
|
||||
animation-name: blink;
|
||||
animation-duration: 1s;
|
||||
animation-timing-function: steps(12);
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
#battery.charging,
|
||||
#battery.plugged {
|
||||
color: @foreground;
|
||||
background-color: @green;
|
||||
}
|
||||
|
||||
#battery.critical:not(.charging) {
|
||||
background-color: @red;
|
||||
color: @foreground;
|
||||
animation-name: blink;
|
||||
animation-duration: 1s;
|
||||
animation-timing-function: steps(12);
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
to {
|
||||
background-color: #ff0000;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
'';
|
||||
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user