dotfiles

My PC Dotfiles & Website
commit e4822f1fec1e20c9192972a21906133923b8aced
parent 427e6187810c7746f9ace1ff44268108e7f4ccb2
Author: maydayv7 <maydayv7@gmail.com>
Date:   Sun, 28 Jan 2024 13:21:14 +0530

feat: Hyprland Notifications + Theming + Apps

Also define Firefox Plugins

Diffstat:

Mfiles/README.md | 1+
Mfiles/flake.nix | 7+++++++
Afiles/geany/catppuccin.conf | 126+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Afiles/geany/settings.conf | 188+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Afiles/ulauncher/extensions/com.github.friday.ulauncher-clipboard.db | 0
Mfiles/ulauncher/settings/extension.json | 7+++++++
Mmodules/README.md | 11++++++++---
Mmodules/apps/firefox.nix | 60+++++++++++++++++++++++++++++++-----------------------------
Mmodules/gui/desktop/gnome.nix | 116++++++++++++++++++++++++++++++++++++++++++++-----------------------------------
Mmodules/gui/desktop/hyprland/apps.nix | 63+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
Mmodules/gui/desktop/hyprland/binds.nix | 13+++++++++++--
Mmodules/gui/desktop/hyprland/default.nix | 42+++++++++++++++++++++++++++++-------------
Amodules/gui/desktop/hyprland/rules.nix | 24++++++++++++++++++++++++
Mmodules/gui/desktop/pantheon.nix | 18+++++++++---------
Mmodules/gui/desktop/xfce/default.nix | 93++++++++++++++++++++++++++++++++++++++++++-------------------------------------
Mmodules/gui/gtk.nix | 39++++++++++++++++++++++++---------------
Mmodules/gui/launcher.nix | 7+++++--
Amodules/gui/qt.nix | 36++++++++++++++++++++++++++++++++++++
Mmodules/gui/theme.nix | 16+++-------------
Apackages/kitty-search/default.nix | 28++++++++++++++++++++++++++++
Apackages/kitty-search/metadata.nix | 6++++++
21 files changed, 718 insertions(+), 183 deletions(-)

