change waybar

This commit is contained in:
crurak 2023-08-11 14:45:50 +02:00
parent 82ddd5bebb
commit 68bde47d7e
10 changed files with 378 additions and 203 deletions

3
home/blueman.nix Normal file
View File

@ -0,0 +1,3 @@
{
services.blueman-applet.enable = true;
}

View File

@ -2,6 +2,7 @@
home-manager.sharedModules = [
./bash.nix
./bat.nix
./blueman.nix
./dunst.nix
./git.nix
./gtk.nix

View File

@ -11,7 +11,7 @@
gtk-xft-hinting = 1;
gtk-xft-hintstyle = "hintfull";
gtk-xft-rgba = "rgb";
gtk-recent-files-enable = false;
# gtk-recent-files-enable = false;
};
gtk4.extraConfig = {
Settings = ''

View File

@ -50,7 +50,7 @@ in {
}
# animations {
# enabled = true
# enabled = 1
# bezier = myBezier, 0.05, 0.9, 0.1, 1.05
# animation = windows, 1, 7, myBezier
# animation = windowsOut, 1, 7, default, popin 80%
@ -78,6 +78,9 @@ in {
exec-once = waybar
exec-once = hyprpaper
exec-once = dunst
exec-once = blueman-applet
exec-once = nm-applet --indicator
$SUPER = ${modifier}
$SUPER_SHIFT = ${modifier}_SHIFT
@ -86,11 +89,59 @@ in {
bind = $SUPER, Q, killactive
bind = $SUPER, T, exec, kitty
bind = $SUPER, B, exec, librewolf
bind = $SUPER, L, exec, swaylock
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,
bind = $SUPER, V, togglesplit,
bind = $SUPER, 1, exec, hyprland-relative-workspace b
bind = $SUPER, 2, exec, hyprland-relative-workspace f
bind = $SUPER_SHIFT, 1, exec, hyprland-relative-workspace b --with-window
bind = $SUPER_SHIFT, 2, exec, hyprland-relative-workspace f --with-window
bind = $SUPER, left, movefocus, l
bind = $SUPER, right, movefocus, r
bind = $SUPER, up, movefocus, u
bind = $SUPER, down, movefocus, d
bind = $SUPER_SHIFT, left, movewindow, l
bind = $SUPER_SHIFT, right, movewindow, r
bind = $SUPER_SHIFT, up, movewindow, u
bind = $SUPER_SHIFT, down, movewindow, d
bind = ALT, left, resizeactive, -40 0
bind = ALT, down, resizeactive, 0 40
bind = ALT, up, resizeactive, 0 -40
bind = ALT, right, resizeactive, 40 0
bind = ALT, 1, workspace, 1
bind = ALT, 2, workspace, 2
bind = ALT, 3, workspace, 3
bind = ALT, 4, workspace, 4
bind = ALT, 5, workspace, 5
bind = ALT, 6, workspace, 6
bind = ALT, 7, workspace, 7
bind = ALT, 8, workspace, 8
bind = ALT, 9, workspace, 9
bind = ALT, 0, workspace, 0
bind = ALTSHIFT,1,movetoworkspace,1
bind = ALTSHIFT,2,movetoworkspace,2
bind = ALTSHIFT,3,movetoworkspace,3
bind = ALTSHIFT,4,movetoworkspace,4
bind = ALTSHIFT,5,movetoworkspace,5
bind = ALTSHIFT,6,movetoworkspace,6
bind = ALTSHIFT,7,movetoworkspace,7
bind = ALTSHIFT,8,movetoworkspace,8
bind = ALTSHIFT,9,movetoworkspace,9
bind = ALTSHIFT,0,movetoworkspace,0
bind = ALTSHIFT,left,movetoworkspace,-1
bind = ALTSHIFT,right,movetoworkspace,+1
bind = CTRL,right,resizeactive,20 0
bind = CTRL,left,resizeactive,-20 0
bind = CTRL,up,resizeactive,0 -20
bind = CTRL,down,resizeactive,0 20
# Move/resize windows with super + LMB/RMB and dragging
bindm = $SUPER, mouse:272, movewindow

View File

@ -1,21 +1,11 @@
{ 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;
};
};
xdg.configFile."swaylog/config".text = ''
screenshots
clock
indicator
indicator-radius 100
effect-blur 7x5
fade-in 0.2
'';
}

View File

@ -4,212 +4,333 @@
{
"layer": "top",
"position": "top",
"height": 20,
"mod": "dock",
"height": 32,
"exclusive": true,
"passthrough": false,
"gtk-layer-shell": true,
"modules-left": [
"temperature",
"cpu",
"memory"
],
"modules-center": ["hyprland/window"],
"modules-right": [
"battery",
"clock"
],
"hyprland/window": {
"format": "{}"
"modules-left": ["custom/padd","custom/l_end","custom/power","custom/r_end","custom/l_end","wlr/taskbar","custom/r_end","","custom/padd"],
"modules-center": ["custom/padd","custom/l_end","clock","custom/r_end","custom/padd"],
"modules-right": ["custom/padd","custom/l_end","tray","custom/r_end","custom/l_end","network","bluetooth","pulseaudio","custom/r_end","custom/padd"],
"custom/power": {
"format": "{}",
"exec": "echo ; echo logout",
"on-click": "wlogout -b 2 -c 0 -r 0 -L 930 -R 930 -T 300 -B 300 --protocol layer-shell",
"interval" : 86400, // once every day
"tooltip": true
},
"wlr/taskbar": {
"format": "{icon}",
"icon-size": 18,
"icon-theme": "Tela-circle-dracula",
"spacing": 0,
"tooltip-format": "{title}",
"on-click": "activate",
"on-click-middle": "close",
"ignore-list": [
"Alacritty"
],
"app_ids-mapping": {
"firefoxdeveloperedition": "firefox-developer-edition"
}
},
"clock": {
"format": "{:%H:%M}",
"format-alt": "{:%b %d %Y}",
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"format": "{: %I:%M %p 󰃭 %a %d}",
"format-alt": "{:󰥔 %H:%M %b %Y}",
"tooltip-format": "<tt><big>{calendar}</big></tt>"
},
"cpu": {
"interval": 10,
"format": " {}%",
"max-length": 10,
"on-click": "",
"tray": {
"icon-size": 18,
"spacing": 5
},
"memory": {
"interval": 30,
"format": " {}%",
"format-alt":" {used:0.1f}GB",
"max-length": 10,
"network": {
// "interface": "wlp2*", // (Optional) To force the use of this interface
"format-wifi": "󰤨 {essid}",
"format-ethernet": "󱘖 Wired",
"tooltip-format": "󱘖 {ipaddr} {bandwidthUpBytes} {bandwidthDownBytes}",
"format-linked": "󱘖 {ifname} (No IP)",
"format-disconnected": " Disconnected",
"format-alt": "󰤨 {signalStrength}%",
"interval": 5
},
"temperature": {
"interval": 10,
"format": " {temperatureC}°C",
"format-alt":"temprature",
"max-length": 10,
"bluetooth": {
"format": "",
"format-disabled": "", // an empty format will hide the module
"format-connected": " {num_connections}",
"tooltip-format": " {device_alias}",
"tooltip-format-connected": "{device_enumerate}",
"tooltip-format-enumerate-connected": " {device_alias}"
},
"battery": {
"bat": "BAT0",
"adapter": "ADP0",
"interval": 60,
"states": {
"warning": 30,
"critical": 15
},
"max-length": 20,
"format": "{icon}",
"format-warning": "{icon}",
"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}",
"format-muted": "",
"on-click": "pavucontrol -t 3",
"on-click-middle": "~/.config/hypr/scripts/volumecontrol.sh -o m",
"on-scroll-up": "~/.config/hypr/scripts/volumecontrol.sh -o i",
"on-scroll-down": "~/.config/hypr/scripts/volumecontrol.sh -o d",
"tooltip-format": "{icon} {desc} // {volume}%",
"scroll-step": 5,
"format-icons": {
"headphone": "",
"hands-free": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", "", ""]
}
},
// "pulseaudio#microphone": {
// "format": "{format_source}",
// "format-source": "",
// "format-source-muted": "",
// "on-click": "pavucontrol -t 4",
// "on-click-middle": "~/.config/hypr/scripts/volumecontrol.sh -i m",
// "on-scroll-up": "~/.config/hypr/scripts/volumecontrol.sh -i i",
// "on-scroll-down": "~/.config/hypr/scripts/volumecontrol.sh -i d",
// "tooltip-format": "{format_source} {source_desc} // {source_volume}%",
// "scroll-step": 5
// },
// modules for padding //
"custom/l_end": {
"format": " ",
"interval" : "once",
"tooltip": false
},
"custom/r_end": {
"format": " ",
"interval" : "once",
"tooltip": false
},
"custom/sl_end": {
"format": " ",
"interval" : "once",
"tooltip": false
},
"custom/sr_end": {
"format": " ",
"interval" : "once",
"tooltip": false
},
"custom/rl_end": {
"format": " ",
"interval" : "once",
"tooltip": false
},
"custom/rr_end": {
"format": " ",
"interval" : "once",
"tooltip": false
},
"custom/padd": {
"format": " ",
"interval" : "once",
"tooltip": false
}
}
'';
xdg.configFile."waybar/style.css".text = /* css */ ''
* {
/* `otf-font-awesome` is required to be installed for icons */
font-family: Material Design Icons, JetBrainsMono Nerd Font, Iosevka Nerd Font;
font-size: 12px;
border: none;
border-radius: 0;
min-height: 0;
border: none;
border-radius: 0px;
font-family: "JetBrainsMono Nerd Font";
font-weight: bold;
font-size: 11px;
min-height: 10px;
}
@import "themes/Catppuccin-Mocha.css";
window#waybar {
background-color: rgba(26, 27, 38, 0.5);
color: #ffffff;
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;
background: @bar-bg;
}
tooltip {
font-family: Iosevka Nerd Font;
border-radius: 15px;
padding: 15px;
background-color: #1f232b;
background: @tool-bg;
color: @tool-color;
border-radius: 21px;
border-width: 1px;
border-style: solid;
border-color: @tool-border;
}
tooltip label {
font-family: Iosevka Nerd Font;
padding: 5px;
#workspaces button {
box-shadow: none;
text-shadow: none;
padding: 0px;
border-radius: 9px;
margin-top: 3px;
margin-bottom: 3px;
padding-left: 3px;
padding-right: 3px;
color: @wb-color;
animation: gradient_f 20s ease-in infinite;
transition: all 0.5s cubic-bezier(.55,-0.68,.48,1.682);
}
label:focus {
background-color: #1f232b;
#workspaces button.active {
background: @wb-act-bg;
color: @wb-act-color;
margin-left: 3px;
padding-left: 12px;
padding-right: 12px;
margin-right: 3px;
animation: gradient_f 20s ease-in infinite;
transition: all 0.3s cubic-bezier(.55,-0.68,.48,1.682);
}
#custom-wallpaper {
color: #dbd9d8;
padding-right: 5;
padding-left: 0;
#workspaces button:hover {
background: @wb-hvr-bg;
color: @wb-hvr-color;
padding-left: 3px;
padding-right: 3px;
animation: gradient_f 20s ease-in infinite;
transition: all 0.3s cubic-bezier(.55,-0.68,.48,1.682);
}
#taskbar button {
box-shadow: none;
text-shadow: none;
padding: 0px;
border-radius: 9px;
margin-top: 3px;
margin-bottom: 3px;
padding-left: 3px;
padding-right: 3px;
color: @wb-color;
animation: gradient_f 20s ease-in infinite;
transition: all 0.5s cubic-bezier(.55,-0.68,.48,1.682);
}
#taskbar button.active {
background: @wb-act-bg;
color: @wb-act-color;
margin-left: 3px;
padding-left: 12px;
padding-right: 12px;
margin-right: 3px;
animation: gradient_f 20s ease-in infinite;
transition: all 0.3s cubic-bezier(.55,-0.68,.48,1.682);
}
#taskbar button:hover {
background: @wb-hvr-bg;
color: @wb-hvr-color;
padding-left: 3px;
padding-right: 3px;
animation: gradient_f 20s ease-in infinite;
transition: all 0.3s cubic-bezier(.55,-0.68,.48,1.682);
}
#cpu,
#memory,
#battery,
#clock,
#workspaces,
#window,
#taskbar,
#network,
#bluetooth,
#pulseaudio,
#mpris,
#custom-updates,
#custom-wallchange,
#custom-mode,
#custom-cliphist,
#custom-power,
#custom-wbar,
#custom-l_end,
#custom-r_end,
#custom-sl_end,
#custom-sr_end,
#custom-rl_end,
#custom-rr_end,
#tray {
color: @main-color;
background: @main-bg;
opacity: 1;
margin: 4px 0px 4px 0px;
padding-left: 4px;
padding-right: 4px;
}
#workspaces,
#taskbar {
padding: 0px;
}
#custom-r_end {
border-radius: 0px 21px 21px 0px;
margin-right: 9px;
padding-right: 3px;
}
#custom-l_end {
border-radius: 21px 0px 0px 21px;
margin-left: 9px;
padding-left: 3px;
}
#custom-sr_end {
border-radius: 0px;
margin-right: 9px;
padding-right: 3px;
}
#custom-sl_end {
border-radius: 0px;
margin-left: 9px;
padding-left: 3px;
}
#custom-rr_end {
border-radius: 0px 7px 7px 0px;
margin-right: 9px;
padding-right: 3px;
}
#custom-rl_end {
border-radius: 7px 0px 0px 7px;
margin-left: 9px;
padding-left: 3px;
}
'';
xdg.configFile."waybar/themes/Catppuccin-Mocha.css".text = ''
@define-color bar-bg rgba(0, 0, 0, 0);
@define-color main-color #cdd6f4;
@define-color main-bg #11111b;
@define-color tool-bg #1e1e2e;
@define-color tool-color #cdd6f4;
@define-color tool-border #11111b;
@define-color wb-color #cdd6f4;
@define-color wb-act-bg #a6adc8;
@define-color wb-act-color #313244;
@define-color wb-hvr-bg #f5c2e7;
@define-color wb-hvr-color #313244;
'';
}

3
modules/bluetooth.nix Normal file
View File

@ -0,0 +1,3 @@
{
hardware.bluetooth.enable = true;
}

View File

@ -1,5 +1,6 @@
{
imports = [
./bluetooth.nix
./boot.nix
./fonts.nix
./greetd.nix

View File

@ -14,12 +14,14 @@
# xdg-desktop-portal-gtk
rofi-wayland # launcher
# wl-clipboard # wayland clipboard support
# swaylock-effects # screenlocker
# swayidle # idle daemon (screen time out)
wl-clipboard # wayland clipboard support
swaylock-effects # screenlocker
swayidle # idle daemon (screen time out)
hyprpaper # Wallpaper daemon
];
security.pam.services.swaylock = { };
services.xserver = {
enable = true;
excludePackages = [ pkgs.xterm ];

View File

@ -4,9 +4,12 @@
git
jq
neofetch
networkmanagerapplet
python3
ripgrep # rg in home/hyprland.nix
tree
wget
wlogout
wl-clipboard
];
}