From 9cc0fd8b2d35fab8d4020bca85140b6c8d6752f8 Mon Sep 17 00:00:00 2001 From: Roy Dumblauskas Date: Fri, 22 Aug 2025 22:24:10 -0500 Subject: [PATCH] roy config files in place, ready to rumble --- nixos/home-roy.nix | 449 ++++++++++++++++++ nixos/roy-config/alacritty/alacritty.toml | 17 + .../alacritty/catppuccin-frappe.toml | 65 +++ nixos/roy-config/fish/config.fish | 3 + nixos/roy-config/fish/fish_variables | 32 ++ .../fish/functions/fish_greeting.fish | 3 + .../fish/functions/fish_prompt.fish | 83 ++++ nixos/roy-config/hypr/hyprland.conf | 250 ++++++++++ nixos/roy-config/waybar/config | 65 +++ nixos/roy-config/waybar/style.css | 43 ++ 10 files changed, 1010 insertions(+) create mode 100644 nixos/home-roy.nix create mode 100644 nixos/roy-config/alacritty/alacritty.toml create mode 100644 nixos/roy-config/alacritty/catppuccin-frappe.toml create mode 100644 nixos/roy-config/fish/config.fish create mode 100644 nixos/roy-config/fish/fish_variables create mode 100644 nixos/roy-config/fish/functions/fish_greeting.fish create mode 100644 nixos/roy-config/fish/functions/fish_prompt.fish create mode 100755 nixos/roy-config/hypr/hyprland.conf create mode 100755 nixos/roy-config/waybar/config create mode 100755 nixos/roy-config/waybar/style.css diff --git a/nixos/home-roy.nix b/nixos/home-roy.nix new file mode 100644 index 0000000..c4c79a5 --- /dev/null +++ b/nixos/home-roy.nix @@ -0,0 +1,449 @@ +{ pkgs, inputs, ... }: + +{ + + home.username = "roy"; + home.homeDirectory = "/home/roy"; + + home.packages = with pkgs; [ + age + awscli2 + dig + discord + ffmpeg_6 + fish + git + git-filter-repo + grim + kdePackages.gwenview + minio-client + prismlauncher + slurp + sops + ssh-to-age + tree + tmux + unzip + vlc + wl-clipboard + yq-go + zip + ]; + + programs.git = { + enable = true; + userName = "Roy Dumblauskas"; + userEmail = "roydumblauskas@gmail.com"; + }; + + # user program config files + home.file = { + ".config/hypr".source = ./roy-config/hypr; + ".config/waybar".source = ./roy-config/waybar; + ".config/fish".source = ./roy-config/fish; + ".config/alacritty".source = ./roy-config/alacritty; + }; + + # user persisted dirs + home.persistence."/persist/home/roy" = { + directories = [ + ".ssh" + "rp" + "dl" + ".mozilla/firefox/roy/storage/default" + ".cache/mozilla/firefox/roy" + ]; + files = [ + ".bash_history" + ".mozilla/firefox/roy/places.sqlite" + ".mozilla/firefox/roy/cookies.sqlite" + ".config/sops/age/keys.txt" + + ]; + allowOther = true; + }; + + # User services must come after sops secrets + systemd.user.services.mbsync.unitConfig.After = [ "sops-nix.service" ]; + + # Configure firefox to be resilient against reboot + # Source = https://github.com/johnmpost/nixos-config + programs.firefox = { + enable = true; + + profiles.roy = { + search = { + force = true; + default = "ddgc"; + privateDefault = "ddgc"; + engines = { + bing.metaData.hidden = true; + ddg.metaData.hidden = true; + google.metaData.hidden = true; + wikipedia.metaData.hidden = true; + amazon.metaData.hidden = true; + ebay.metaData.hidden = true; + ddgc = { + name = "DuckDuckGo (unthemed)"; + urls = [{ template = "https://duckduckgo.com/?q={searchTerms}"; }]; + icon = "https://duckduckgo.com/favicon.ico"; + }; + }; + }; + + extensions.force = true; + extensions.packages = with inputs.firefox-addons.packages.${pkgs.system}; [ + ublock-origin + vimium-c + ]; + extensions.settings."uBlock0@raymondhill.net".settings = { + selectedFilterLists = [ + "ublock-filters" + "ublock-badware" + "ublock-privacy" + "ublock-quick-fixes" + "ublock-unbreak" + "easylist-chat" + "easylist-newsletters" + "easylist-notifications" + "easylist-annoyances" + "adguard-mobile-app-banners" + "adguard-other-annoyances" + "adguard-popup-overlays" + "adguard-widgets" + "ublock-annoyances" + ]; + }; + + settings = { + # don't force manual enablement of extensions on first launch + "extensions.autoDisableScopes" = 0; + "browser.urlbar.shortcuts.bookmarks" = false; + "browser.urlbar.shortcuts.history" = false; + "browser.urlbar.shortcuts.tabs" = false; + "browser.aboutConfig.showWarning" = false; + "dom.security.https_only_mode" = true; + "privacy.trackingprotection.enabled" = true; + "privacy.trackingprotection.pbmode.enabled" = true; + "privacy.donottrackheader.enabled" = true; + "signon.rememberSignons" = false; + "extensions.formautofill.creditCards.enabled" = false; + "extensions.formautofill.addresses.enabled" = false; + "browser.urlbar.suggest.quicksuggest.sponsored" = false; + # hide weather on new tab page + "browser.newtabpage.activity-stream.showWeather" = false; + "browser.newtabpage.activity-stream.feeds.section.topstories" = false; + "browser.newtabpage.activity-stream.feeds.topsites" = false; + "browser.toolbars.bookmarks.visibility" = "never"; + # set default download dir (to avoid Download dir creation) + "browser.download.dir" = "/home/roy/dl"; + "browser.download.useDownloadDir" = false; + "browser.download.folderList" = 2; + "full-screen-api.ignore-widgets" = true; + "browser.tabs.firefox-view" = false; + "browser.gesture.swipe.left" = ""; + "browser.gesture.swipe.right" = ""; + "pdfjs.sidebarViewOnLoad" = 0; + "identity.fxaccounts.enabled" = false; + "browser.newtabpage.activity-stream.showSponsoredTopSites" = false; + "browser.uitour.enabled" = false; + "toolkit.telemetry.enabled" = false; + # don't show about:welcome or privacy page on first launch + "browser.aboutwelcome.enabled" = false; + "datareporting.policy.dataSubmissionPolicyBypassNotification" = true; + # disable pocket + "extensions.pocket.enabled" = false; + # keep window open when closing all tabs + "browser.tabs.closeWindowWithLastTab" = false; + # allegedly disable addon recommendations + "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons" = false; + # allegedly disable feature recommendations + "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features" = false; + # don't show "open previous tabs?" toolbar, hopefully still allow functionality + "browser.startup.couldRestoreSession.count" = -1; + }; + + bookmarks.force = true; + bookmarks.settings = [ + { + name = "google search"; + url = "https://www.google.com/search?q=%s"; + keyword = "g"; + } + { + name = "youtube search"; + url = "https://www.youtube.com/results?search_query=%s"; + keyword = "yt"; + } + { + name = "wikipedia search"; + url = "https://en.wikipedia.org/wiki/Special:Search?search=%s"; + keyword = "w"; + } + { + name = "dictionary search"; + url = "https://www.wordnik.com/words/%s"; + keyword = "d"; + } + { + name = "github go to repo"; + url = "https://github.com/RoyDumblauskas/%s"; + keyword = "repo"; + } + { + name = "chatgpt"; + url = "https://chatgpt.com"; + keyword = "chat"; + } + { + name = "github my repos"; + url = "https://github.com/RoyDumblauskas?tab=repositories"; + keyword = "repos"; + } + { + name = "github profile"; + url = "https://github.com/RoyDumblauskas"; + keyword = "gh"; + } + { + name = "drive 0"; + url = "https://drive.google.com/drive/u/0/folders/1hMAgupSZvhAml0K1WhBi9sNINfvkhw0e"; + keyword = "d0"; + } + { + name = "drive 1"; + url = "https://drive.google.com/drive/u/1"; + keyword = "d1"; + } + { + name = "mail 1"; + url = "https://mail.google.com/mail/u/1"; + keyword = "m1"; + } + { + name = "mail 0"; + url = "https://mail.google.com/mail/u/0"; + keyword = "m0"; + } + { + name = "discord"; + url = "https://discord.com/app"; + keyword = "dis"; + } + { + name = "downloads"; + url = "file:///home/roy/dl/%s"; + keyword = "dl"; + } + { + name = "nix package search"; + url = "https://search.nixos.org/packages?channel=unstable&query=%s"; + keyword = "nixp"; + } + ]; + }; + }; + + # Configure nixvim + programs.nixvim = { + enable = true; + globals.mapleader = " "; + opts = { + number = true; + relativenumber = true; + shiftwidth = 2; + tabstop = 2; + expandtab = true; + }; + + keymaps = [ + { + action = "Neotree toggle"; + key = "b"; + mode = [ "n" ]; + options.silent = true; + options.desc = "Toggle Neotree"; + } + { + action = "h"; + key = "h"; + mode = [ "n" ]; + options.silent = true; + options.desc = "Focus left"; + } + { + action = "l"; + key = "l"; + mode = [ "n" ]; + options.silent = true; + options.desc = "Focus right"; + } + { + action = "j"; + key = "j"; + mode = [ "n" ]; + options.silent = true; + options.desc = "Focus down"; + } + { + action = "k"; + key = "k"; + mode = [ "n" ]; + options.silent = true; + options.desc = "Focus up"; + } + + ]; + + plugins = { + lualine.enable = true; + lsp-lines.enable = true; + lsp-format.enable = true; + + neo-tree = { + enable = true; + }; + + # neo-tree dependency + web-devicons.enable = true; + + lsp = { + enable = true; + inlayHints = true; + servers = { + html.enable = true; + lua_ls.enable = true; + nil_ls.enable = true; + ts_ls.enable = true; + marksman.enable = true; + pyright.enable = true; + gopls.enable = true; + terraformls.enable = true; + ansiblels.enable = true; + jsonls.enable = true; + yamlls.enable = true; + rust_analyzer = { + enable = true; + installRustc = true; + installCargo = true; + settings = { + cargo = { + features = "all"; + }; + }; + }; + }; + + keymaps = { + silent = true; + lspBuf = { + gd = { + action = "definition"; + desc = "Goto Definition"; + }; + gr = { + action = "references"; + desc = "Goto References"; + }; + gD = { + action = "declaration"; + desc = "Goto Declaration"; + }; + gI = { + action = "implementation"; + desc = "Goto Implementation"; + }; + gT = { + action = "type_definition"; + desc = "Type Definition"; + }; + K = { + action = "hover"; + desc = "Hover"; + }; + "cw" = { + action = "workspace_symbol"; + desc = "Workspace Symbol"; + }; + "r" = { + action = "rename"; + desc = "Rename"; + }; + }; + + diagnostic = { + "cd" = { + action = "open_float"; + desc = "Line Diagnostics"; + }; + "]d" = { + action = "goto_next"; + desc = "Next Diagnostic"; + }; + "[d" = { + action = "goto_prev"; + desc = "Previous Diagnostic"; + }; + }; + }; + }; + + cmp = { + enable = true; + autoEnableSources = true; + settings = { + sources = [ + {name = "nvim_lsp";} + {name = "path";} + {name = "buffer";} + {name = "luasnip";} + ]; + + mapping = { + "" = "cmp.mapping.complete()"; + "" = "cmp.mapping.scroll_docs(-4)"; + "" = "cmp.mapping.close()"; + "" = "cmp.mapping.scroll_docs(4)"; + "" = "cmp.mapping.confirm({ select = true })"; + "" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})"; + "" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})"; + }; + }; + }; + }; + + extraConfigLua = '' + local _border = "rounded" + + vim.lsp.handlers["textDocument/hover"] = vim.lsp.with( + vim.lsp.handlers.hover, { + border = _border + } + ) + + vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with( + vim.lsp.handlers.signature_help, { + border = _border + } + ) + + vim.diagnostic.config{ + float={border=_border} + }; + + require('lspconfig.ui.windows').default_options = { + border = _border + } + ''; + + colorschemes.catppuccin = { + enable = true; + settings.flavour = "frappe"; + }; + }; + + + home.stateVersion = "24.11"; + programs.home-manager.enable = true; + +} diff --git a/nixos/roy-config/alacritty/alacritty.toml b/nixos/roy-config/alacritty/alacritty.toml new file mode 100644 index 0000000..329f378 --- /dev/null +++ b/nixos/roy-config/alacritty/alacritty.toml @@ -0,0 +1,17 @@ +[general] +import = [ + "~/.config/alacritty/catppuccin-frappe.toml" +] + +[terminal] +shell = "fish" + +[font] +normal = { family = "UbuntuMono Nerd Font" } +italic = { family = "UbuntuMono Nerd Font" } +bold = { family = "UbuntuMono Nerd Font" } +size = 16 + +[window] +decorations = "full" +opacity = 1 diff --git a/nixos/roy-config/alacritty/catppuccin-frappe.toml b/nixos/roy-config/alacritty/catppuccin-frappe.toml new file mode 100644 index 0000000..3e6fac1 --- /dev/null +++ b/nixos/roy-config/alacritty/catppuccin-frappe.toml @@ -0,0 +1,65 @@ +[colors.primary] +background = "#303446" +foreground = "#c6d0f5" +dim_foreground = "#838ba7" +bright_foreground = "#c6d0f5" + +[colors.cursor] +text = "#303446" +cursor = "#f2d5cf" + +[colors.vi_mode_cursor] +text = "#303446" +cursor = "#babbf1" + +[colors.search.matches] +foreground = "#303446" +background = "#a5adce" + +[colors.search.focused_match] +foreground = "#303446" +background = "#a6d189" + +[colors.footer_bar] +foreground = "#303446" +background = "#a5adce" + +[colors.hints.start] +foreground = "#303446" +background = "#e5c890" + +[colors.hints.end] +foreground = "#303446" +background = "#a5adce" + +[colors.selection] +text = "#303446" +background = "#f2d5cf" + +[colors.normal] +black = "#51576d" +red = "#e78284" +green = "#a6d189" +yellow = "#e5c890" +blue = "#8caaee" +magenta = "#f4b8e4" +cyan = "#81c8be" +white = "#b5bfe2" + +[colors.bright] +black = "#626880" +red = "#e78284" +green = "#a6d189" +yellow = "#e5c890" +blue = "#8caaee" +magenta = "#f4b8e4" +cyan = "#81c8be" +white = "#a5adce" + +[[colors.indexed_colors]] +index = 16 +color = "#ef9f76" + +[[colors.indexed_colors]] +index = 17 +color = "#f2d5cf" diff --git a/nixos/roy-config/fish/config.fish b/nixos/roy-config/fish/config.fish new file mode 100644 index 0000000..d714361 --- /dev/null +++ b/nixos/roy-config/fish/config.fish @@ -0,0 +1,3 @@ +if status is-interactive + # Commands to run in interactive sessions can go here +end diff --git a/nixos/roy-config/fish/fish_variables b/nixos/roy-config/fish/fish_variables new file mode 100644 index 0000000..84c8273 --- /dev/null +++ b/nixos/roy-config/fish/fish_variables @@ -0,0 +1,32 @@ +# This file contains fish universal variable definitions. +# VERSION: 3.0 +SETUVAR __fish_initialized:3800 +SETUVAR fish_color_autosuggestion:brblack +SETUVAR fish_color_cancel:\x2dr +SETUVAR fish_color_command:normal +SETUVAR fish_color_comment:red +SETUVAR fish_color_cwd:green +SETUVAR fish_color_cwd_root:red +SETUVAR fish_color_end:green +SETUVAR fish_color_error:brred +SETUVAR fish_color_escape:brcyan +SETUVAR fish_color_history_current:\x2d\x2dbold +SETUVAR fish_color_host:normal +SETUVAR fish_color_host_remote:yellow +SETUVAR fish_color_normal:normal +SETUVAR fish_color_operator:brcyan +SETUVAR fish_color_param:cyan +SETUVAR fish_color_quote:yellow +SETUVAR fish_color_redirection:cyan\x1e\x2d\x2dbold +SETUVAR fish_color_search_match:white\x1e\x2d\x2dbackground\x3dbrblack +SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack +SETUVAR fish_color_status:red +SETUVAR fish_color_user:brgreen +SETUVAR fish_color_valid_path:\x2d\x2dunderline +SETUVAR fish_key_bindings:fish_default_key_bindings +SETUVAR fish_pager_color_completion:normal +SETUVAR fish_pager_color_description:yellow\x1e\x2di +SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline +SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan +SETUVAR fish_pager_color_selected_background:\x2dr +SETUVAR fish_prompt_pwd_dir_length:100 diff --git a/nixos/roy-config/fish/functions/fish_greeting.fish b/nixos/roy-config/fish/functions/fish_greeting.fish new file mode 100644 index 0000000..0f83e89 --- /dev/null +++ b/nixos/roy-config/fish/functions/fish_greeting.fish @@ -0,0 +1,3 @@ +function fish_greeting + # echo (set_color yellow)(date +%T) +end diff --git a/nixos/roy-config/fish/functions/fish_prompt.fish b/nixos/roy-config/fish/functions/fish_prompt.fish new file mode 100644 index 0000000..e436fa1 --- /dev/null +++ b/nixos/roy-config/fish/functions/fish_prompt.fish @@ -0,0 +1,83 @@ +function fish_prompt --description 'Write out the prompt' + set -l last_pipestatus $pipestatus + set -lx __fish_last_status $status # Export for __fish_print_pipestatus. + set -l normal (set_color normal) + set -q fish_color_status + or set -g fish_color_status red + + # Color the prompt differently when we're root + set -l color_cwd $fish_color_cwd + set -l suffix '>' + if functions -q fish_is_root_user; and fish_is_root_user + if set -q fish_color_cwd_root + set color_cwd $fish_color_cwd_root + end + set suffix '#' + end + + # Write pipestatus + # If the status was carried over (if no command is issued or if `set` leaves the status untouched), don't bold it. + set -l bold_flag --bold + set -q __fish_prompt_status_generation; or set -g __fish_prompt_status_generation $status_generation + if test $__fish_prompt_status_generation = $status_generation + set bold_flag + end + set __fish_prompt_status_generation $status_generation + set -l status_color (set_color $fish_color_status) + set -l statusb_color (set_color $bold_flag $fish_color_status) + set -l prompt_status (__fish_print_pipestatus "[" "]" "|" "$status_color" "$statusb_color" $last_pipestatus) + + echo -n -s (prompt_login)' ' (set_color $color_cwd) (prompt_pwd) $normal (fish_vcs_prompt) $normal " "$prompt_status $suffix " " +end + +function prompt_pwd --description 'short CWD for the prompt' + set -l options h/help d/dir-length= D/full-length-dirs= + argparse -n prompt_pwd $options -- $argv + or return + + if set -q _flag_help + __fish_print_help prompt_pwd + return 0 + end + + set -q argv[1] + or set argv $PWD + + set -ql _flag_d + and set -l fish_prompt_pwd_dir_length $_flag_d + + set -q fish_prompt_pwd_dir_length + or set -l fish_prompt_pwd_dir_length 1 + + set -l fulldirs 0 + set -ql _flag_D + and set -l fish_prompt_pwd_full_dirs $_flag_D + + set -q fish_prompt_pwd_full_dirs + or set -l fish_prompt_pwd_full_dirs 1 + + for path in $argv + # Replace $HOME with "~" + set -l realhome (string escape --style=regex -- ~) + set -l tmp (string replace -r '^'"$realhome"'($|/)' '~$1' $path) + + if test "$fish_prompt_pwd_dir_length" -eq 0 + echo $tmp + else + # Shorten to at most $fish_prompt_pwd_dir_length characters per directory + # with full-length-dirs components left at full length. + set -l full + if test $fish_prompt_pwd_full_dirs -gt 0 + set -l all (string split -m (math $fish_prompt_pwd_full_dirs - 1) -r / $tmp) + set tmp $all[1] + set full $all[2..] + else if test $fish_prompt_pwd_full_dirs -eq 0 + # 0 means not even the last component is kept + string replace -ar '(\.?[^/]{'"$fish_prompt_pwd_dir_length"'})[^/]*' '$1' $tmp + continue + end + + string join / -- (string replace -ar -- '(\.?[^/]{'"$fish_prompt_pwd_dir_length"'})[^/]*/' '$1/' $tmp) $full + end + end +end diff --git a/nixos/roy-config/hypr/hyprland.conf b/nixos/roy-config/hypr/hyprland.conf new file mode 100755 index 0000000..b7c9ab7 --- /dev/null +++ b/nixos/roy-config/hypr/hyprland.conf @@ -0,0 +1,250 @@ +# You can split this configuration into multiple files +# Create your files separately and then link them to this file like this: +# source = ~/.config/hypr/myColors.conf + + +################ +### MONITORS ### +################ + +# See https://wiki.hyprland.org/Configuring/Monitors/ +monitor=,preferred,auto,1 + + +################### +### MY PROGRAMS ### +################### + +# See https://wiki.hyprland.org/Configuring/Keywords/ + +# Set programs that you use +$terminal = alacritty +$fileManager = dolphin +$menu = wofi --show drun + + +################# +### AUTOSTART ### +################# + +# Autostart necessary processes (like notifications daemons, status bars, etc.) +# Or execute your favorite apps at launch like this: + +exec-once = $terminal +exec-once = waybar + +############################# +### ENVIRONMENT VARIABLES ### +############################# + +# See https://wiki.hyprland.org/Configuring/Environment-variables/ + +env = HYPRCURSOR_THEME,rose-pine-hyprcursor +env = HYPRCURSOR_SIZE,18 + + +##################### +### LOOK AND FEEL ### +##################### + +# Refer to https://wiki.hyprland.org/Configuring/Variables/ + +# https://wiki.hyprland.org/Configuring/Variables/#general +general { + gaps_in = 0 + gaps_out = 0 + + border_size = 1 + + # https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors + col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg + col.inactive_border = rgba(595959aa) + + # Set to true enable resizing windows by clicking and dragging on borders and gaps + resize_on_border = false + + # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on + allow_tearing = false + + layout = dwindle +} + +# https://wiki.hyprland.org/Configuring/Variables/#decoration +decoration { + rounding = 0 + + # Change transparency of focused and unfocused windows + active_opacity = 1.0 + inactive_opacity = 1.0 + + shadow { + enabled = false; + } + + # https://wiki.hyprland.org/Configuring/Variables/#blur + blur { + enabled = false; + } +} + +# https://wiki.hyprland.org/Configuring/Variables/#animations +animations { + enabled = false; + first_launch_animation = false; + workspace_wraparound = false; +} + +# Ref https://wiki.hyprland.org/Configuring/Workspace-Rules/ +# "Smart gaps" / "No gaps when only" +# uncomment all if you wish to use that. +# workspace = w[tv1], gapsout:0, gapsin:0 +# workspace = f[1], gapsout:0, gapsin:0 +# windowrulev2 = bordersize 0, floating:0, onworkspace:w[tv1] +# windowrulev2 = rounding 0, floating:0, onworkspace:w[tv1] +# windowrulev2 = bordersize 0, floating:0, onworkspace:f[1] +# windowrulev2 = rounding 0, floating:0, onworkspace:f[1] + +# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more +dwindle { + pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below + preserve_split = true # You probably want this +} + +# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more +master { + new_status = master +} + +# https://wiki.hyprland.org/Configuring/Variables/#misc +misc { + force_default_wallpaper = 0 # Set to 0 or 1 to disable the anime mascot wallpapers + disable_hyprland_logo = true # If true disables the random hyprland logo / anime girl background. :( +} + + +############# +### INPUT ### +############# + +# https://wiki.hyprland.org/Configuring/Variables/#input +input { + kb_layout = us + kb_variant = + kb_model = + kb_options = + kb_rules = + + follow_mouse = 1 + + sensitivity = 0 # -1.0 - 1.0, 0 means no modification. + + touchpad { + natural_scroll = false + } +} + +# https://wiki.hyprland.org/Configuring/Variables/#gestures +gestures { + workspace_swipe = false +} + +# Example per-device config +# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more +device { } + + +################### +### KEYBINDINGS ### +################### + +# See https://wiki.hyprland.org/Configuring/Keywords/ +$mainMod = SUPER # Sets "Windows" key as main modifier + +# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more +bind = $mainMod, Return, exec, $terminal +bind = $mainMod, Q, killactive, +bind = $mainMod, M, exit, +bind = $mainMod, E, exec, $fileManager +bind = $mainMod, V, togglefloating, +bind = $mainMod, R, exec, $menu +bind = $mainMod, P, pseudo, # dwindle +bind = $mainMod, J, togglesplit, # dwindle +bind = $mainMod SHIFT, Return, exec, firefox + +# Move focus with mainMod + hjkl +bind = $mainMod, h, movefocus, l +bind = $mainMod, l, movefocus, r +bind = $mainMod, k, movefocus, u +bind = $mainMod, j, movefocus, d + +# Switch workspaces with mainMod + [0-9] +bind = $mainMod, 1, workspace, 1 +bind = $mainMod, 2, workspace, 2 +bind = $mainMod, 3, workspace, 3 +bind = $mainMod, 4, workspace, 4 +bind = $mainMod, 5, workspace, 5 +bind = $mainMod, 6, workspace, 6 +bind = $mainMod, 7, workspace, 7 +bind = $mainMod, 8, workspace, 8 +bind = $mainMod, 9, workspace, 9 +bind = $mainMod, 0, workspace, 10 + +# Move active window to a workspace with mainMod + SHIFT + [0-9] +bind = $mainMod SHIFT, 1, movetoworkspace, 1 +bind = $mainMod SHIFT, 2, movetoworkspace, 2 +bind = $mainMod SHIFT, 3, movetoworkspace, 3 +bind = $mainMod SHIFT, 4, movetoworkspace, 4 +bind = $mainMod SHIFT, 5, movetoworkspace, 5 +bind = $mainMod SHIFT, 6, movetoworkspace, 6 +bind = $mainMod SHIFT, 7, movetoworkspace, 7 +bind = $mainMod SHIFT, 8, movetoworkspace, 8 +bind = $mainMod SHIFT, 9, movetoworkspace, 9 +bind = $mainMod SHIFT, 0, movetoworkspace, 10 + +# Screenshot to clipboard +bind = $mainMod SHIFT, S, exec, grim -g "$(slurp -d)" - | wl-copy + +# Example special workspace (scratchpad) +bind = $mainMod, S, togglespecialworkspace, magic +bind = $mainMod SHIFT, S, movetoworkspace, special:magic + +# Scroll through existing workspaces with mainMod + scroll +bind = $mainMod, mouse_down, workspace, e+1 +bind = $mainMod, mouse_up, workspace, e-1 + +# Move/resize windows with mainMod + LMB/RMB and dragging +bindm = $mainMod, mouse:272, movewindow +bindm = $mainMod, mouse:273, resizewindow + +# Laptop multimedia keys for volume and LCD brightness +bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ +bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- +bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle +bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle +bindel = ,XF86MonBrightnessUp, exec, brightnessctl s 10%+ +bindel = ,XF86MonBrightnessDown, exec, brightnessctl s 10%- + +# Requires playerctl +bindl = , XF86AudioNext, exec, playerctl next +bindl = , XF86AudioPause, exec, playerctl play-pause +bindl = , XF86AudioPlay, exec, playerctl play-pause +bindl = , XF86AudioPrev, exec, playerctl previous + +############################## +### WINDOWS AND WORKSPACES ### +############################## + +# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more +# See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules + +# Example windowrule v1 +# windowrule = float, ^(kitty)$ + +# Example windowrule v2 +# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ + +# Ignore maximize requests from apps. You'll probably like this. +windowrulev2 = suppressevent maximize, class:.* + +# Fix some dragging issues with XWayland +windowrulev2 = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0 diff --git a/nixos/roy-config/waybar/config b/nixos/roy-config/waybar/config new file mode 100755 index 0000000..366b16d --- /dev/null +++ b/nixos/roy-config/waybar/config @@ -0,0 +1,65 @@ +{ + "layer": "top", + "position": "top", + "height": 26, + "spacing": 3, + + "modules-left": ["hyprland/workspaces"], + "modules-center": ["clock"], + "modules-right": ["wireplumber", "group/bat", "group/net"], + + "group/bat": { + "orientation": "horizontal", + "modules": ["battery"] + }, + + "group/net": { + "orientation": "horizontal", + "modules": ["network", "bluetooth"] + }, + + "hyprland/workspaces": { + "format": "{name}", + "sort-by-number": true, + "persistent-workspaces": { + } + }, + + "clock": { + "format": "{:%d.%m.%Y | %H:%M:%S}", + "interval": 1 + }, + + "wireplumber": { + "format": "\udb81\udd7e {volume}%", + "max-volume": 100, + "scroll-step": 5 + }, + + "battery": { + "bat": "BAT0", + "interval": 60, + "format": "{icon} {capacity}%", + "format-icons": ["\uf244", "\uf243", "\uf242", "\uf241", "\uf240"], + }, + + "network": { + "format": "", + "format-ethernet": "\udb83\udc9d ", + "format-wifi": "{icon} ", + "format-disconnected": "\udb83\udc9c ", + "format-icons": ["\udb82\udd2f", "\udb82\udd1f", "\udb82\udd22", "\udb82\udd25", "\udb82\udd28"], + "tooltip-format-wifi": "{essid} ({signalStrength}%)", + "tooltip-format-ethernet": "{ifname}", + "tooltip-format-disconnected": "Disconnected", + }, + + "bluetooth": { + "format": "\udb80\udcaf", + "format-disabled": "\udb80\udcb2", + "format-connected": "\udb80\udcb1", + "tooltip-format": "{controller_alias}\t{controller_address}", + "tooltip-format-connected": "{controller_alias}\t{controller_address}\n\n{device_enumerate}", + "tooltip-format-enumerate-connected": "{device_alias}\t{device_address}" + }, +} diff --git a/nixos/roy-config/waybar/style.css b/nixos/roy-config/waybar/style.css new file mode 100755 index 0000000..48a9edb --- /dev/null +++ b/nixos/roy-config/waybar/style.css @@ -0,0 +1,43 @@ +@define-color foreground #eff0f1; +@define-color foreground-inactive #7f8c8d; +@define-color background #232629; +@define-color background-alt #31363b; + +* { + font-family: UbuntuMono Nerd Font; + font-size: 16px; + padding: 0; + margin: 0; +} + +#waybar { + color: @foreground; + background-color: @background; +} + +#workspaces button { + color: @foreground-inactive; + padding-left: 2px; + padding-right: 2px; +} + +#workspaces button.active { + color: @foreground; + background-color: @background-alt; + border-radius: 2px; +} + +#wireplumber, +#bat, +#net { + background-color: @background-alt; + border-radius: 3px; + padding-left: 0.5em; + padding-right: 0.5em; + margin-left: 0.3em; +} + +#battery, +#network { + margin-right: 0.8em; +}