diff --git a/files/README.md b/files/README.md @@ -5,6 +5,7 @@ The `files` directory is used to store all my plain-text program configuration f - [`archive`](./archive) - Old, Archived Files - [`ascii`](./ascii) - Personal Collection of beautiful Ascii Art - [`colors`](./colors) - Base16 Color Schemes +- [`geany`](./geany) - Configuration for Geany Text Editor - [`git`](./git) - Configuration for `git` Version Control - [`gnome`](./gnome) - Configuration Files for GNOME Desktop - [`gpg`](./gpg) - Encrypted GPG Keys diff --git a/files/flake.nix b/files/flake.nix @@ -36,6 +36,13 @@ # Neofetch fetch = readFile ./neofetch/config.conf; + # Geany Text Editor + geany = map.files { + directory = ./geany; + apply = readFile; + extension = ".conf"; + }; + # X11 Touchpad Gestures gestures = readFile ./touchegg/gestures.xml; diff --git a/files/geany/catppuccin.conf b/files/geany/catppuccin.conf @@ -0,0 +1,126 @@ +[theme_info] +name=Catppuccin Macchiato +description=Soothing pastel theme for the high-spirited! +version=0.2.5 +author=Isabelinc +compat=1.22;1.23;1.23.1;1.24 + +[named_colors] +mantle=#1e2030 +base=#24273a +surface0=#363a4f +# +text=#cad3f5 +subtext0=#A5ADCB +subtext1=#B8C0E0 +# +overlay2=#939AB7 +overlay1=#8087A2 +overlay0=#6E738D +# +blue=#8AADF4 +sky=#91d7e3 +teal=#8bd5ca +yellow=#eed49f +green=#a6da95 +flamingo=#f0c6c6 +mauve=#c6a0f6 +pink=#f5bde6 +maroon=#ee99a0 +red=#ed8796 +peach=#f5a97f +rosewater=#f4dbd6 +lavender=#b7bdf8 +sapphire=#7dc4e4 + + +[named_styles] +operator=blue +default=subtext1;base;false;false +error=red;yellow;false;true +op=blue;base;true;false + +# Editor UI +# selection: words; background +selection=pink;blue;false;false +current_line=;surface0;true +brace_good=green;overlay1;true;true +brace_bad=red;overlay1;true;true +margin_line_number=text;base +margin_folding=text;surface0 +fold_symbol_highlight=text +indent_guide=overlay1 +caret=text;;false +marker_line=yellow;yellow +marker_search=mantle;blue +marker_mark=green;surface0 +call_tips=overlay1;text;false;false +white_space=overlay1;;true + +# Basic Languages +comment=overlay0 +comment_doc=comment +comment_line=overlay0 +comment_line_doc=comment_doc +comment_doc_keyword=comment,bold +comment_doc_keyword_error=comment,italic + +number=teal +number_1=number +number_2=number_1 + +# class <color()> +type=pink;;flase;true; + +class=blue +# def <color():> +function=teal;;false;true; +parameter=peach + + +keyword=default +# def, for, in +keyword_1=red;;false;true +keyword_2=default +keyword_3=peach +keyword_4=keyword_2 + +identifier=sky;;false;false +# main +identifier_1=subtext0;;false;false +identifier_2=default +identifier_3=identifier_2 +identifier_4=identifier_2 + +string=green;;false;false +string_1=peach;;false;false +string_2=green;;false;false +string_3=default +string_4=default +string_eol=string_1 +character=string_1 +backticks=string_2 +here_doc=string_2 + +scalar=string_2 +label=red +preprocessor=green +regex=pink +operator=lavender;;true;false +decorator=string_1 +other=default +extra=keyword; + +# Markup +tag=keyword +tag_unknown=tag,bold +tag_end=tag,bold +attribute=type +attribute_unknown=attribute,bold +value=number +entity=number + +# Diff +line_added=green +line_removed=red +line_changed=preprocessor diff --git a/files/geany/settings.conf b/files/geany/settings.conf @@ -0,0 +1,188 @@ +[geany] +pref_main_load_session=true +pref_main_project_file_in_basedir=true +pref_main_save_winpos=true +pref_main_save_wingeom=true +pref_main_confirm_exit=false +pref_main_suppress_status_messages=false +switch_msgwin_pages=false +beep_on_errors=true +auto_focus=false +sidebar_symbol_visible=true +sidebar_openfiles_visible=true +editor_font=Monospace 10 +tagbar_font=Sans 9 +msgwin_font=Monospace 9 +show_notebook_tabs=true +show_tab_cross=true +tab_order_ltr=true +tab_order_beside=false +tab_pos_editor=2 +tab_pos_msgwin=0 +tab_label_length=1000 +show_indent_guide=false +show_white_space=false +show_line_endings=false +show_line_endings_only_when_differ=false +show_markers_margin=true +show_linenumber_margin=true +long_line_enabled=true +long_line_type=0 +long_line_column=72 +long_line_color=#C2EBC2 +symbolcompletion_max_height=10 +symbolcompletion_min_chars=4 +use_folding=true +unfold_all_children=false +use_indicators=true +line_wrapping=false +auto_close_xml_tags=true +complete_snippets=true +auto_complete_symbols=true +pref_editor_disable_dnd=false +pref_editor_smart_home_key=true +pref_editor_newline_strip=false +line_break_column=72 +auto_continue_multiline=true +comment_toggle_mark=~ +scroll_stop_at_last_line=true +autoclose_chars=0 +pref_editor_default_new_encoding=UTF-8 +pref_editor_default_open_encoding=none +default_eol_character=2 +pref_editor_new_line=true +pref_editor_ensure_convert_line_endings=false +pref_editor_replace_tabs=false +pref_editor_trail_space=false +pref_toolbar_show=true +pref_toolbar_append_to_menu=false +pref_toolbar_use_gtk_default_style=true +pref_toolbar_use_gtk_default_icon=true +pref_toolbar_icon_style=0 +pref_toolbar_icon_size=0 +pref_template_developer=V 7 +pref_template_company= +pref_template_mail=v7@vortex +pref_template_initial=V7 +pref_template_version=1.0 +pref_template_year=%Y +pref_template_date=%Y-%m-%d +pref_template_datetime=%d.%m.%Y %H:%M:%S %Z +context_action_cmd= +sidebar_visible=true +statusbar_visible=true +msgwindow_visible=true +fullscreen=false +symbols_group_by_type=true +color_picker_palette= +scribble_text=Type here what you want, use it as a notice/scratch board +scribble_pos=57 +custom_date_format= +default_open_path= +cmdline_new_files=true +notebook_double_click_hides_widgets=false +tab_close_switch_to_mru=false +tab_pos_sidebar=2 +openfiles_path_mode=2 +sidebar_pos=0 +symbols_sort_mode=0 +msgwin_orientation=1 +highlighting_invert_all=false +pref_main_search_use_current_word=true +check_detect_indent=false +detect_indent_width=false +use_tab_to_indent=true +backspace_unindent=true +pref_editor_tab_width=4 +indent_mode=2 +indent_type=1 +virtualspace=1 +change_history_markers=false +change_history_indicators=false +autocomplete_doc_words=false +completion_drops_rest_of_word=false +autocompletion_max_entries=30 +autocompletion_update_freq=250 +color_scheme=theme.conf +scroll_lines_around_cursor=0 +mru_length=10 +disk_check_timeout=30 +show_editor_scrollbars=true +brace_match_ltgt=false +use_gtk_word_boundaries=true +complete_snippets_whilst_editing=false +indent_hard_tab_width=8 +editor_ime_interaction=0 +use_atomic_file_saving=false +gio_unsafe_save_backup=false +use_gio_unsafe_file_saving=true +keep_edit_history_on_reload=true +show_keep_edit_history_on_reload_msg=true +reload_clean_doc_on_file_change=false +save_config_on_file_change=true +extract_filetype_regex=-\\*-\\s*([^\\s]+)\\s*-\\*- +allow_always_save=false +find_selection_type=0 +replace_and_find_by_default=true +show_symbol_list_expanders=true +compiler_tab_autoscroll=true +statusbar_template=line: %l / %L col: %c sel: %s %w %t %mEOL: %M encoding: %e filetype: %f scope: %S +new_document_after_close=false +msgwin_status_visible=true +msgwin_compiler_visible=true +msgwin_messages_visible=true +msgwin_scribble_visible=true +warn_on_project_close=true + +[tools] +terminal_cmd=xterm -e "/bin/sh %c" +browser_cmd= +grep_cmd=grep + +[printing] +print_cmd=lpr '%f' +use_gtk_printing=true +print_line_numbers=true +print_page_numbers=true +print_page_header=true +page_header_basename=false +page_header_datefmt=%c + +[VTE] +load_vte=true +send_cmd_prefix= +send_selection_unsafe=false + +[build-menu] +number_ft_menu_items=0 +number_non_ft_menu_items=0 +number_exec_menu_items=0 + +[search] +pref_search_hide_find_dialog=false +pref_search_always_wrap=false +pref_search_current_file_dir=true +fif_regexp=false +fif_case_sensitive=true +fif_match_whole_word=false +fif_invert_results=false +fif_recursive=false +fif_extra_options= +fif_use_extra_options=false +fif_files= +fif_files_mode=0 +find_regexp=false +find_regexp_multiline=false +find_case_sensitive=false +find_escape_sequences=false +find_match_whole_word=false +find_match_word_start=false +find_close_dialog=true +replace_regexp=false +replace_regexp_multiline=false +replace_case_sensitive=false +replace_escape_sequences=false +replace_match_whole_word=false +replace_match_word_start=false +replace_search_backwards=false +replace_close_dialog=true diff --git a/files/ulauncher/extensions/com.github.friday.ulauncher-clipboard.db b/files/ulauncher/extensions/com.github.friday.ulauncher-clipboard.db Binary files differ. diff --git a/files/ulauncher/settings/extension.json b/files/ulauncher/settings/extension.json @@ -89,5 +89,12 @@ "updated_at": "2024-01-15T13:58:08.459425", "last_commit": "54622e353a7d2d0421250a76cab4aafa9ca720c5", "last_commit_time": "2022-01-16T17:56:00" + }, + "com.github.friday.ulauncher-clipboard": { + "id": "com.github.friday.ulauncher-clipboard", + "url": "https://github.com/friday/ulauncher-clipboard", + "updated_at": "2024-01-28T12:22:40.891939", + "last_commit": "dde8e6c9db80b0c9301ebdc9b13c4383b4789bc8", + "last_commit_time": "2023-11-27T22:23:17" } } diff --git a/modules/README.md b/modules/README.md @@ -30,9 +30,6 @@ Configuration [Builder](./configuration.nix) - `wallpaper`: Desktop Wallpaper Choice (taken from `files.wallpapers`) - `fonts` - - `enable`: Enable Fonts Configuration - `true / false` - - `theme` - - - `name`: GUI Application Theme - - `package`: Theme Package - `icons` - - `name`: Application Icons Theme - Ex. `Papirus` - `package`: Icons Package - Ex. `pkgs.papirus-icon-theme` @@ -41,6 +38,14 @@ Configuration [Builder](./configuration.nix) - `package`: Cursors Package - Ex. `pkgs.bibata-cursors` - `gtk` - - `enable`: Enable GTK Configuration - `true / false` + - `theme` - + - `name`: GTK+ Application Theme + - `package`: GTK+ Theme Package + - `qt` - + - `enable`: Enable QT Configuration - `true / false` + - `theme` - + - `name`: QT Application Theme + - `package`: QT Theme Package - `launcher` - - `enable`: Enable Application Launcher - `true / false` - `shadow`: Control Launcher Window Shadow - `true / false` diff --git a/modules/apps/firefox.nix b/modules/apps/firefox.nix @@ -26,6 +26,37 @@ in { # Profile programs.firefox = { enable = true; + policies = { + # Policies + DisableTelemetry = true; + DisableFirefoxStudies = true; + DisablePocket = true; + EnableTrackingProtection = { + Value = true; + Locked = true; + Cryptomining = true; + Fingerprinting = true; + }; + + # Extensions + ExtensionSettings = let + extension = shortId: uuid: { + name = uuid; + value = { + installation_mode = "normal_installed"; + install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/${shortId}/latest.xpi"; + }; + }; + in + builtins.listToAttrs [ + (extension "clearurls" "{74145f27-f039-47ce-a470-a662b129930a}") + (extension "setupvpn" "@setupvpncom") + (extension "tabliss" "extension@tabliss.io") + (extension "uaswitcher" "user-agent-switcher@ninetailed.ninja") + (extension "ublock-origin" "uBlock0@raymondhill.net") + ]; + }; + profiles.default.settings = { ## Flags # General @@ -86,35 +117,6 @@ in { "datareporting.healthreport.service.enabled" = false; "datareporting.healthreport.uploadEnabled" = false; "datareporting.policy.dataSubmissionEnabled" = false; - - # Telemetry - "app.normandy.api_url" = ""; - "app.normandy.enabled" = false; - "app.shield.optoutstudies.enable" = false; - "beacon.enabled" = false; - "browser.newtabpage.activity-stream.feeds.telemetry" = false; - "browser.newtabpage.activity-stream.telemetry" = false; - "browser.ping-centre.telemetry" = false; - "browser.send_pings" = false; - "browser.urlbar.suggest.quicksuggest.nonsponsored" = false; - "dom.battery.enabled" = false; - "dom.gamepad.enabled" = false; - "experiments.enabled" = false; - "experiments.manifest.uri" = ""; - "experiments.supported" = false; - "toolkit.coverage.endpoint.base" = ""; - "toolkit.coverage.opt-out" = true; - "toolkit.telemetry.archive.enabled" = false; - "toolkit.telemetry.bhrPing.enabled" = false; - "toolkit.telemetry.coverage.opt-out" = true; - "toolkit.telemetry.enabled" = false; - "toolkit.telemetry.firstShutdownPing.enabled" = false; - "toolkit.telemetry.newProfilePing.enabled" = false; - "toolkit.telemetry.reportingpolicy.firstRun" = false; - "toolkit.telemetry.server" = "data:,"; - "toolkit.telemetry.shutdownPingSender.enabled" = false; - "toolkit.telemetry.unified" = false; - "toolkit.telemetry.updatePing.enabled" = false; }; }; }; diff --git a/modules/gui/desktop/gnome.nix b/modules/gui/desktop/gnome.nix @@ -8,7 +8,7 @@ }: with files; let inherit (config.gui) desktop; - inherit (lib) gvariant mkAfter mkIf mkForce mkMerge; + inherit (lib) gvariant mkIf mkForce mkMerge; exists = app: builtins.elem app config.apps.list; in { ## GNOME Desktop Configuration ## @@ -55,17 +55,23 @@ in { # Desktop Integration gui = { fonts.enable = true; - gtk.enable = true; wayland.enable = true; - theme = { - name = "adw-gtk3-dark"; - package = pkgs.adw-gtk3; + + gtk = { + enable = true; + theme = { + name = "adw-gtk3-dark"; + package = pkgs.adw-gtk3; + }; }; - }; - programs = { - firefox.enable = true; - gnupg.agent.pinentryFlavor = mkForce "gnome3"; + qt = { + enable = true; + theme = { + name = "KvLibadwaitaDark"; + package = pkgs.custom.kvlibadwaita; + }; + }; }; services = { @@ -78,6 +84,20 @@ in { }; }; + programs = { + gnupg.agent.pinentryFlavor = mkForce "gnome3"; + firefox = { + enable = true; + policies.ExtensionSettings = { + name = "gnome-shell-integration"; + value = { + installation_mode = "normal_installed"; + install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/chrome-gnome-shell@gnome.org/latest.xpi"; + }; + }; + }; + }; + ## User Configuration user.homeConfig = { # Desktop Settings @@ -159,50 +179,44 @@ in { targets.gnome.enable = false; }; - environment = { - # QT Theme - etc."xdg/Kvantum/kvantum.kvconfig".text = mkAfter "theme=KvLibadwaitaDark"; + ## Package List + environment. systemPackages = with pkgs; (with gnome; + [ + # GNOME Apps + gnome-boxes + gnome-dictionary + gnome-sound-recorder + gnome-text-editor + gnome-tweaks - ## Package List - systemPackages = with pkgs; (with gnome; - [ - # GNOME Apps - gnome-boxes - gnome-dictionary - gnome-sound-recorder - gnome-text-editor - gnome-tweaks + # GNOME Games + gnome-chess + gnome-mines + quadrapassel + ] + ++ [ + # GNOME Circle + apostrophe + blackbox-terminal + curtail + deja-dup + dialect + drawing + fractal + fragments + gradience + gnome-podcasts + gnome-secrets + gthumb + lollypop + pitivi + video-trimmer + wike - # GNOME Games - gnome-chess - gnome-mines - quadrapassel - ] - ++ [ - # GNOME Circle - apostrophe - blackbox-terminal - curtail - deja-dup - dialect - drawing - fractal - fragments - gradience - gnome-podcasts - gnome-secrets - gthumb - lollypop - pitivi - video-trimmer - wike - - # Utilities - celluloid - gnuchess - custom.kvlibadwaita - ]); - }; + # Utilities + celluloid + gnuchess + ]); # Persisted Files user.persist.directories = [ diff --git a/modules/gui/desktop/hyprland/apps.nix b/modules/gui/desktop/hyprland/apps.nix @@ -16,18 +16,20 @@ in { # Apps geany gthumb + lollypop mate.atril mission-center playerctl + qalculate-gtk transmission-gtk xfce.thunar - lollypop # Utilities grim grimblast slurp wev + wl-clipboard wl-screenrec wlr-randr ]; @@ -56,6 +58,7 @@ in { # Theming stylix.targets = { hyprland.enable = true; + dunst.enable = true; swaylock = { enable = true; useImage = true; @@ -70,6 +73,13 @@ in { wallpaper = , ${wallpaper} ''; + # Text Editor + ".config/geany/geany.conf".text = geany.settings; + ".config/geany/colorschemes/theme.conf".text = geany.catppuccin; + + # Terminal + ".config/kitty/search".source = pkgs.custom.kitty-search; + # File Manager ".config/xfce4/xfconf/xfce-perchannel-xml/thunar.xml".text = xfce.settings.thunar; }; @@ -82,7 +92,13 @@ in { enable = true; font = fonts.monospace // {size = fonts.sizes.terminal;}; theme = with theme; "${name-alt}-${variant-alt}"; + keybindings = { + "ctrl+c" = "copy_or_interrupt"; + "kitty_mod+f" = "launch --allow-remote-control kitty +kitten search/search.py @active-kitty-window-id"; + }; + settings = { + kitty_mod = "ctrl+shift"; background_opacity = "0.9"; placement_strategy = "center"; @@ -94,14 +110,56 @@ in { }; }; + # Web Browser + programs.firefox = { + enable = true; + policies.ExtensionSettings = { + name = with theme; "${name}-${variant}-${accent}"; + value = { + installation_mode = "normal_installed"; + install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/{d49033ac-8969-488c-afb0-5cdb73957f41}/latest.xpi"; + }; + }; + }; + # Media - programs.firefox.enable = true; programs.mpv = { enable = true; defaultProfiles = ["gpu-hq"]; scripts = [pkgs.mpvScripts.mpris]; }; + # Notifications + services.dunst = { + enable = true; + iconTheme = theme.icons; + settings = { + fullscreen_delay_everything = {fullscreen = "delay";}; + global = { + alignment = "center"; + corner_radius = 10; + follow = "mouse"; + format = "<b>%s</b>\\n%b"; + frame_width = 1; + offset = "5x5"; + horizontal_padding = 8; + icon_position = "left"; + indicate_hidden = "yes"; + markup = "yes"; + max_icon_size = 64; + mouse_left_click = "do_action"; + mouse_middle_click = "close_all"; + mouse_right_click = "close_current"; + padding = 8; + plain_text = "no"; + separator_height = 1; + show_indicators = false; + shrink = "no"; + word_wrap = "yes"; + }; + }; + }; + # Locker programs.swaylock = { enable = true; @@ -189,6 +247,7 @@ in { userSettings = with theme; { "workbench.colorTheme" = "${name-alt} ${variant-alt}"; "workbench.iconTheme" = "${name}-${variant}"; + "catppuccin.accentColor" = "${accent}"; "terminal.external.linuxExec" = "kitty"; }; }; diff --git a/modules/gui/desktop/hyprland/binds.nix b/modules/gui/desktop/hyprland/binds.nix @@ -10,11 +10,12 @@ _: { "$mod, W, exec, firefox" "$mod, Return, exec, missioncenter" "$mod, slash, exec, ulauncher-toggle" + ", XF86Calculator, exec, qalculate-gtk" # Compositor Commands "$mod, Q, killactive," - "$mod, grave, fullscreen, 1" - "$mod SHIFT, grave, fullscreen," + "$mod, M, fullscreen, 1" + "$mod SHIFT, M, fullscreen," "$mod, O, togglefloating," "$mod, P, workspaceopt, allfloat" # Floating Mode @@ -34,6 +35,10 @@ _: { "$mod, period, workspace, m-1" "$mod, comma, workspace, m+1" + # Special Workspace + "$mod SHIFT, grave, movetoworkspace, special" + "$mod, grave, togglespecialworkspace, eDP-1" + # Move Window to Workspace "$mod SHIFT, period, movetoworkspace, m-1" "$mod SHIFT, comma, movetoworkspace, m+1" @@ -53,6 +58,10 @@ _: { ", Print, exec, grimblast --notify copysave area" "CTRL, Print, exec, grimblast --notify --cursor copysave output" "SHIFT, Print, exec, grimblast --notify --cursor copysave screen" + + # Magnifier + ''$mod, equal, exec, hyprctl keyword misc:cursor_zoom_factor "$(hyprctl getoption misc:cursor_zoom_factor | grep float | awk '{print $2 + 1}')"'' + ''$mod, minus, exec, hyprctl keyword misc:cursor_zoom_factor "$(hyprctl getoption misc:cursor_zoom_factor | grep float | awk '{print $2 - 1}')"'' ] ++ # Workspaces diff --git a/modules/gui/desktop/hyprland/default.nix b/modules/gui/desktop/hyprland/default.nix @@ -7,7 +7,7 @@ } @ args: let inherit (config.gui) desktop; inherit (config.stylix) cursor fonts; - inherit (lib) mkAfter mkIf mkMerge; + inherit (lib) mkIf mkMerge; theme = import ./theme.nix pkgs; in { #!# WIP #!# @@ -24,6 +24,7 @@ in { hyprland = { enable = true; xwayland.enable = true; + package = pkgs.unstable.hyprland; }; regreet = { @@ -49,11 +50,20 @@ in { }; # Desktop Integration - gui = { + gui = with theme; { fonts.enable = true; - gtk.enable = true; - theme = theme.gtk; inherit (theme) icons; + + gtk = { + enable = true; + theme = gtk; + }; + + qt = { + enable = true; + theme = qt; + }; + launcher = { enable = true; shadow = false; @@ -85,6 +95,7 @@ in { }; # Backlight + user.groups = ["video"]; hardware.brillo.enable = true; services.clight = { enable = true; @@ -102,25 +113,19 @@ in { location.provider = "geoclue2"; services.geoclue2.enable = true; - ## Theming # Color Scheme stylix.base16Scheme = files.colors.catppuccin; - # QT Theme - environment = with theme; { - systemPackages = [qt.package]; - etc."xdg/Kvantum/kvantum.kvconfig".text = mkAfter "theme=${qt.name}"; - }; - ## User Configuration user.homeConfig = { - imports = [./binds.nix]; + imports = [./binds.nix ./rules.nix]; ## Settings wayland.windowManager.hyprland = { enable = true; settings = { env = ["QT_WAYLAND_DISABLE_WINDOWDECORATION,1"]; + debug.disable_logs = false; exec-once = [ "hyprctl setcursor ${cursor.name} ${builtins.toString cursor.size}" "systemctl --user start clight" @@ -133,6 +138,7 @@ in { input = { # Keyboard kb_layout = "us"; + numlock_by_default = true; # Mouse follow_mouse = 1; # Focus on cursor move @@ -151,10 +157,20 @@ in { workspace_swipe_forever = true; }; + # Tiling Layout + dwindle = { + pseudotile = true; # Keep floating dimensions + preserve_split = true; + }; + misc = { - disable_autoreload = true; + enable_swallow = true; force_default_wallpaper = 0; + # Prevent checking for configuration changes + # Use 'hyprctl reload' if required + disable_autoreload = true; + # Graphics vrr = 1; no_direct_scanout = false; diff --git a/modules/gui/desktop/hyprland/rules.nix b/modules/gui/desktop/hyprland/rules.nix @@ -0,0 +1,24 @@ +_: { + wayland.windowManager.hyprland.settings = { + # Window Rules + windowrulev2 = [ + # PiP Window + "float, title:^(Picture-in-Picture)$" + "pin, title:^(Picture-in-Picture)$" + + # Throw away Sharing Window + "workspace special silent, title:^(Firefox — Sharing Indicator)$" + "workspace special silent, title:^(.*is sharing (your screen|a window)\.)$" + + # Idle Inhibit during media consumption + "idleinhibit focus, class:^(mpv|.+exe)$" + "idleinhibit focus, class:^(firefox|google-chrome)$, title:^(.*YouTube.*)$" + "idleinhibit fullscreen, class:^(firefox|google-chrome)$" + + # Prompt Windows + "dimaround, class:^(gcr-prompter)$" + "dimaround, class:^(xdg-desktop-portal-gtk)$" + "dimaround, class:^(polkit-gnome-authentication-agent-1)$" + ]; + }; +} diff --git a/modules/gui/desktop/pantheon.nix b/modules/gui/desktop/pantheon.nix @@ -9,7 +9,7 @@ with files; let inherit (config.gui) desktop; exists = app: builtins.elem app config.apps.list; - inherit (lib) mkForce mkIf mkMerge; + inherit (lib) mkIf mkMerge; in { ## Pantheon Desktop Configuration ## config = mkIf (desktop == "pantheon" || desktop == "pantheon-minimal") (mkMerge [ @@ -25,11 +25,14 @@ in { # Desktop Integration gui = { fonts.enable = true; - gtk.enable = true; icons.name = "ePapirus-Dark"; - theme = { - name = "io.elementary.stylesheet.blueberry"; - package = pkgs.pantheon.elementary-gtk-theme; + + gtk = { + enable = true; + theme = { + name = "io.elementary.stylesheet.blueberry"; + package = pkgs.pantheon.elementary-gtk-theme; + }; }; cursors = { @@ -59,10 +62,7 @@ in { environment = { # QT Theme - variables = { - "QT_QPA_PLATFORMTHEME" = "gtk3"; - "QT_STYLE_OVERRIDE" = mkForce ""; - }; + variables."QT_QPA_PLATFORMTHEME" = "gtk3"; # Panel Indicator Compatibility pathsToLink = ["/libexec"]; diff --git a/modules/gui/desktop/xfce/default.nix b/modules/gui/desktop/xfce/default.nix @@ -9,7 +9,7 @@ with files; let inherit (config.gui) desktop wallpaper; exists = app: builtins.elem app config.apps.list; - inherit (lib) mkAfter mkForce mkIf mkMerge; + inherit (lib) mkForce mkIf mkMerge; # GTK+ Theme theme = { @@ -56,8 +56,19 @@ in { # Desktop Components gui = { fonts.enable = true; - gtk.enable = true; - inherit theme; + gtk = { + enable = true; + inherit theme; + }; + + qt = { + enable = true; + theme = { + name = "KvArcDark"; + package = pkgs.arc-kde-theme; + }; + }; + launcher = { enable = true; theme = theme.name; @@ -85,47 +96,41 @@ in { }; }; - environment = { - # QT Theme - etc."xdg/Kvantum/kvantum.kvconfig".text = mkAfter "theme=KvArcDark"; - - # Utilities - systemPackages = with pkgs.xfce // pkgs; [ - arc-kde-theme - galculator - gnome.file-roller - mate.atril - orage - pavucontrol - system-config-printer - transmission-gtk - xorg.xkill - - xfce4-clipman-plugin - xfce4-docklike-plugin - xfce4-eyes-plugin - xfce4-notes-plugin - xfce4-panel-profiles - xfce4-pulseaudio-plugin - xfce4-sensors-plugin - xfce4-timer-plugin - xfce4-weather-plugin - xfce4-whiskermenu-plugin - xfce4-windowck-plugin - (writeShellApplication { - name = "xfce4-panel-toggle"; - runtimeInputs = [xfce.xfconf]; - text = '' - for num in {0,1} - do - current=$(xfconf-query -c xfce4-panel -p /panels/panel-"$num"/autohide-behavior) - if [[ current -eq 1 ]]; then next=0; else next=1; fi - xfconf-query -c xfce4-panel -p /panels/panel-"$num"/autohide-behavior -s $next - done - ''; - }) - ]; - }; + # Utilities + environment.systemPackages = with pkgs.xfce // pkgs; [ + galculator + gnome.file-roller + mate.atril + orage + pavucontrol + system-config-printer + transmission-gtk + xorg.xkill + + xfce4-clipman-plugin + xfce4-docklike-plugin + xfce4-eyes-plugin + xfce4-notes-plugin + xfce4-panel-profiles + xfce4-pulseaudio-plugin + xfce4-sensors-plugin + xfce4-timer-plugin + xfce4-weather-plugin + xfce4-whiskermenu-plugin + xfce4-windowck-plugin + (writeShellApplication { + name = "xfce4-panel-toggle"; + runtimeInputs = [xfce.xfconf]; + text = '' + for num in {0,1} + do + current=$(xfconf-query -c xfce4-panel -p /panels/panel-"$num"/autohide-behavior) + if [[ current -eq 1 ]]; then next=0; else next=1; fi + xfconf-query -c xfce4-panel -p /panels/panel-"$num"/autohide-behavior -s $next + done + ''; + }) + ]; # Persisted Files user.persist.directories = [ diff --git a/modules/gui/gtk.nix b/modules/gui/gtk.nix @@ -5,28 +5,37 @@ files, ... }: let - inherit (lib) mkDefault mkEnableOption mkIf; - cfg = config.gui; + inherit (lib) mkEnableOption mkIf mkOption types; + cfg = config.gui.gtk; in { - options.gui.gtk.enable = mkEnableOption "Enable GTK Configuration"; + options.gui.gtk = { + enable = mkEnableOption "Enable GTK Configuration"; + theme = { + name = mkOption { + description = "GTK+ Application Theme"; + type = types.str; + }; + + package = mkOption { + description = "GTK+ Theme Package"; + type = types.package; + }; + }; + }; ## GTK Configuration ## - config = mkIf cfg.gtk.enable { + config = mkIf cfg.enable { # Environment Setup programs.dconf.enable = true; services.dbus.packages = [pkgs.dconf]; - - # Platform Integration - programs.gnupg.agent.pinentryFlavor = "gtk2"; environment = { - systemPackages = [pkgs.libsForQt5.qtstyleplugin-kvantum]; - etc."xdg/Kvantum/kvantum.kvconfig".text = "[General]"; - variables = { - "GTK_THEME" = cfg.theme.name; - "QT_STYLE_OVERRIDE" = mkDefault "kvantum"; - }; + systemPackages = [cfg.theme.package]; + variables."GTK_THEME" = cfg.theme.name; }; + # Desktop Integration + programs.gnupg.agent.pinentryFlavor = "gtk2"; + user = { # Configuration persist.directories = [ @@ -43,8 +52,8 @@ in { gtk = { enable = true; inherit (cfg) theme; - iconTheme = cfg.icons; - cursorTheme = cfg.cursors; + iconTheme = config.gui.icons; + cursorTheme = config.gui.cursors; gtk3.extraConfig.gtk-application-prefer-dark-theme = 1; gtk4.extraConfig.gtk-application-prefer-dark-theme = 1; }; diff --git a/modules/gui/launcher.nix b/modules/gui/launcher.nix @@ -38,10 +38,13 @@ in { ## ULauncher Configuration ## config = mkIf cfg.enable { # Launcher Package - environment.systemPackages = [pkgs.ulauncher]; + environment.systemPackages = with pkgs; [ulauncher clipman]; user = { - persist.directories = [".config/ulauncher" ".local/share/ulauncher"]; + persist = { + files = [".local/share/clipman.json"]; + directories = [".config/ulauncher" ".local/share/ulauncher"]; + }; # Customisation homeConfig = { diff --git a/modules/gui/qt.nix b/modules/gui/qt.nix @@ -0,0 +1,36 @@ +{ + config, + lib, + pkgs, + ... +}: let + inherit (lib) mkEnableOption mkIf mkOption types; + cfg = config.gui.qt; +in { + options.gui.qt = { + enable = mkEnableOption "Enable QT Configuration"; + theme = { + name = mkOption { + description = "QT Application Theme"; + type = types.str; + }; + + package = mkOption { + description = "QT Theme Package"; + type = types.package; + }; + }; + }; + + ## QT Configuration ## + config = mkIf cfg.enable { + environment = { + systemPackages = [pkgs.libsForQt5.qtstyleplugin-kvantum cfg.theme.package]; + variables."QT_STYLE_OVERRIDE" = "kvantum"; + etc."xdg/Kvantum/kvantum.kvconfig".text = '' + [General] + Theme=${cfg.theme.name} + ''; + }; + }; +} diff --git a/modules/gui/theme.nix b/modules/gui/theme.nix @@ -14,18 +14,6 @@ in { imports = [inputs.stylix.nixosModules.stylix]; options.gui = { - theme = { - name = mkOption { - description = "GUI Application Theme"; - type = types.str; - }; - - package = mkOption { - description = "Theme Package"; - type = types.package; - }; - }; - icons = { name = mkOption { description = "Application Icons Theme"; @@ -66,7 +54,7 @@ in { config = rec { environment.systemPackages = [stylix.cursor.package] - ++ optionals enable [cfg.theme.package cfg.icons.package cfg.cursors.package]; + ++ optionals enable [cfg.icons.package cfg.cursors.package]; stylix = { autoEnable = false; @@ -80,6 +68,7 @@ in { } else { homeManagerIntegration.autoImport = true; + opacity.popups = 0.9; polarity = "dark"; targets = { console.enable = true; @@ -91,6 +80,7 @@ in { user.homeConfig.stylix.targets = { bat.enable = true; + firefox.enable = false; vscode.enable = mkIf (exists "vscode") false; }; }; diff --git a/packages/kitty-search/default.nix b/packages/kitty-search/default.nix @@ -0,0 +1,28 @@ +{ + lib, + pkgs, + ... +}: +with pkgs; let + metadata = import ./metadata.nix; +in + stdenv.mkDerivation rec { + pname = "kitty-kitten-search"; + version = metadata.rev; + + src = fetchFromGitHub { + owner = "trygveaa"; + repo = pname; + inherit (metadata) rev sha256; + }; + + dontBuild = true; + installPhase = "mkdir -p $out/ && cp -r . $out/"; + + meta = with lib; { + description = " Kitten for searching in Kitty Terminal"; + homepage = metadata.repo; + license = licenses.gpl3Only; + maintainers = ["maydayv7"]; + }; + } diff --git a/packages/kitty-search/metadata.nix b/packages/kitty-search/metadata.nix @@ -0,0 +1,6 @@ +{ + repo = "https://github.com/trygveaa/kitty-kitten-search"; + branch = "master"; + rev = "0760138fad617c5e4159403cbfce8421ccdfe571"; + sha256 = "sha256-egisza7V5dWplRYHIYt4bEQdqXa4E7UhibyWJAup8as="; +}