diff --git a/README.md b/README.md index 68158e96..0aaf519b 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Repo for nix configuration files * Possibly switch to tuigreet and gruv it * [ ] mako config / theming * [ ] waybar config / theming -* [ ] hyprland config / theming +* [x] hyprland config / theming * [x] Try `libinput-gestures` for gesture control of Hyprland - [Link](https://github.com/bulletmark/libinput-gestures) * [x] powerline config / theming * [x] neofetch config / theming @@ -21,7 +21,7 @@ Repo for nix configuration files * [x] btop config / theming * [ ] swaylock config / theming * [ ] vscodium and user-config.js file? -* [ ] Get function keys working (sound, brightness, etc) +* [x] Get function keys working (sound, brightness, etc) * [ ] rofi - bitwarden-cli / bitwarden-menu ([Link](https://search.nixos.org/packages?channel=23.05&show=bitwarden-menu&from=0&size=50&sort=relevance&type=packages&query=bitwarden)) * [ ] Try and submit this as a nixpkg - [Link](https://github.com/SylEleuth/gruvbox-plus-icon-pack) * [x] Possibly move away from powerline-go - I want something simpler @@ -30,11 +30,10 @@ Repo for nix configuration files * [ ] sublime music config / theming / integration - [Link](https://docs.sublimemusic.app/) * [ ] hyprland * [x] Try hyprctl - * [ ] hyprwm plugins * [ ] hyprbars - [Link](https://github.com/hyprwm/hyprland-plugins/tree/main/hyprbars) * [x] libinput-gestures? - * [ ] configure programs.light - keybinds in hyprland config - * [ ] authentication agent (like polkit-kde-agent) + * [x configure programs.light - keybinds in hyprland config + * [x] authentication agent (like polkit-kde-agent) --- diff --git a/hosts/nixos-laptop/home-manager/hyprland-conf.nix b/hosts/nixos-laptop/home-manager/hyprland-conf.nix index 1650b11d..bae221ce 100644 --- a/hosts/nixos-laptop/home-manager/hyprland-conf.nix +++ b/hosts/nixos-laptop/home-manager/hyprland-conf.nix @@ -153,19 +153,21 @@ bind = $mainMod, left, workspace, e-1 bind = $mainMod SHIFT, right, movetoworkspace, e+1 bind = $mainMod SHIFT, left, movetoworkspace, e-1 + + # Laptop specific config # Set up the FN keys: # F1 - Mute bind = , XF86AudioMute, exec, amixer set Master toggle # F2 - Volume Down - bind = , XF86AudioLowerVolume, exec, amixer set Master 3%- + binde = , XF86AudioLowerVolume, exec, amixer set Master 3%- # F3 - Volume Up - bind = , XF86AudioRaiseVolume, exec, amixer set Master 3%+ + binde = , XF86AudioRaiseVolume, exec, amixer set Master 3%+ # F4 - Mute Microphone bind = , XF86AudioMicMute, exec, amixer set Capture toggle # F5 - Brightness Down - bind = , XF86MonBrightnessDown, exec, light -U 5 + binde = , XF86MonBrightnessDown, exec, light -U 5 # F6 - Brightness Up - bind = , XF86MonBrightnessUp, exec, light -A 5 + binde = , XF86MonBrightnessUp, exec, light -A 5 # F7 - External Displays # bind = , XF86 # F8 - Airplane Mode @@ -179,7 +181,7 @@ # F12 - Favorites? # bind = , XF86 # Use rofi as an alt-tab switcher - bind = ALT-L TAB, , exec, rofi -show window + bind = ALT, TAB, exec, rofi -show window # Start the config: exec-once=bash ~/.config/hypr/start.sh diff --git a/hosts/nixos-laptop/home-manager/waybar-conf.nix b/hosts/nixos-laptop/home-manager/waybar-conf.nix index 12a90b67..f2516ce5 100644 --- a/hosts/nixos-laptop/home-manager/waybar-conf.nix +++ b/hosts/nixos-laptop/home-manager/waybar-conf.nix @@ -7,480 +7,341 @@ enable = true; executable = false; text = '' + { "layer": "top", - "position": "bottom", - "height": 35, - "spacing": 4, - "margin-top": 10, - "margin-bottom":5, + "position": "top", + "modules-left": ["sway/workspaces", "custom/arrow-dark-on-light-right", + "custom/crypto", "custom/arrow-light-on-dark-right", + "custom/weather", "custom/arrow-dark-on-bg-right", + "sway/mode"], + "modules-center": ["clock"], + "modules-right": ["custom/arrow-light-on-bg-left", "pulseaudio", + "custom/arrow-dark-on-light-left", "network", + "custom/arrow-light-on-dark-left", "cpu", + "custom/arrow-dark-on-light-left", "memory", + "custom/arrow-light-on-dark-left", "temperature", + "custom/arrow-dark-on-light-left", "backlight", + "custom/arrow-light-on-dark-left", "battery", + "custom/arrow-dark-on-light-left", "sway/language", + "custom/arrow-light-on-dark-left", "tray"], - // Choose the order of the modules + "sway/workspaces": { + "disable-scroll": true + }, - "modules-left":[ "idle_inhibitor", "pulseaudio", "cpu", "memory", "temperature"], - "modules-center": [ "custom/launcher", "custom/media","wlr/taskbar", "custom/power"], - "modules-right":["custom/layout", "custom/updater", "custom/snip", "backlight", "keyboard-state", "battery", "battery#bat2", "network", "tray", "clock"], - // Modules configuration - - "keyboard-state": { - "numlock": true, - "capslock": true, - "format": " {name} {icon}", - "format-icons": { - "locked": "", - "unlocked": "" - } - }, - "wlr/taskbar": { - "format": "{icon}", - "icon-size": 20, - "icon-theme": "Star", - "tooltip-format": "{title}", - "on-click": "minimize", - "on-click-middle": "close", - "on-click-right": "activate" - }, - "sway/language": { - "format": " {}", - }, - "idle_inhibitor": { - "format": "{icon}", - "format-icons": { - "activated": "", - "deactivated": "" - } - }, - "tray": { - "icon-size": 20, - "spacing": 10 - }, - "clock": { - // "timezone": "America/New_York", - "tooltip-format": "{:%Y %B}\n{calendar}", - "format-alt": "{:%Y-%m-%d}" - }, - "cpu": { - "format": "{usage}% ", + "custom/crypto": { + "format": "{}", + "interval": 600, + "return-type": "json", + "exec": "~/.config/waybar/modules/crypto/waybar_crypto.py", + "exec-if": "ping pro-api.coinmarketcap.com -c1", "tooltip": false }, - "memory": { - "format": "{}% " + + "custom/weather": { + "format": "{}", + "tooltip": true, + "interval": 3600, + "exec": "python ~/.config/waybar/waybar-wttr.py", + "return-type": "json" }, + + "sway/mode": { + "format": "{}", + "tooltip": false + }, + + "clock": { + "format": "{:%H:%M}", + "format-alt": "{:%A, %d %b, %Y}", + "tooltip-format": "{calendar}", + "calendar": { + "mode" : "month", + "mode-mon-col" : 3, + "weeks-pos" : "left", + "on-scroll" : 1, + "format": { + "months": "{}", + "days": "{}", + "weeks": "W{}", + "weekdays": "{}", + "today": "{}" + } + }, + "actions": { + "on-click-right": "kitty --class=calcurse -e calcurse", + "on-click-middle": "mode", + "on-scroll-up": "shift_up", + "on-scroll-down": "shift_down" + } + }, + + "pulseaudio": { + "scroll-step": 1, + "format": "{volume}% {icon} {format_source}", + "format-bluetooth": "{volume}% {icon} {format_source}", + "format-bluetooth-muted": "  {format_source}", + "format-muted": " {format_source}", + "format-source": " ", + "format-source-muted": " ", + "format-icons": { + "headphone": "", + "headset": "", + "default": ["", "", ""] + }, + "tooltip": false, + "on-click": "pavucontrol --class=pavu", + "on-click-right": "easyeffects", + "ignored-sinks": ["Easy Effects Sink", "Monitor of Easy Effects Sink"] + }, + + "network": { + "format-wifi": "", + "format-ethernet": "", + "format-linked": "", + "format-disconnected": "⚠", + "tooltip-format": "{essid}\n{ipaddr}/{cidr}", + "tooltip": true, + "on-click": "kitty --class=nmtui -e nmtui" + }, + + "cpu": { + "format": "{usage}% ", + "states": { + "warning": 60, + "critical": 80 + }, + "tooltip": false, + "on-click": "kitty --class=btop -e btop" + }, + + "memory": { + "tooltip": true, + "format": "{}% ", + "states": { + "warning": 60, + "critical": 80 + }, + "tooltip-format": "RAM: {used}GB/{total}GB\nSwap: {swapUsed}GB/{swapAvail}GB" + }, + "temperature": { - // "thermal-zone": 2, - // "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input", + "tooltip": false, "critical-threshold": 80, - // "format-critical": "{temperatureC}°C {icon}", - "format": "{temperatureC}°C {icon}", + "format": "{temperatureC}°{icon}", "format-icons": ["", "", ""] }, + "backlight": { + "tooltip": false, "format": "{percent}% {icon}", - "format-icons": ["", ""] + "format-icons": [""] }, + "battery": { + "tooltip": true, + "tooltip-format": "{time}", "states": { - // "good": 95, - "warning": 30, - "critical": 15 + "warning": 35, + "critical": 20 }, "format": "{capacity}% {icon}", "format-charging": "{capacity}% ", "format-plugged": "{capacity}% ", - "format-alt": "{time} {icon}", "format-icons": ["", "", "", "", ""] }, - "battery#bat2": { - "bat": "BAT2" - }, - "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" + "sway/language": { + "format": "{shortDescription}", + "tooltip": false }, - "pulseaudio": { - "format": "{volume}% {icon}", - "format-bluetooth": "{volume}% {icon}", - "format-bluetooth-muted": "{icon} {format_source}", - "format-muted": "{format_source}", - "format-source": "", - "format-source-muted": "", - "format-icons": { - "headphone": "", - "hands-free": "", - "headset": "", - "phone": "", - "portable": "", - "car": "", - "default": ["", "", ""] - }, - "on-click": "pavucontrol" + + "tray": { + "tooltip": false, + "spacing": 5 }, - "custom/media": { - "format": "{icon} {}", - "return-type": "json", - "max-length": 15, - "format-icons": { - "spotify": " ", - "default": " " - }, - "escape": true, - "exec": "$HOME/.config/system_scripts/mediaplayer.py 2> /dev/null", - "on-click": "playerctl play-pause" + + "custom/arrow-light-on-bg-left": { + "tooltip": false, + "format": "" }, - "custom/launcher":{ - "format": " ", - "on-click": "rofi -show drun -theme ~/.config/rofi/wayfire/config.rasi", - "on-click-right": "killall rofi" + + "custom/arrow-dark-on-light-left": { + "tooltip": false, + "format": "" }, - "custom/power":{ - "format": " ", - "on-click": "nwg-bar", - "on-click-right": "killall nwg-bar" + + "custom/arrow-light-on-dark-left": { + "tooltip": false, + "format": "" }, - "custom/layout":{ - "format": "", - "on-click": "bash ~/.config/system_scripts/layout.sh" + + "custom/arrow-dark-on-bg-right": { + "tooltip": false, + "format": "" }, - "custom/updater":{ - "format": " {} Updates", - "exec": "checkupdates | wc -l", - "exec-if": "[[ $(checkupdates | wc -l) != 0 ]]", - "interval": 15, - "on-click": "alacritty -e yay -Syu" + + "custom/arrow-dark-on-light-right": { + "tooltip": false, + "format": "" + }, + + "custom/arrow-light-on-dark-right": { + "tooltip": false, + "format": "" } + } + + ''; }; # Waybar theming ".config/waybar/style.css" = { enable = true; executable = false; - text = ''* { + text = '' +* { border: none; - border-radius: 0px; - /* `otf-font-awesome` is required to be installed for icons */ - font-family: Roboto, Helvetica, Arial, sans-serif; - font-size: 13px; - min-height: 0; + border-radius: 0; + font-family: my-queue; } -window#waybar { - background-color: transparent; - color: black; - transition-property: background-color; - transition-duration: .5s; +#waybar { + background-color: rgba(50, 48, 47, 0.8); } -window#waybar.hidden { - opacity: 0.2; -} - - #workspaces button { - background: #1f1f1f; - color: black; - border-radius: 20px; - + color: #e2cca9; + background-color: #32302f; + font-size: 13px; } -/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ -#workspaces button:hover { - background: lightblue; - color: black; - border-bottom: 3px solid black; - +#workspaces button:hover, +#workspaces button.focused:hover, +#workspaces button.visible:hover { + color: #32302f; + background-color: #e9b143; } #workspaces button.focused { - background: #1f1f1f; -} - -#workspaces button.focused:hover { - background: lightblue; - color: black; - border-bottom: 3px solid black; - + background-color: #3c3836; + box-shadow: inset 0 -3px #f28534; } #workspaces button.urgent { - background-color: #eb4d4b; + color: #32302f; + background-color: #f2594b; +} + +#workspaces button.visible { + background-color: #3c3836; +} + +/* + * Arrows + */ +#custom-arrow-light-on-bg-left { + font-size: 15px; + color: #3c3836; + background-color: transparent; +} + +#custom-arrow-dark-on-bg-right { + font-size: 15px; + color: #32302f; + background-color: transparent; + +} + +#custom-arrow-light-on-dark-left, +#custom-arrow-light-on-dark-right { + font-size: 15px; + color: #3c3836; + background: #32302f; +} + +#custom-arrow-dark-on-light-left, +#custom-arrow-dark-on-light-right { + font-size: 15px; + color: #32302f; + background: #3c3836; +} + +/* + * General background + */ +#network, +#memory, +#backlight, +#language, +#custom-weather { + color: #e2cca9; + font-size: 13px; + background-color: #32302f; + padding: 0 3 0 3; +} + +#cpu, +#pulseaudio, +#temperature, +#battery, +#tray, +#custom-crypto { + color: #e2cca9; + font-size: 13px; + background-color: #3c3836; + padding: 0 3 0 3; +} + +/* + * Warning plugins state + */ +#memory.warning, +#cpu.warning, +#battery.warning { + color: #e9b143; +} + +/* + * Critical plugins state + */ +#cpu.critical, +#temperature.critical, +#memory.critical, +#battery.critical, +#network.disconnected { + color: #f2594b; } #mode { - background-color: #64727D; - border-bottom: 3px solid black; -} - -#clock, -#battery, -#cpu, -#memory, -#disk, -#temperature, -#backlight, -#network, -#pulseaudio, -#custom-media, -#custom-launcher, -#custom-power, -#custom-layout, -#custom-updater, -#custom-snip, -#taskbar, -#tray, -#mode, -#idle_inhibitor, -#mpd { - padding: 0 10px; - color: black; -} - -#window, -#workspaces { - margin: 0px 4px; -} - -/* If workspaces is the leftmost module, omit left margin */ -.modules-left > widget:first-child > #workspaces { - margin-left: 0px; -} - -/* If workspaces is the rightmost module, omit right margin */ -.modules-right > widget:last-child > #workspaces { - margin-right: 0px; + color: #32302f; + font-size: 13px; + background-color: #f2594b; } #clock { - background-color: #FA8BFF; - background-image: linear-gradient(-45deg, #FA8BFF 0%, #2BD2FF 52%, #2BD2FF 90%); - color: black; - border-radius: 0px 20px 20px 0px; - margin-right: 4px; - + color: #e2cca9; + font-size: 13px; } -#battery { - background-color: black; - color: #000000; +#battery.charging { + color: #b0b846; } -#battery.charging, #battery.plugged { - color: black; - background-color: #26A65B; +#battery.plugged { + color: #80aa9e; } -@keyframes blink { - to { - background-color: black; - color: #000000; - } +#pulseaudio.bluetooth { + color: #80aa9e; } -#battery.critical:not(.charging) { - background-color: #f53c3c; - color: black; - animation-name: blink; - animation-duration: 0.5s; - animation-timing-function: linear; - animation-iteration-count: infinite; - animation-direction: alternate; -} - -label:focus { - background-color: #000000; -} - -#cpu { - background-color: #FA8BFF; - background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%); - color: black; -} - -#memory { - background-color: #FA8BFF; - background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%); - color: black; -} - -#disk { - background-color: #FA8BFF; - background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%); - color: black; -} - -#backlight { - background-color: #90b1b1; -} - -#network { - background-color: #FA8BFF; - background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%); - color: black; -} - -#network.disconnected { - background-color: #FA8BFF; - background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%); - color: red; -} - -#pulseaudio { - background-color: #FA8BFF; - background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%); - color: black; -} - -#pulseaudio.muted { - background-color: #FA8BFF; - background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%); - color: red; -} - -#custom-media { - background-color: #8EC5FC; - background-image: linear-gradient(62deg, #8EC5FC 0%, #E0C3FC 100%); - color: black; - border-radius: 20px; - margin-right: 5px; - margin-left: 5px; -} - -#custom-media.custom-spotify { - background-color: #8EC5FC; - background-image: linear-gradient(62deg, #8EC5FC 0%, #E0C3FC 100%); - color: black; - border-radius: 20px; - margin-right: 5px; - -} - -#custom-media.custom-vlc { - background-color: #8EC5FC; - background-image: linear-gradient(62deg, #8EC5FC 0%, #E0C3FC 100%); - color: black; - border-radius: 20px; - margin-right: 5px; -} - -#custom-power{ - background-color: #FA8BFF; - background-image: linear-gradient(45deg, #FA8BFF 0%, #2BD2FF 52%, #2BD2FF 90%); - font-size: 18px; - border-radius: 20px; - margin-left: 2px; -} - -#custom-launcher{ - background-color: #FA8BFF; - background-image: linear-gradient(-45deg, #FA8BFF 0%, #2BD2FF 52%, #2BD2FF 90%); - font-size: 25px; - border-radius: 20px; - margin-right: 2px; -} - -#custom-updater { - background-color: #FA8BFF; - background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%); - color: black; -} - -#custom-snip { - background-color: #FA8BFF; - background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%); - color: black; - font-size: 20px; -} - -#custom-layout{ - background-color: #FA8BFF; - background-image: linear-gradient(45deg, #FA8BFF 0%, #2BD2FF 52%, #2BD2FF 90%); - color: black; - font-size: 18px; - border-radius: 20px 0px 0px 20px; -} - -#taskbar { - background-color: #2BD2FF; - background-image: linear-gradient(45deg, #FA8BFF 0%, #2BD2FF 52%, #FA8BFF 90%); - border-radius: 20px; - -} - - -#temperature { - background-color: #FA8BFF; - background-image: linear-gradient(-45deg, #FA8BFF 0%, #2BD2FF 52%, #2BD2FF 90%); - color: black; - border-radius: 0px 20px 20px 0px; -} - -#temperature.critical { - background-color: #eb4d4b; -} - -#tray { - background-color: #FA8BFF; - background-image: linear-gradient(-45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%); - color: black; -} - -#tray > .passive { - -gtk-icon-effect: dim; - background-color: #FA8BFF; - background-image: linear-gradient(-45deg, #FA8BFF 0%, #2BD2FF 52%, #2BD2FF 90%); - color: black; -} - -#tray > .needs-attention { - -gtk-icon-effect: highlight; - background-color: #FA8BFF; - background-image: linear-gradient(-45deg, #FA8BFF 0%, #2BD2FF 52%, #2BD2FF 90%); - color: black; -} - -#idle_inhibitor { - background-color: #FA8BFF; - background-image: linear-gradient(45deg, #FA8BFF 0%, #2BD2FF 52%, #2BD2FF 90%); - border-radius: 20px 0px 0px 20px; - -} - -#idle_inhibitor.activated { - background-color: #FA8BFF; - background-image: linear-gradient(45deg, #FA8BFF 0%, #2BD2FF 52%, #2BD2FF 90%); - color: black; - border-radius: 20px 0px 0px 20px; - -} - -#language { - background-color: #FA8BFF; - background-image: linear-gradient(45deg, #FA8BFF 0%, #2BD2FF 52%, #2BD2FF 90%); - color: black; - min-width: 16px; - padding-left : 8px; - border-radius: 20px 0px 0px 20px; -} - -#keyboard-state { - background: #97e1ad; - color: #000000; - min-width: 16px; -} - -#keyboard-state > label { - padding: 0px 5px; -} - -#keyboard-state > label.locked { - background: rgba(0, 0, 0, 0.2); +tooltip { + color: #e2cca9; + font-size: 13px; + background-color: #32302f; } ''; };