diff options
Diffstat (limited to 'home-manager/laptop/programs')
| -rw-r--r-- | home-manager/laptop/programs/ags/bar/config.js | 203 | ||||
| -rw-r--r-- | home-manager/laptop/programs/ags/bar/style.css | 26 | ||||
| -rw-r--r-- | home-manager/laptop/programs/ags/default.nix | 8 | ||||
| -rw-r--r-- | home-manager/laptop/programs/default.nix | 4 | ||||
| -rw-r--r-- | home-manager/laptop/programs/default.nix~ | 28 | ||||
| -rw-r--r-- | home-manager/laptop/programs/rofi/#squared-material-pine.rasi# | 97 | ||||
| l--------- | home-manager/laptop/programs/rofi/.#squared-material-pine.rasi | 1 | ||||
| -rw-r--r-- | home-manager/laptop/programs/rofi/config.rasi | 156 | ||||
| -rw-r--r-- | home-manager/laptop/programs/rofi/default.nix | 18 | ||||
| -rw-r--r-- | home-manager/laptop/programs/rofi/squared-material-pine.rasi | 97 | ||||
| -rw-r--r-- | home-manager/laptop/programs/rofi/theme.rasi | 125 | ||||
| -rw-r--r-- | home-manager/laptop/programs/waybar/config.jsonc | 94 | ||||
| -rw-r--r-- | home-manager/laptop/programs/waybar/default.nix | 19 | ||||
| -rw-r--r-- | home-manager/laptop/programs/waybar/style.css | 31 |
14 files changed, 907 insertions, 0 deletions
diff --git a/home-manager/laptop/programs/ags/bar/config.js b/home-manager/laptop/programs/ags/bar/config.js new file mode 100644 index 0000000..8abf671 --- /dev/null +++ b/home-manager/laptop/programs/ags/bar/config.js @@ -0,0 +1,203 @@ +// importing +import Hyprland from 'resource:///com/github/Aylur/ags/service/hyprland.js'; +import Notifications from 'resource:///com/github/Aylur/ags/service/notifications.js'; +import Mpris from 'resource:///com/github/Aylur/ags/service/mpris.js'; +import Audio from 'resource:///com/github/Aylur/ags/service/audio.js'; +import Battery from 'resource:///com/github/Aylur/ags/service/battery.js'; +import SystemTray from 'resource:///com/github/Aylur/ags/service/systemtray.js'; +import App from 'resource:///com/github/Aylur/ags/app.js'; +import Widget from 'resource:///com/github/Aylur/ags/widget.js'; +import { exec, execAsync } from 'resource:///com/github/Aylur/ags/utils.js'; + +// widgets can be only assigned as a child in one container +// so to make a reuseable widget, just make it a function +// then you can use it by calling simply calling it + +const Workspaces = () => Widget.Box({ + className: 'workspaces', + connections: [[Hyprland.active.workspace, self => { + // generate an array [1..10] then make buttons from the index + const arr = Array.from({ length: 10 }, (_, i) => i + 1); + self.children = arr.map(i => Widget.Button({ + onClicked: () => execAsync(`hyprctl dispatch workspace ${i}`), + child: Widget.Label(`${i}`), + className: Hyprland.active.workspace.id == i ? 'focused' : '', + })); + }]], +}); + +const ClientTitle = () => Widget.Label({ + className: 'client-title', + binds: [ + ['label', Hyprland.active.client, 'title'], + ], +}); + +const Clock = () => Widget.Label({ + className: 'clock', + connections: [ + // this is bad practice, since exec() will block the main event loop + // in the case of a simple date its not really a problem + [1000, self => self.label = exec('date "+%H:%M:%S %b %e."')], + + // this is what you should do + [1000, self => execAsync(['date', '+%H:%M:%S %b %e.']) + .then(date => self.label = date).catch(console.error)], + ], +}); + +// we don't need dunst or any other notification daemon +// because the Notifications module is a notification daemon itself +const Notification = () => Widget.Box({ + className: 'notification', + children: [ + Widget.Icon({ + icon: 'preferences-system-notifications-symbolic', + connections: [ + [Notifications, self => self.visible = Notifications.popups.length > 0], + ], + }), + Widget.Label({ + connections: [[Notifications, self => { + self.label = Notifications.popups[0]?.summary || ''; + }]], + }), + ], +}); + +const Media = () => Widget.Button({ + className: 'media', + onPrimaryClick: () => Mpris.getPlayer('')?.playPause(), + onScrollUp: () => Mpris.getPlayer('')?.next(), + onScrollDown: () => Mpris.getPlayer('')?.previous(), + child: Widget.Label({ + connections: [[Mpris, self => { + const mpris = Mpris.getPlayer(''); + // mpris player can be undefined + if (mpris) + self.label = `${mpris.trackArtists.join(', ')} - ${mpris.trackTitle}`; + else + self.label = 'Nothing is playing'; + }]], + }), +}); + +const Volume = () => Widget.Box({ + className: 'volume', + css: 'min-width: 180px', + children: [ + Widget.Stack({ + items: [ + // tuples of [string, Widget] + ['101', Widget.Icon('audio-volume-overamplified-symbolic')], + ['67', Widget.Icon('audio-volume-high-symbolic')], + ['34', Widget.Icon('audio-volume-medium-symbolic')], + ['1', Widget.Icon('audio-volume-low-symbolic')], + ['0', Widget.Icon('audio-volume-muted-symbolic')], + ], + connections: [[Audio, self => { + if (!Audio.speaker) + return; + + if (Audio.speaker.isMuted) { + self.shown = '0'; + return; + } + + const show = [101, 67, 34, 1, 0].find( + threshold => threshold <= Audio.speaker.volume * 100); + + self.shown = `${show}`; + }, 'speaker-changed']], + }), + Widget.Slider({ + hexpand: true, + drawValue: false, + onChange: ({ value }) => Audio.speaker.volume = value, + connections: [[Audio, self => { + self.value = Audio.speaker?.volume || 0; + }, 'speaker-changed']], + }), + ], +}); + +const BatteryLabel = () => Widget.Box({ + className: 'battery', + children: [ + Widget.Icon({ + connections: [[Battery, self => { + self.icon = `battery-level-${Math.floor(Battery.percent / 10) * 10}-symbolic`; + }]], + }), + Widget.ProgressBar({ + vpack: 'center', + connections: [[Battery, self => { + if (Battery.percent < 0) + return; + + self.fraction = Battery.percent / 100; + }]], + }), + ], +}); + +const SysTray = () => Widget.Box({ + connections: [[SystemTray, self => { + self.children = SystemTray.items.map(item => Widget.Button({ + child: Widget.Icon({ binds: [['icon', item, 'icon']] }), + onPrimaryClick: (_, event) => item.activate(event), + onSecondaryClick: (_, event) => item.openMenu(event), + binds: [['tooltip-markup', item, 'tooltip-markup']], + })); + }]], +}); + +// layout of the bar +const Left = () => Widget.Box({ + children: [ + Workspaces(), + ClientTitle(), + ], +}); + +const Center = () => Widget.Box({ + children: [ + Media(), + Notification(), + ], +}); + +const Right = () => Widget.Box({ + hpack: 'end', + children: [ + Volume(), + BatteryLabel(), + Clock(), + SysTray(), + ], +}); + +const Bar = ({ monitor } = {}) => Widget.Window({ + name: `bar-${monitor}`, // name has to be unique + className: 'bar', + monitor, + anchor: ['top', 'left', 'right'], + exclusive: true, + child: Widget.CenterBox({ + startWidget: Left(), + centerWidget: Center(), + endWidget: Right(), + }), +}) + +// exporting the config so ags can manage the windows +export default { + style: App.configDir + '/style.css', + windows: [ + Bar(), + + // you can call it, for each monitor + // Bar({ monitor: 0 }), + // Bar({ monitor: 1 }) + ], +}; diff --git a/home-manager/laptop/programs/ags/bar/style.css b/home-manager/laptop/programs/ags/bar/style.css new file mode 100644 index 0000000..900d84f --- /dev/null +++ b/home-manager/laptop/programs/ags/bar/style.css @@ -0,0 +1,26 @@ +* { + font-family: Material Design Icons, Rubik Medium; + font-size: 14px; + color: #6e6a86; +} + +.window { + border-radius: 10px; + background: #1f1d2e; + border: 3px solid #363a4f; +} + +.battery { + margin-right: 6px; +} + +.workspaces button { + font-size: 15px; + transition: all 100ms ease-out; +} + +.workspaces button:active { + font-weight: bolder; + color: #908caa; + transition: all 100ms ease-out; +} diff --git a/home-manager/laptop/programs/ags/default.nix b/home-manager/laptop/programs/ags/default.nix new file mode 100644 index 0000000..646bccf --- /dev/null +++ b/home-manager/laptop/programs/ags/default.nix @@ -0,0 +1,8 @@ +{ pkgs, ... }: + +{ + programs.ags = { + enable = false; + configDir = ./bar; + }; +} diff --git a/home-manager/laptop/programs/default.nix b/home-manager/laptop/programs/default.nix new file mode 100644 index 0000000..a077139 --- /dev/null +++ b/home-manager/laptop/programs/default.nix @@ -0,0 +1,4 @@ +[ + ./rofi + ./waybar +] diff --git a/home-manager/laptop/programs/default.nix~ b/home-manager/laptop/programs/default.nix~ new file mode 100644 index 0000000..c904e18 --- /dev/null +++ b/home-manager/laptop/programs/default.nix~ @@ -0,0 +1,28 @@ +let + more = { pkgs, ... }: { + programs = { + kitty = { + enable = true; + font.name = "Source Code Pro"; + font.size = 11.3; + theme = "Rosé Pine Moon"; + shellIntegration.enableFishIntegration = true; + extraConfig = "cursor_shape underline"; + }; + }; + }; + progConfig = { config, ... }: "${config.home.homeDirectory}/.nixfiles/home-manager/home/programs/"; + nonNixConfigs = { config, ... }: { + xdg.configFile = { + "ranger".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.nixfiles/home-manager/home/programs/ranger"; + "emacs/init.el".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.nixfiles/home-manager/home/programs/emacs/init.el"; + }; + }; +in +[ + ./fish + ./firefox + ./rofi + more + nonNixConfigs +] diff --git a/home-manager/laptop/programs/rofi/#squared-material-pine.rasi# b/home-manager/laptop/programs/rofi/#squared-material-pine.rasi# new file mode 100644 index 0000000..dfc1304 --- /dev/null +++ b/home-manager/laptop/programs/rofi/#squared-material-pine.rasi# @@ -0,0 +1,97 @@ +/******************************************************************************* + * ROFI SQUARED THEME USING THE MATERIAL DARKER PALETTE + * User : LR-Tech + * Theme Repo : https://github.com/lr-tech/rofi-themes-collection + *******************************************************************************/ + +* { + font: "FiraCode Nerd Font Medium 12"; + + bg0: #1f1d2e; + bg1: #2a273f; + fg0: #908caa; + + accent-color: #6e6a86; + urgent-color: #ffffff; + + background-color: transparent; + text-color: @fg0; + + margin: 0; + padding: 0; + spacing: 0; +} + +window { + location: center; + width: 480; + y-offset: -160; + border-radius: 7px; + + background-color: @bg0; +} + +inputbar { + spacing: 8px; + padding: 8px; + + background-color: @bg1; +} + +prompt, entry, element-icon, element-text { + vertical-align: 0.5; +} + +prompt { + text-color: @accent-color; +} + +textbox { + padding: 8px; + background-color: @bg1; +} + +listview { + padding: 4px 0; + lines: 8; + columns: 1; + + fixed-height: false; +} + +element { + padding: 8px; + spacing: 8px; +} + +element normal normal { + text-color: @fg0; +} + +element normal urgent { + text-color: @urgent-color; +} + +element normal active { + text-color: @accent-color; +} + +element selected { + text-color: @bg0; +} + +element selected normal, element selected active { + background-color: @accent-color; +} + +element selected urgent { + background-color: @urgent-color; +} + +element-icon { + size: 0.8em; +} + +element-text { + text-color: inherit; +} diff --git a/home-manager/laptop/programs/rofi/.#squared-material-pine.rasi b/home-manager/laptop/programs/rofi/.#squared-material-pine.rasi new file mode 120000 index 0000000..01f556d --- /dev/null +++ b/home-manager/laptop/programs/rofi/.#squared-material-pine.rasi @@ -0,0 +1 @@ +jerpo@ltrr.1733:1703369468
\ No newline at end of file diff --git a/home-manager/laptop/programs/rofi/config.rasi b/home-manager/laptop/programs/rofi/config.rasi new file mode 100644 index 0000000..55e75a7 --- /dev/null +++ b/home-manager/laptop/programs/rofi/config.rasi @@ -0,0 +1,156 @@ +configuration { +/* modes: "window,drun,run,ssh";*/ +/* font: "mono 12";*/ + location: 0; + yoffset: 0; + xoffset: 0; +/* fixed-num-lines: true;*/ +/* show-icons: false;*/ +/* terminal: "rofi-sensible-terminal";*/ +/* ssh-client: "ssh";*/ +/* ssh-command: "{terminal} -e {ssh-client} {host} [-p {port}]";*/ +/* run-command: "{cmd}";*/ +/* run-list-command: "";*/ +/* run-shell-command: "{terminal} -e {cmd}";*/ +/* window-command: "wmctrl -i -R {window}";*/ +/* window-match-fields: "all";*/ +/* icon-theme: ;*/ +/* drun-match-fields: "name,generic,exec,categories,keywords";*/ +/* drun-categories: ;*/ +/* drun-show-actions: false;*/ +/* drun-display-format: "{name} [<span weight='light' size='small'><i>({generic})</i></span>]";*/ +/* drun-url-launcher: "xdg-open";*/ +/* disable-history: false;*/ +/* ignored-prefixes: "";*/ +/* sort: false;*/ +/* sorting-method: "normal";*/ +/* case-sensitive: false;*/ + cycle: true; +/* sidebar-mode: false;*/ +/* hover-select: false;*/ +/* eh: 1;*/ +/* auto-select: false;*/ +/* parse-hosts: false;*/ +/* parse-known-hosts: true;*/ +/* combi-modes: "window,run";*/ +/* matching: "normal";*/ +/* tokenize: true;*/ +/* m: "-5";*/ +/* filter: ;*/ +/* dpi: -1;*/ +/* threads: 0;*/ +/* scroll-method: 0;*/ +/* window-format: "{w} {c} {t}";*/ +/* click-to-exit: true;*/ +/* max-history-size: 25;*/ +/* combi-hide-mode-prefix: false;*/ +/* combi-display-format: "{mode} {text}";*/ +/* matching-negate-char: '-' /* unsupported */;*/ +/* cache-dir: ;*/ +/* window-thumbnail: false;*/ +/* drun-use-desktop-cache: false;*/ +/* drun-reload-desktop-cache: false;*/ +/* normalize-match: false;*/ +/* steal-focus: false;*/ +/* application-fallback-icon: ;*/ +/* refilter-timeout-limit: 8192;*/ +/* xserver-i300-workaround: false;*/ +/* pid: "/run/user/1000/rofi.pid";*/ +/* display-window: ;*/ +/* display-windowcd: ;*/ +/* display-run: ;*/ +/* display-ssh: ;*/ +/* display-drun: ;*/ +/* display-combi: ;*/ +/* display-keys: ;*/ +/* display-filebrowser: ;*/ +/* display-emoji: ;*/ +/* display-calc: ;*/ +/* kb-primary-paste: "Control+V,Shift+Insert";*/ +/* kb-secondary-paste: "Control+v,Insert";*/ +/* kb-clear-line: "Control+w";*/ +/* kb-move-front: "Control+a";*/ +/* kb-move-end: "Control+e";*/ +/* kb-move-word-back: "Alt+b,Control+Left";*/ +/* kb-move-word-forward: "Alt+f,Control+Right";*/ +/* kb-move-char-back: "Left,Control+b";*/ +/* kb-move-char-forward: "Right,Control+f";*/ +/* kb-remove-word-back: "Control+Alt+h,Control+BackSpace";*/ +/* kb-remove-word-forward: "Control+Alt+d";*/ +/* kb-remove-char-forward: "Delete,Control+d";*/ +/* kb-remove-char-back: "BackSpace,Shift+BackSpace,Control+h";*/ +/* kb-remove-to-eol: "Control+k";*/ +/* kb-remove-to-sol: "Control+u";*/ +/* kb-accept-entry: "Control+j,Control+m,Return,KP_Enter";*/ +/* kb-accept-custom: "Control+Return";*/ +/* kb-accept-custom-alt: "Control+Shift+Return";*/ +/* kb-accept-alt: "Shift+Return";*/ +/* kb-delete-entry: "Shift+Delete";*/ +/* kb-mode-next: "Shift+Right,Control+Tab";*/ +/* kb-mode-previous: "Shift+Left,Control+ISO_Left_Tab";*/ +/* kb-mode-complete: "Control+l";*/ +/* kb-row-left: "Control+Page_Up";*/ +/* kb-row-right: "Control+Page_Down";*/ +/* kb-row-up: "Up,Control+p";*/ +/* kb-row-down: "Down,Control+n";*/ +/* kb-row-tab: "";*/ +/* kb-element-next: "Tab";*/ +/* kb-element-prev: "ISO_Left_Tab";*/ +/* kb-page-prev: "Page_Up";*/ +/* kb-page-next: "Page_Down";*/ +/* kb-row-first: "Home,KP_Home";*/ +/* kb-row-last: "End,KP_End";*/ +/* kb-row-select: "Control+space";*/ +/* kb-screenshot: "Alt+S";*/ +/* kb-ellipsize: "Alt+period";*/ +/* kb-toggle-case-sensitivity: "grave,dead_grave";*/ +/* kb-toggle-sort: "Alt+grave";*/ +/* kb-cancel: "Escape,Control+g,Control+bracketleft";*/ +/* kb-custom-1: "Alt+1";*/ +/* kb-custom-2: "Alt+2";*/ +/* kb-custom-3: "Alt+3";*/ +/* kb-custom-4: "Alt+4";*/ +/* kb-custom-5: "Alt+5";*/ +/* kb-custom-6: "Alt+6";*/ +/* kb-custom-7: "Alt+7";*/ +/* kb-custom-8: "Alt+8";*/ +/* kb-custom-9: "Alt+9";*/ +/* kb-custom-10: "Alt+0";*/ +/* kb-custom-11: "Alt+exclam";*/ +/* kb-custom-12: "Alt+at";*/ +/* kb-custom-13: "Alt+numbersign";*/ +/* kb-custom-14: "Alt+dollar";*/ +/* kb-custom-15: "Alt+percent";*/ +/* kb-custom-16: "Alt+dead_circumflex";*/ +/* kb-custom-17: "Alt+ampersand";*/ +/* kb-custom-18: "Alt+asterisk";*/ +/* kb-custom-19: "Alt+parenleft";*/ +/* kb-select-1: "Super+1";*/ +/* kb-select-2: "Super+2";*/ +/* kb-select-3: "Super+3";*/ +/* kb-select-4: "Super+4";*/ +/* kb-select-5: "Super+5";*/ +/* kb-select-6: "Super+6";*/ +/* kb-select-7: "Super+7";*/ +/* kb-select-8: "Super+8";*/ +/* kb-select-9: "Super+9";*/ +/* kb-select-10: "Super+0";*/ +/* ml-row-left: "ScrollLeft";*/ +/* ml-row-right: "ScrollRight";*/ +/* ml-row-up: "ScrollUp";*/ +/* ml-row-down: "ScrollDown";*/ +/* me-select-entry: "MousePrimary";*/ +/* me-accept-entry: "MouseDPrimary";*/ +/* me-accept-custom: "Control+MouseDPrimary";*/ + timeout { + action: "kb-cancel"; + delay: 0; + } + filebrowser { + directories-first: true; + sorting-method: "name"; + } + plugin { + path: "/nix/store/dllm74vs7qfrcsnwwsjcs4w0x70d67ps-rofi-1.7.5/lib/rofi"; + } +} diff --git a/home-manager/laptop/programs/rofi/default.nix b/home-manager/laptop/programs/rofi/default.nix new file mode 100644 index 0000000..540e97b --- /dev/null +++ b/home-manager/laptop/programs/rofi/default.nix @@ -0,0 +1,18 @@ +{ pkgs, ... }: + +{ + programs.rofi = { + enable = true; + package = pkgs.rofi-wayland; + theme = ./squared-material-pine.rasi; + cycle = true; + plugins = with pkgs; [ + rofi-emoji + rofi-calc + ]; + extraConfig = { + kb-row-up = "Up,Alt+k"; + kb-row-down = "Down,Alt+j"; + }; + }; +} diff --git a/home-manager/laptop/programs/rofi/squared-material-pine.rasi b/home-manager/laptop/programs/rofi/squared-material-pine.rasi new file mode 100644 index 0000000..dfc1304 --- /dev/null +++ b/home-manager/laptop/programs/rofi/squared-material-pine.rasi @@ -0,0 +1,97 @@ +/******************************************************************************* + * ROFI SQUARED THEME USING THE MATERIAL DARKER PALETTE + * User : LR-Tech + * Theme Repo : https://github.com/lr-tech/rofi-themes-collection + *******************************************************************************/ + +* { + font: "FiraCode Nerd Font Medium 12"; + + bg0: #1f1d2e; + bg1: #2a273f; + fg0: #908caa; + + accent-color: #6e6a86; + urgent-color: #ffffff; + + background-color: transparent; + text-color: @fg0; + + margin: 0; + padding: 0; + spacing: 0; +} + +window { + location: center; + width: 480; + y-offset: -160; + border-radius: 7px; + + background-color: @bg0; +} + +inputbar { + spacing: 8px; + padding: 8px; + + background-color: @bg1; +} + +prompt, entry, element-icon, element-text { + vertical-align: 0.5; +} + +prompt { + text-color: @accent-color; +} + +textbox { + padding: 8px; + background-color: @bg1; +} + +listview { + padding: 4px 0; + lines: 8; + columns: 1; + + fixed-height: false; +} + +element { + padding: 8px; + spacing: 8px; +} + +element normal normal { + text-color: @fg0; +} + +element normal urgent { + text-color: @urgent-color; +} + +element normal active { + text-color: @accent-color; +} + +element selected { + text-color: @bg0; +} + +element selected normal, element selected active { + background-color: @accent-color; +} + +element selected urgent { + background-color: @urgent-color; +} + +element-icon { + size: 0.8em; +} + +element-text { + text-color: inherit; +} diff --git a/home-manager/laptop/programs/rofi/theme.rasi b/home-manager/laptop/programs/rofi/theme.rasi new file mode 100644 index 0000000..c110b07 --- /dev/null +++ b/home-manager/laptop/programs/rofi/theme.rasi @@ -0,0 +1,125 @@ +/* borrowed from https://github.com/abxh/dotfiles/blob/main/rofi/config.rasi */ +/* cuz IT'S SO SICK!!! */ + +* { + /* // general */ + bg: #333333; + bgt: #333333AA; + t: transparent; + fg: #e0c69f; + + selected-bg: @fg; + selected-fg: @bg; + + /* // for windows */ + active: #a9b665; + urgent: #ea6962; +} + +window { + fullscreen: true; + padding: 35% 30%; + transparency: "real"; + background-color: @bgt; + border-color: @t; +} + +listview { + border: 0 0 0 0; + padding: 23 0 0; + scrollbar: true; +} + +scrollbar { + width: 4px; + border: 0; + handle-color: @fg; + handle-width: 8px; + padding: 0 5; +} + +entry { + placeholder: ""; +} + +/* // other kinda less interesting stuff {{{ */ + +textbox { + text-color: @fg; +} + +/* // using elements from: */ +/* // https://github.com/bardisty/gruvbox-rofi/blob/master/gruvbox-common.rasi */ + +element { + border: 0; + padding: 2px; +} +element.normal.normal { + background-color: @t; + text-color: @fg; +} +element.normal.urgent { + background-color: @t; + text-color: @urgent; +} +element.normal.active { + background-color: @t; + text-color: @active; +} +element.selected.normal { + background-color: @selected-bg; + text-color: @selected-fg; +} +element.selected.urgent { + background-color: @selected-bg; + text-color: @urgent; +} +element.selected.active { + background-color: @selected-bg; + text-color: @selected-fg; +} +element.alternate.normal { + background-color: @t; + text-color: @fg; +} +element.alternate.urgent { + background-color: @t; + text-color: @urgent; +} +element.alternate.active { + background-color: @t; + text-color: @active; +} + +sidebar { + border: 2px 0 0; + border-color: @fg; +} + +inputbar { + spacing: 0; + text-color: @fg; + padding: 2px; + children: [ prompt, textbox-prompt-sep, entry, case-indicator ]; +} + +case-indicator, +entry, +prompt, +button { + spacing: 0; + text-color: @fg; +} + +button.selected { + background-color: @bg; + text-color: @fg; +} + +textbox-prompt-sep { + expand: false; + str: ":"; + text-color: @fg; + margin: 0 0.3em 0 0; +} diff --git a/home-manager/laptop/programs/waybar/config.jsonc b/home-manager/laptop/programs/waybar/config.jsonc new file mode 100644 index 0000000..84aeafd --- /dev/null +++ b/home-manager/laptop/programs/waybar/config.jsonc @@ -0,0 +1,94 @@ +{ + "layer": "top", // Waybar at top layer + "height": 40, // Waybar height (to be removed for auto height) + "spacing": 8, // Gaps between modules (4px) + "margin-top": 20, + "margin-left": 20, + "margin-right": 20, + "margin-down": 5, + "modules-left": ["hyprland/workspaces"], + "modules-center": ["clock"], + "modules-right": ["network", "memory", "backlight", "pulseaudio", "hyprland/language", "tray", "battery"], + + "hyprland/workspaces": { + "format": "{icon}", + "on-click": "activate", + "all-outputs": false, + "format-icons": { + "1": "α", + "2": "β", + "3": "γ", + "4": "δ", + "5": "ε", + "urgent": "λ", + "focused": "σ", + "default": "ω"} + }, + "hyprland/language": { + "format": "{} <span font-family='Material Design Icons' rise='-1000' size='medium'></span>", + "format-ru": "ru", + "format-en": "en" + }, + "tray": { + "spacing": 10 + }, + "clock": { + // "timezone": "America/New_York", + "format": "{:%H:%M }", + "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>", + "format-alt": "{:%d %h %Y }", + "on-click": "killall calcure || alacritty -t calcure -e calcure;sudo ydotool click 0xc1" + }, + "memory": { + "format": "{}% ", + "on-click": "killall btop || alacritty -t btop -e btop;sudo ydotool click 0xc1" + }, + "backlight": { + // "device": "acpi_video1", + "format": "{percent}% {icon}", + "format-icons": ["", "", ""] + }, + "battery": { + "states": { + // "good": 95, + "warning": 30, + "critical": 15 + }, + "format": "{capacity}% {icon}", + "format-charging": "{capacity}% ", + "format-plugged": "{capacity}% ", + "format-alt": "{icon}", + // "format-good": "", // An empty format will hide the module + // "format-full": "", + "format-icons": ["", "", "", "", "", "", "", "", "", ""], + }, + "network": { + // "interface": "wlp2*", // (Optional) To force the use of this interface + "format-wifi": "{essid} ({signalStrength}%) ", + "format-ethernet": "{ipaddr}/{cidr} ", + "tooltip-format": "{ifname} via {gwaddr} ", + "format-linked": "{ifname} (No IP) ", + "format-disconnected": "", + "on-click": "killall connman-gtk || connman-gtk;sudo ydotool click 0xc1" + }, + "pulseaudio": { + // "scroll-step": 1, // %, can be a float + "format": "{volume}% {icon} {format_source}", + "format-bluetooth": "{volume}% <span font-family='Material Design Icons' rise='-2000' font-size='x-large'></span> {format_source}", + "format-bluetooth-muted": " {format_source}", + "format-muted": " {format_source}", + "format-source": "{volume}% ", + "format-source-muted": "", + "format-icons": { + "headphone": "", + "hands-free": "", + "headset": "", + "phone": "", + "portable": "", + "car": "", + "muted-icon": "", + "default": ["", "", ""] + }, + "on-click": "killall bluetuith || alacritty -t blue -e bluetuith; sudo ydotool click 0xc1" + }, +} diff --git a/home-manager/laptop/programs/waybar/default.nix b/home-manager/laptop/programs/waybar/default.nix new file mode 100644 index 0000000..8618718 --- /dev/null +++ b/home-manager/laptop/programs/waybar/default.nix @@ -0,0 +1,19 @@ +{ pkgs, ... }: +let + systemd.enable = true; + package = pkgs.waybar.override { + swaySupport = false; + mpdSupport = false; + }; + +in +{ + programs.waybar = { + enable = true; + inherit systemd package; + }; + xdg.configFile = { + "waybar/config".text = builtins.readFile ./config.jsonc; + "waybar/style.css".text = builtins.readFile ./style.css; + }; +} diff --git a/home-manager/laptop/programs/waybar/style.css b/home-manager/laptop/programs/waybar/style.css new file mode 100644 index 0000000..7f64ae3 --- /dev/null +++ b/home-manager/laptop/programs/waybar/style.css @@ -0,0 +1,31 @@ +* { + font-family: Material Design Icons, Rubik Medium; + font-size: 14px; + color: #939ab7; +} + +window#waybar { + border-radius: 10px; + background: rgba(36, 39, 58, 0.7); + border: 3px solid rgba(183, 189, 248, 0.2); +} + +#battery { + margin-right: 6px; +} + +#workspaces button label { + font-size: 15px; + color: #cad3f5; + transition: all 100ms ease-out; +} + +#workspaces button.active label { + font-weight: bolder; + color: #f0c6c6; + transition: all 100ms ease-out; +} + +#battery { + color: #f0c6c6; +} |
