diff --git a/core/packages.nix b/core/packages.nix index bf146d8..f486c9c 100644 --- a/core/packages.nix +++ b/core/packages.nix @@ -67,8 +67,6 @@ config.nix.registry; programs = { - traceroute.enable = true; - fish.enable = true; git.enable = true; }; @@ -107,7 +105,6 @@ moreutils libsecret git-crypt - pkg-config ## nixos # nix-tree @@ -117,13 +114,7 @@ # nix-output-monitor ## languages and libraries - gcc - gtk3 - gtk4 - clang rustup - # rustc - # cargo python313 ]; diff --git a/home/home.nix b/home/home.nix index 3a2914a..dba9784 100644 --- a/home/home.nix +++ b/home/home.nix @@ -14,7 +14,7 @@ # ./starship.nix ./neofetch.nix ./scripts/anotherhadi - # ./qutebrowser + ./qutebrowser ]; home = { @@ -32,39 +32,30 @@ cmatrix kitty micro - glib - ## audiovisual + ## media & games + nicotine-plus + osu-lazer-bin easyeffects obs-studio inkscape + spotify helvum ardour + steam # (needs config via home.programs.steam) gimp ## diary & sync syncthing-tray gnome-secrets obsidian - vscode - ## chat & comms - # schildichat-web - fractal # fix gnome-keyring + ## chat & web + # schildichat-desktop + lagrange discord - - ## web browsers - lagrange - firefox - tor - - ## media consumption - nicotine-plus - spotify - - ## games - osu-lazer-bin - # steam (needs config) + fractal # fix gnome-keyring + tor ]; diff --git a/home/hyprland/theme/resources/wallpapers/menhera.jpg b/home/hyprland/theme/resources/wallpapers/menhera.jpg deleted file mode 100644 index 6987635..0000000 Binary files a/home/hyprland/theme/resources/wallpapers/menhera.jpg and /dev/null differ diff --git a/home/qutebrowser/default.nix b/home/qutebrowser/default.nix new file mode 100644 index 0000000..9336a91 --- /dev/null +++ b/home/qutebrowser/default.nix @@ -0,0 +1,242 @@ +{ config, ... }: { + + imports = [ ./duckduckgo-colorscheme.nix ./homepage/default.nix ]; + + programs.qutebrowser = { + enable = true; + + searchEngines = { + "DEFAULT" = "https://duckduckgo.com/?q={}&ia=web"; + "d" = "https://duckduckgo.com/?q={}&ia=web"; + "g" = "https://google.com/search?q={}"; + "y" = "https://youtube.com/results?search_query={}"; + "ya" = "https://yandex.com/search/?text={}"; + "n" = "https://mynixos.com/search?q={}"; + "nixo" = "https://search.nixos.org/options?channel=unstable&query={}"; + "nixp" = "https://search.nixos.org/packages?channel=unstable&query={}"; + }; + + quickmarks = { + home = "${config.home.homeDirectory}/.config/startpage/index.html"; + mynixos = "https://mynixos.com"; + github = "https://github.com"; + outlook = "https://outlook.office.com/mail/"; + office = "https://www.office.com/?auth=2"; + teams = "https://teams.microsoft.com/_"; + casa = "http://192.168.2.16:8081/#/"; + proton = "https://mail.proton.me/u/0/inbox"; + cloudflare-one = "https://one.dash.cloudflare.com/"; + chatgpt = "https://chat.openai.com/"; + nixvim = "https://nix-community.github.io/nixvim/"; + hyprland = "https://wiki.hyprland.org/"; + nerdfont = "https://www.nerdfonts.com/cheat-sheet"; + youtube = "https://youtube.com/"; + }; + + settings = { + url = { + default_page = + "${config.home.homeDirectory}/.config/startpage/index.html"; + start_pages = + [ "${config.home.homeDirectory}/.config/startpage/index.html" ]; + }; + + colors = { + tabs = { + odd.bg = "#${config.theme.colors.bg}"; + odd.fg = "#${config.theme.colors.fg}"; + even.bg = "#${config.theme.colors.bg}"; + even.fg = "#${config.theme.colors.fg}"; + selected.odd.bg = "#${config.theme.colors.primary-bg}"; + selected.odd.fg = "#${config.theme.colors.primary-fg}"; + selected.even.bg = "#${config.theme.colors.primary-bg}"; + selected.even.fg = "#${config.theme.colors.primary-fg}"; + indicator.error = "#${config.theme.colors.color1}"; + indicator.start = "#${config.theme.colors.alt-bg}"; + indicator.stop = "#${config.theme.colors.alt-bg}"; + }; + + hints = { + bg = "#${config.theme.colors.alt-bg}"; + fg = "#${config.theme.colors.alt-fg}"; + match.fg = "#${config.theme.colors.bg}"; + }; + + completion = { + category.bg = "#${config.theme.colors.bg}"; + category.fg = "#${config.theme.colors.fg}"; + category.border.top = "#${config.theme.colors.bg}"; + category.border.bottom = "#${config.theme.colors.bg}"; + + odd.bg = "#${config.theme.colors.bg}"; + even.bg = "#${config.theme.colors.bg}"; + + fg = [ "#FFFFFF" "#FFFFFF" "#FFFFFF" ]; + + match.fg = "#${config.theme.colors.primary-bg}"; + + item.selected.bg = "#${config.theme.colors.primary-bg}"; + item.selected.border.top = "#${config.theme.colors.primary-bg}"; + item.selected.border.bottom = "#${config.theme.colors.primary-bg}"; + item.selected.fg = "#${config.theme.colors.primary-fg}"; + item.selected.match.fg = "#${config.theme.colors.primary-fg}"; + }; + + statusbar = { + normal.bg = "#${config.theme.colors.bg}"; + normal.fg = "#${config.theme.colors.fg}"; + private.bg = "#${config.theme.colors.bg}"; + private.fg = "#${config.theme.colors.fg}"; + insert.bg = "#${config.theme.colors.primary-bg}"; + insert.fg = "#${config.theme.colors.primary-fg}"; + command = { + bg = "#${config.theme.colors.alt-bg}"; + fg = "#${config.theme.colors.alt-fg}"; + private.bg = "#${config.theme.colors.alt-bg}"; + private.fg = "#${config.theme.colors.alt-fg}"; + }; + }; + + messages = { + info = { + bg = "#${config.theme.colors.alt-bg}"; + fg = "#${config.theme.colors.alt-fg}"; + border = "#${config.theme.colors.alt-bg}"; + }; + + error = { + bg = "#${config.theme.colors.color1}"; + fg = "#${config.theme.colors.alt-fg}"; + border = "#${config.theme.colors.color1}"; + }; + }; + + #webpage.darkmode.enabled = true; # Enable dark mode for all websites (Weird on images) + webpage.preferred_color_scheme = + "dark"; # Enable dark mode for websites that support it + }; + + fonts = { default_family = "${config.theme.font}"; }; + + completion = { + height = "30%"; + open_categories = [ "history" ]; + scrollbar = { + padding = 0; + width = 0; + }; + show = "always"; + shrink = true; + timestamp_format = ""; + web_history.max_items = 7; + }; + + content = { + autoplay = false; + javascript.clipboard = "access"; + pdfjs = true; + }; + + downloads = { + position = "bottom"; + remove_finished = 0; + }; + + hints = { + border = "none"; + radius = 1; + }; + + scrolling = { + bar = "never"; + smooth = true; + }; + + tabs = { + show = "multiple"; + last_close = "close"; + mode_on_change = "restore"; + close_mouse_button = "right"; + }; + + zoom.default = "100%"; + }; + + keyBindings = { + normal = { + "gh" = "open ${config.home.homeDirectory}/.config/startpage/index.html"; + + " p" = "tab-move -"; + " n" = "tab-move +"; + " w" = "tab-close"; + + " 1" = "tab-focus 1"; + " 2" = "tab-focus 2"; + " 3" = "tab-focus 3"; + " 4" = "tab-focus 4"; + " 5" = "tab-focus 5"; + " 6" = "tab-focus 6"; + " 7" = "tab-focus 7"; + " 8" = "tab-focus 8"; + " 9" = "tab-focus 9"; + " 0" = "tab-focus 10"; + + "" = "tab-close"; + "" = "open -w"; + + "" = "tab-focus 1"; + "" = "tab-focus 2"; + "" = "tab-focus 3"; + "" = "tab-focus 4"; + "" = "tab-focus 5"; + "" = "tab-focus 6"; + "" = "tab-focus 7"; + "" = "tab-focus 8"; + "" = "tab-focus 9"; + "" = "tab-focus 10"; + }; + + command = { + "" = "tab-close"; + "" = "open -w"; + "" = "tab-focus 1"; + "" = "tab-focus 2"; + "" = "tab-focus 3"; + "" = "tab-focus 4"; + "" = "tab-focus 5"; + "" = "tab-focus 6"; + "" = "tab-focus 7"; + "" = "tab-focus 8"; + "" = "tab-focus 9"; + "" = "tab-focus 10"; + }; + + insert = { + "" = "tab-close"; + "" = "open -w"; + "" = "tab-focus 1"; + "" = "tab-focus 2"; + "" = "tab-focus 3"; + "" = "tab-focus 4"; + "" = "tab-focus 5"; + "" = "tab-focus 6"; + "" = "tab-focus 7"; + "" = "tab-focus 8"; + "" = "tab-focus 9"; + "" = "tab-focus 10"; + }; + }; + + extraConfig = '' + config.unbind("gm") + config.unbind("gd") + config.unbind("gb") + config.unbind("tl") + config.unbind("gt") + + c.tabs.padding = {"bottom": 6, "left": 7, "right": 7, "top": 6} + + config.load_autoconfig(True) + ''; + }; +} diff --git a/home/qutebrowser/duckduckgo-colorscheme.nix b/home/qutebrowser/duckduckgo-colorscheme.nix new file mode 100644 index 0000000..93ffd7f --- /dev/null +++ b/home/qutebrowser/duckduckgo-colorscheme.nix @@ -0,0 +1,37 @@ +{ config, ... }: { + + xdg.configFile."duckduckgo-colorscheme.js".text = '' + // Go to DuckDuckGo settings page, open the console, paste the code and hit enter. + // based on https://ddg.codingcodax.dev/ + // Cookies string for your theme + const cookie = '7=${config.theme.colors.bg}; j=${config.theme.colors.bg}; 9=${config.theme.colors.fg}; aa=${config.theme.colors.alt-fg}; 8=${config.theme.colors.color7}; x=${config.theme.colors.primary-bg}; 21=${config.theme.colors.alt-bg};'; + + // Converts cookie string into formatted JSON + const cookieToJSON = (cookieRaw) => { + const cookieJson = {}; + const items = cookieRaw.split(/[ ,]+/); + + items.forEach((item) => { + const parts = item.split('='); + cookieJson[parts[0]] = parts[1]; + }); + + return cookieJson; + }; + + // Iterates over JSON, and adds to browser cookie store + const setCookies = (cookieJson) => { + Object.keys(cookieJson).forEach((key) => { + document.cookie = `''${key}=''${cookieJson [ key ]}`; + }); + }; + + alert('The Nixy theme will be applied.'); + + // Call set cookies, passing in formated cookie data + setCookies(cookieToJSON(cookie)); + + // All done, reload page for changes to take effect :) + location.reload(); + ''; +} diff --git a/home/qutebrowser/homepage/default.nix b/home/qutebrowser/homepage/default.nix new file mode 100644 index 0000000..5cf4f59 --- /dev/null +++ b/home/qutebrowser/homepage/default.nix @@ -0,0 +1,296 @@ +{ config, ... }: +let + bookmarks = '' + Bookmarks: [ + {text: "MyNixOs", url: "https://mynixos.com", icon: "󱄅"}, + {text: "Github", url: "https://github.com", icon: ""}, + {text: "Proton", url: "https://mail.proton.me/u/0/inbox", icon: ""}, + {text: "Cloudflare One", url: "https://one.dash.cloudflare.com/", icon: ""}, + {text: "Chat GPT", url: "https://chat.openai.com/", icon: "󰭹"}, + {text: "Nixvim", url: "https://nix-community.github.io/nixvim/", icon: ""}, + {text: "Hyprland Wiki", url: "https://wiki.hyprland.org/", icon: "󰖬"}, + {text: "Nerdfont", url: "https://www.nerdfonts.com/cheat-sheet", icon: ""}, + {text: "Youtube", url: "https://youtube.com", icon: "󰗃"}, + ], + Home: [ + {text: "Casa", url: "http://192.168.2.16:8081/#/", icon: "󰋜"}, + {text: "Plex", url: "http://192.168.2.16:32400", icon: "󰚺"}, + {text: "Nextcloud", url: "http://192.168.2.16:10081", icon: ""}, + ], + Work: [ + {text: "Outlook", url: "https://outlook.office.com/mail/", icon: "󰴢"}, + {text: "Office", url: "https://www.office.com/?auth=2", icon: "󰏆"}, + {text: "Teams", url: "https://teams.microsoft.com/_", icon: "󰊻"}, + ], + ''; +in { + + xdg.configFile."startpage/index.html".text = '' + + + + + + + Homepage + + + + +
+
+

+

+
+
+

+
+ +
+ + + + + ''; +}