From 16b74bfaab48fa8e890881eead078b09dcefbcf8 Mon Sep 17 00:00:00 2001 From: ene Date: Sat, 11 Feb 2023 12:22:46 +0100 Subject: Fix: Remove typo from home-manager directory name --- home-manager/alacritty/default.nix | 583 +++++++++++++++++++++++++ home-manager/cups/default.nix | 3 + home-manager/default.nix | 29 ++ home-manager/firefox/chrome/userChrome.css | 41 ++ home-manager/firefox/default.nix | 220 ++++++++++ home-manager/firefox/extensions.json | 30 ++ home-manager/firefox/generate-extension.py | 41 ++ home-manager/firefox/settings.nix | 660 ++++++++++++++++++++++++++++ home-manager/firefox/settings/override.js | 137 ++++++ home-manager/firefox/unzip_mozlz4.py | 43 ++ home-manager/gammastep/default.nix | 20 + home-manager/git/default.nix | 141 ++++++ home-manager/grades/config.yaml | 59 +++ home-manager/grades/default.nix | 7 + home-manager/gtk/default.nix | 58 +++ home-manager/keepassxc/default.nix | 12 + home-manager/keepassxc/keepassxc.ini | 58 +++ home-manager/latexindent/default.nix | 16 + home-manager/latexindent/indentconfig.yaml | 2 + home-manager/latexindent/mysettings.yaml | 672 +++++++++++++++++++++++++++++ home-manager/less/default.nix | 17 + home-manager/lf/cmds/archive.sh | 40 ++ home-manager/lf/cmds/broot_jump.sh | 19 + home-manager/lf/cmds/chmod.sh | 17 + home-manager/lf/cmds/clear_trash.sh | 10 + home-manager/lf/cmds/dl_file.sh | 36 ++ home-manager/lf/cmds/dragon.sh | 11 + home-manager/lf/cmds/dragon_individual.sh | 10 + home-manager/lf/cmds/dragon_stay.sh | 11 + home-manager/lf/cmds/fzf_jump.sh | 17 + home-manager/lf/cmds/help.sh | 10 + home-manager/lf/cmds/mk_dir.sh | 12 + home-manager/lf/cmds/mk_file.sh | 11 + home-manager/lf/cmds/mk_ln.sh | 43 ++ home-manager/lf/cmds/mk_scr.sh | 29 ++ home-manager/lf/cmds/open.sh | 16 + home-manager/lf/cmds/open_config.sh | 10 + home-manager/lf/cmds/restore_trash.sh | 10 + home-manager/lf/cmds/set_wall_paper.sh | 15 + home-manager/lf/cmds/stripspace.sh | 10 + home-manager/lf/cmds/sudo_mk_file.sh | 13 + home-manager/lf/cmds/trash.sh | 27 ++ home-manager/lf/cmds/unarchive.sh | 22 + home-manager/lf/colors | 196 +++++++++ home-manager/lf/default.nix | 200 +++++++++ home-manager/lf/icons | 357 +++++++++++++++ home-manager/mako/default.nix | 46 ++ home-manager/mpd/default.nix | 30 ++ home-manager/mpd/mpdconf.example | 418 ++++++++++++++++++ home-manager/mpd/test.TODO | 1 + home-manger/alacritty/default.nix | 583 ------------------------- home-manger/cups/default.nix | 3 - home-manger/default.nix | 29 -- home-manger/firefox/chrome/userChrome.css | 41 -- home-manger/firefox/default.nix | 220 ---------- home-manger/firefox/extensions.json | 30 -- home-manger/firefox/generate-extension.py | 41 -- home-manger/firefox/settings.nix | 660 ---------------------------- home-manger/firefox/settings/override.js | 137 ------ home-manger/firefox/unzip_mozlz4.py | 43 -- home-manger/gammastep/default.nix | 20 - home-manger/git/default.nix | 141 ------ home-manger/grades/config.yaml | 59 --- home-manger/grades/default.nix | 7 - home-manger/gtk/default.nix | 58 --- home-manger/keepassxc/default.nix | 12 - home-manger/keepassxc/keepassxc.ini | 58 --- home-manger/latexindent/default.nix | 16 - home-manger/latexindent/indentconfig.yaml | 2 - home-manger/latexindent/mysettings.yaml | 672 ----------------------------- home-manger/less/default.nix | 17 - home-manger/lf/cmds/archive.sh | 40 -- home-manger/lf/cmds/broot_jump.sh | 19 - home-manger/lf/cmds/chmod.sh | 17 - home-manger/lf/cmds/clear_trash.sh | 10 - home-manger/lf/cmds/dl_file.sh | 36 -- home-manger/lf/cmds/dragon.sh | 11 - home-manger/lf/cmds/dragon_individual.sh | 10 - home-manger/lf/cmds/dragon_stay.sh | 11 - home-manger/lf/cmds/fzf_jump.sh | 17 - home-manger/lf/cmds/help.sh | 10 - home-manger/lf/cmds/mk_dir.sh | 12 - home-manger/lf/cmds/mk_file.sh | 11 - home-manger/lf/cmds/mk_ln.sh | 43 -- home-manger/lf/cmds/mk_scr.sh | 29 -- home-manger/lf/cmds/open.sh | 16 - home-manger/lf/cmds/open_config.sh | 10 - home-manger/lf/cmds/restore_trash.sh | 10 - home-manger/lf/cmds/set_wall_paper.sh | 15 - home-manger/lf/cmds/stripspace.sh | 10 - home-manger/lf/cmds/sudo_mk_file.sh | 13 - home-manger/lf/cmds/trash.sh | 27 -- home-manger/lf/cmds/unarchive.sh | 22 - home-manger/lf/colors | 196 --------- home-manger/lf/default.nix | 200 --------- home-manger/lf/icons | 357 --------------- home-manger/mako/default.nix | 46 -- home-manger/mpd/default.nix | 30 -- home-manger/mpd/mpdconf.example | 418 ------------------ home-manger/mpd/test.TODO | 1 - 100 files changed, 4496 insertions(+), 4496 deletions(-) create mode 100644 home-manager/alacritty/default.nix create mode 100644 home-manager/cups/default.nix create mode 100644 home-manager/default.nix create mode 100644 home-manager/firefox/chrome/userChrome.css create mode 100644 home-manager/firefox/default.nix create mode 100644 home-manager/firefox/extensions.json create mode 100755 home-manager/firefox/generate-extension.py create mode 100644 home-manager/firefox/settings.nix create mode 100644 home-manager/firefox/settings/override.js create mode 100755 home-manager/firefox/unzip_mozlz4.py create mode 100644 home-manager/gammastep/default.nix create mode 100644 home-manager/git/default.nix create mode 100644 home-manager/grades/config.yaml create mode 100644 home-manager/grades/default.nix create mode 100644 home-manager/gtk/default.nix create mode 100644 home-manager/keepassxc/default.nix create mode 100644 home-manager/keepassxc/keepassxc.ini create mode 100644 home-manager/latexindent/default.nix create mode 100644 home-manager/latexindent/indentconfig.yaml create mode 100644 home-manager/latexindent/mysettings.yaml create mode 100644 home-manager/less/default.nix create mode 100644 home-manager/lf/cmds/archive.sh create mode 100644 home-manager/lf/cmds/broot_jump.sh create mode 100644 home-manager/lf/cmds/chmod.sh create mode 100644 home-manager/lf/cmds/clear_trash.sh create mode 100644 home-manager/lf/cmds/dl_file.sh create mode 100644 home-manager/lf/cmds/dragon.sh create mode 100644 home-manager/lf/cmds/dragon_individual.sh create mode 100644 home-manager/lf/cmds/dragon_stay.sh create mode 100644 home-manager/lf/cmds/fzf_jump.sh create mode 100644 home-manager/lf/cmds/help.sh create mode 100644 home-manager/lf/cmds/mk_dir.sh create mode 100644 home-manager/lf/cmds/mk_file.sh create mode 100644 home-manager/lf/cmds/mk_ln.sh create mode 100644 home-manager/lf/cmds/mk_scr.sh create mode 100644 home-manager/lf/cmds/open.sh create mode 100644 home-manager/lf/cmds/open_config.sh create mode 100644 home-manager/lf/cmds/restore_trash.sh create mode 100644 home-manager/lf/cmds/set_wall_paper.sh create mode 100644 home-manager/lf/cmds/stripspace.sh create mode 100644 home-manager/lf/cmds/sudo_mk_file.sh create mode 100644 home-manager/lf/cmds/trash.sh create mode 100644 home-manager/lf/cmds/unarchive.sh create mode 100644 home-manager/lf/colors create mode 100644 home-manager/lf/default.nix create mode 100644 home-manager/lf/icons create mode 100644 home-manager/mako/default.nix create mode 100644 home-manager/mpd/default.nix create mode 100644 home-manager/mpd/mpdconf.example create mode 100644 home-manager/mpd/test.TODO delete mode 100644 home-manger/alacritty/default.nix delete mode 100644 home-manger/cups/default.nix delete mode 100644 home-manger/default.nix delete mode 100644 home-manger/firefox/chrome/userChrome.css delete mode 100644 home-manger/firefox/default.nix delete mode 100644 home-manger/firefox/extensions.json delete mode 100755 home-manger/firefox/generate-extension.py delete mode 100644 home-manger/firefox/settings.nix delete mode 100644 home-manger/firefox/settings/override.js delete mode 100755 home-manger/firefox/unzip_mozlz4.py delete mode 100644 home-manger/gammastep/default.nix delete mode 100644 home-manger/git/default.nix delete mode 100644 home-manger/grades/config.yaml delete mode 100644 home-manger/grades/default.nix delete mode 100644 home-manger/gtk/default.nix delete mode 100644 home-manger/keepassxc/default.nix delete mode 100644 home-manger/keepassxc/keepassxc.ini delete mode 100644 home-manger/latexindent/default.nix delete mode 100644 home-manger/latexindent/indentconfig.yaml delete mode 100644 home-manger/latexindent/mysettings.yaml delete mode 100644 home-manger/less/default.nix delete mode 100644 home-manger/lf/cmds/archive.sh delete mode 100644 home-manger/lf/cmds/broot_jump.sh delete mode 100644 home-manger/lf/cmds/chmod.sh delete mode 100644 home-manger/lf/cmds/clear_trash.sh delete mode 100644 home-manger/lf/cmds/dl_file.sh delete mode 100644 home-manger/lf/cmds/dragon.sh delete mode 100644 home-manger/lf/cmds/dragon_individual.sh delete mode 100644 home-manger/lf/cmds/dragon_stay.sh delete mode 100644 home-manger/lf/cmds/fzf_jump.sh delete mode 100644 home-manger/lf/cmds/help.sh delete mode 100644 home-manger/lf/cmds/mk_dir.sh delete mode 100644 home-manger/lf/cmds/mk_file.sh delete mode 100644 home-manger/lf/cmds/mk_ln.sh delete mode 100644 home-manger/lf/cmds/mk_scr.sh delete mode 100644 home-manger/lf/cmds/open.sh delete mode 100644 home-manger/lf/cmds/open_config.sh delete mode 100644 home-manger/lf/cmds/restore_trash.sh delete mode 100644 home-manger/lf/cmds/set_wall_paper.sh delete mode 100644 home-manger/lf/cmds/stripspace.sh delete mode 100644 home-manger/lf/cmds/sudo_mk_file.sh delete mode 100644 home-manger/lf/cmds/trash.sh delete mode 100644 home-manger/lf/cmds/unarchive.sh delete mode 100644 home-manger/lf/colors delete mode 100644 home-manger/lf/default.nix delete mode 100644 home-manger/lf/icons delete mode 100644 home-manger/mako/default.nix delete mode 100644 home-manger/mpd/default.nix delete mode 100644 home-manger/mpd/mpdconf.example delete mode 100644 home-manger/mpd/test.TODO diff --git a/home-manager/alacritty/default.nix b/home-manager/alacritty/default.nix new file mode 100644 index 00000000..1bb6afac --- /dev/null +++ b/home-manager/alacritty/default.nix @@ -0,0 +1,583 @@ +{config, ...}: { + home-manager.users.soispha.programs.alacritty = { + enable = true; + settings = { + env = { + TERM = "alacritty"; + }; + window = { + dimensionns = { + columns = 0; + lines = 0; + }; + + positinon = { + #x = 0; + #y = 0; + }; + + padding = { + x = 5; + y = 5; + }; + + dynamic_padding = false; + decorations = "None"; + opacity = 0.9; + startup_mode = "Windowed"; + title = "Alacritty"; + dynamic_title = true; + class = { + instance = "Alacritty"; + general = "Alacritty"; + }; + docorations_theme_variant = "None"; + }; + + scrolling = { + history = 10000; + multiplier = 3; + }; + + font = { + normal = { + family = "Source Code Pro"; + style = "Regular"; + }; + bold = { + family = "Source Code Pro"; + style = "Bold"; + }; + italic = { + family = "Source Code Pro"; + style = "Italic"; + }; + bold_italic = { + family = "Source Code Pro"; + style = "Bold Italic"; + }; + size = 12.0; + offset = { + x = -1; + y = -1; + }; + glyph_offset = { + x = -1; + y = -1; + }; + builtin_box_drawing = true; + }; + + draw_bold_text_with_bright_colors = false; + + colors = { + primary = { + background = "#191919"; + foreground = "#d8dee9"; + #dim_foreground= "#828482"; + #bright_foreground= "#eaeaea"; + + cursor = { + text = "#191919"; + cursor = "#d8dee9"; + }; + vi_mode_cursor = { + text = "CellBackground"; + cursor = "CellForeground"; + }; + search = { + matches = { + foreground = "#000000"; + background = "#ffffff"; + }; + focused_match = { + foreground = "#ffffff"; + background = "#000000"; + }; + }; + + hints = { + start = { + foreground = "#1d1f21"; + background = "#e9ff5e"; + }; + + end = { + foreground = "#e9ff5e"; + background = "#1d1f21"; + }; + line_indicator = { + #foreground= "None"; + #background= "None"; + }; + + footer_bar = { + background = "#c5c8c6"; + foreground = "#1d1f21"; + }; + + selection = { + text = "#191919"; + background = "#d8dee9"; + }; + + normal = { + black = "#191919"; + red = "#b02626"; + green = "#40a62f"; + yellow = "#f2e635"; + blue = "#314ad0"; + magenta = "#b30ad0"; + cyan = "#32d0fc"; + white = "#acadb1"; + }; + bright = { + black = "#36393d"; + red = "#ce2727"; + green = "#47c930"; + yellow = "#fff138"; + blue = "#2e4bea"; + magenta = "#cc15ed"; + cyan = "#54d9ff"; + white = "#dbdbdb"; + }; + + dim = { + black = "#676f78"; + red = "#b55454"; + green = "#78a670"; + yellow = "#faf380"; + blue = "#707fd0"; + magenta = "#c583d0"; + cyan = "#8adaf1"; + white = "#e0e3e7"; + }; + + #indexed_colors = [ + # {index = 16; color = "#ff00ff";} + # ]; + transparent_background_colors = false; # TODO + }; + }; + + bell = { + animation = "EaseOutExpo"; + duration = 0; + color = "#ffffff"; + command = "None"; + }; + + selection = { + semantic_escape_chars = ",│`|:\"' ()[]{}<>\t"; + save_to_clipboard = false; + }; + + cursor = { + style = { + shape = "Beam"; + blinking = "On"; + }; + vi_mode_style = "None"; + blink_interval = 750; + blink_timeout = 5; + unfocused_hollow = true; + thickness = 0.15; + }; + live_config_reload = true; + + #shell = { + # program = "/bin/sh"; + # args = ["--login"]; + #} + + working_directory = "None"; + + ipc_socket = true; # TODO + + mouse = { + hide_when_typing = false; + double_click.threshold = 300; + triple_click.threshold = 300; + }; + + hints = { + alphabet = "jfkdls;ahgurieowpq"; + enabled = [ + { + regex = "(ipfs:|ipns:|magnet:|mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)\ + [^\u0000-\u001F\u007F-\u009F<>\"\\s{-}\\^⟨⟩`]+"; + hyperlinks = true; + command = "xdg-open"; + post_processing = true; + mouse = { + enabled = true; + mods = "None"; + }; + binding = { + key = "U"; + mods = "Control|Shift"; + }; + } + + { + # multi regex for different purposes: + # 2. UUIDs + # 3. hex (for example signatures) + # 4. IP addresses + regex = "([[:alnum:]_$%&+=/@-]+)|([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})|([0-9a-f]{12,128})|([[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3})"; + action = "Copy"; + post_processing = false; + binding = { + key = "U"; + mods = "Control|Shift"; + }; + } + ]; + + mouse_bindings = [ + # { mouse = "Right"; action = "ExpandSelection" ;} + # { mouse = "Right"; mods = "Control"; action = "ExpandSelection" ;} + # { mouse = "Middle"; mode = "~Vi"; action = "PasteSelection" ;} + { + mouse = "Middle"; + action = "Copy"; + } + ]; + + key_bindings = [ + # (Windows, Linux, and BSD only) + { + key = "P"; + mods = "Control"; + action = "Paste"; + } + { + key = "Insert"; + mods = "Shift"; + action = "Paste"; + } + { + key = "Slash"; + mods = "Control"; + chars = "gc"; + } + { + key = "Y"; + mods = "Control"; + action = "Copy"; + } + { + key = "Key0"; + mods = "Control"; + action = "ResetFontSize"; + } + { + key = "Equals"; + mods = "Control"; + action = "IncreaseFontSize"; + } + { + key = "Plus"; + mods = "Control"; + action = "IncreaseFontSize"; + } + { + key = "Minus"; + mods = "Control"; + action = "DecreaseFontSize"; + } + # Vi Mode + { + key = "Space"; + mods = "Control"; + action = "ToggleViMode"; + } + { + key = "Space"; + mods = "Control"; + mode = "Vi"; + action = "ScrollToBottom"; + } + { + key = "I"; + mode = "Vi"; + action = "ScrollToBottom"; + } + { + key = "I"; + mode = "Vi"; + action = "ToggleViMode"; + } + { + key = "C"; + mods = "Control"; + mode = "Vi"; + action = "ScrollToBottom"; + } + { + key = "C"; + mods = "Control"; + mode = "Vi"; + action = "ToggleViMode"; + } + { + key = "Escape"; + mode = "Vi"; + action = "ClearSelection"; + } + { + key = "Y"; + mods = "Control"; + mode = "Vi"; + action = "ScrollLineUp"; + } + { + key = "E"; + mods = "Control"; + mode = "Vi"; + action = "ScrollLineDown"; + } + { + key = "G"; + mode = "Vi"; + action = "ScrollToTop"; + } + { + key = "G"; + mods = "Shift"; + mode = "Vi"; + action = "ScrollToBottom"; + } + { + key = "B"; + mods = "Control"; + mode = "Vi"; + action = "ScrollPageUp"; + } + { + key = "F"; + mods = "Control"; + mode = "Vi"; + action = "ScrollPageDown"; + } + { + key = "U"; + mods = "Control"; + mode = "Vi"; + action = "ScrollHalfPageUp"; + } + { + key = "D"; + mods = "Control"; + mode = "Vi"; + action = "ScrollHalfPageDown"; + } + { + key = "Y"; + mode = "Vi"; + action = "Copy"; + } + { + key = "Y"; + mode = "Vi"; + action = "ClearSelection"; + } + { + key = "V"; + mode = "Vi"; + action = "ToggleNormalSelection"; + } + { + key = "V"; + mods = "Shift"; + mode = "Vi"; + action = "ToggleLineSelection"; + } + { + key = "V"; + mods = "Control"; + mode = "Vi"; + action = "ToggleBlockSelection"; + } + { + key = "V"; + mods = "Alt"; + mode = "Vi"; + action = "ToggleSemanticSelection"; + } + { + key = "Return"; + mode = "Vi"; + action = "Open"; + } + { + key = "K"; + mode = "Vi"; + action = "Up"; + } + { + key = "J"; + mode = "Vi"; + action = "Down"; + } + { + key = "H"; + mode = "Vi"; + action = "Left"; + } + { + key = "L"; + mode = "Vi"; + action = "Right"; + } + { + key = "Up"; + mode = "Vi"; + action = "Up"; + } + { + key = "Down"; + mode = "Vi"; + action = "Down"; + } + { + key = "Left"; + mode = "Vi"; + action = "Left"; + } + { + key = "Right"; + mode = "Vi"; + action = "Right"; + } + { + key = "Key0"; + mode = "Vi"; + action = "First"; + } + { + key = "Key4"; + mode = "Vi"; + action = "Last"; + } + { + key = "Key6"; + mods = "Shift"; + mode = "Vi"; + action = "FirstOccupied"; + } + { + key = "H"; + mods = "Shift"; + mode = "Vi"; + action = "High"; + } + { + key = "M"; + mods = "Shift"; + mode = "Vi"; + action = "Middle"; + } + { + key = "L"; + mods = "Shift"; + mode = "Vi"; + action = "Low"; + } + { + key = "B"; + mode = "Vi"; + action = "SemanticLeft"; + } + { + key = "W"; + mode = "Vi"; + action = "SemanticRight"; + } + { + key = "E"; + mode = "Vi"; + action = "SemanticRightEnd"; + } + { + key = "B"; + mods = "Shift"; + mode = "Vi"; + action = "WordLeft"; + } + { + key = "W"; + mods = "Shift"; + mode = "Vi"; + action = "WordRight"; + } + { + key = "E"; + mods = "Shift"; + mode = "Vi"; + action = "WordRightEnd"; + } + { + key = "Key5"; + mods = "Shift"; + mode = "Vi"; + action = "Bracket"; + } + { + key = "Slash"; + mode = "Vi"; + action = "SearchForward"; + } + { + key = "Slash"; + mods = "Shift"; + mode = "Vi"; + action = "SearchBackward"; + } + { + key = "N"; + mode = "Vi"; + action = "SearchNext"; + } + { + key = "N"; + mods = "Shift"; + mode = "Vi"; + action = "SearchPrevious"; + } + ]; + }; + }; + + #debug: + # Display the time it takes to redraw each frame. + #render_timer: false + + # Keep the log file after quitting Alacritty. + #persistent_logging: false + + # Log level + # + # Values for `log_level`: + # - Off + # - Error + # - Warn + # - Info + # - Debug + # - Trace + #log_level: Warn + + # Renderer override. + # - glsl3 + # - gles2 + # - gles2_pure + #renderer: None + + # Print all received window events. + #print_events: false + + # Highlight window damage information. + #highlight_damage: false + }; + }; +} diff --git a/home-manager/cups/default.nix b/home-manager/cups/default.nix new file mode 100644 index 00000000..f86fa806 --- /dev/null +++ b/home-manager/cups/default.nix @@ -0,0 +1,3 @@ +{config, ...}: { + home-manager.xdg.configFile."cups/lpoptions".text = "Default Brother\n"; +} diff --git a/home-manager/default.nix b/home-manager/default.nix new file mode 100644 index 00000000..ffec4ccc --- /dev/null +++ b/home-manager/default.nix @@ -0,0 +1,29 @@ +# vim: ts=2 +{ + config, + pkgs, + home-manager, + ... +}: { + imports = [ + home-manager.nixosModules.home-manger + + ./alacritty + ./cups + ./firefox + ./gammastep + ./git + ./grades + ./gtk + ./keepassxc + ./latexindent + ./less + ./lf + ./mako + ./mpd + ]; + + home-manager.users.soispha = { + home.packages = []; + }; +} diff --git a/home-manager/firefox/chrome/userChrome.css b/home-manager/firefox/chrome/userChrome.css new file mode 100644 index 00000000..0b3aff77 --- /dev/null +++ b/home-manager/firefox/chrome/userChrome.css @@ -0,0 +1,41 @@ +/* thickness of tab when you have too many open tabs */ +.tabbrowser-tab:not([pinned="true"]) { + min-width: 10px !important; + min-height: 10px !important; +} + +/* tab height +#TabsToolbar .tabbrowser-tabs { +min-height: 10px !important; +} +*/ + +/* +.tabbrowser-tab {min-width: 016px !important;} +.tabbrowser-tab {clip-width: 016px !important;} +*/ + +/* the + button that opens new tabs */ +#TabsToolbar .tabs-newtab-button { + margin-left: 10px !important; + height: Auto !important; +} + +#main-window[privatebrowsingmode="temporary"] #navigator-toolbox { + background-color: #c40944 !important; +} + +/* close button inside a tab */ +.tab-close-button * { + width: 10px !important; + height: 10px !important; +} + +/* bookmark toolbar */ +#personal-bookmarks .bookmark-item > .toolbarbutton-text { + font-size: 10pt !important; +} +#personal-bookmarks .bookmark-item > .toolbarbutton-icon { + height: 12px !important; + width: 12px !important; +} diff --git a/home-manager/firefox/default.nix b/home-manager/firefox/default.nix new file mode 100644 index 00000000..5e9b9632 --- /dev/null +++ b/home-manager/firefox/default.nix @@ -0,0 +1,220 @@ +# vim: ts=2 +{ + config, + pkgs, + lib, + stdenv, + ... +}: let + user_js_override = "./settings/override.js"; + user_js = lib.runCommand "user.js" {} '' + mkdir $out; + ${config.inputs.strip_js_comments}/bin ${config.inputs.user_js} > $out/user.js; + cat ${user_js_override} >> $out/user.js; + sed 's/user_pref(\(.*\)",\(.*\));/\1" = \2;/' $out/user.js > $out/user.nix; + ''; + + # source: https://gitlab.com/rycee/nur-expressions/-/blob/master/pkgs/firefox-addons/default.nix + buildFirefoxXpiAddon = { + pname, + version, + addonId, + url, + sha256, + meta, + ... + }: + builtins.stdenv.mkDerivation { + name = "${pname}-${version}"; + + inherit meta; + + src = builtins.fetchurl {inherit url sha256;}; + + preferLocalBuild = true; + allowSubstitutes = true; + + buildCommand = '' + dst="$out/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}" + mkdir -p "$dst" + install -v -m644 "$src" "$dst/${addonId}.xpi" + ''; + }; + + settings = + pkgs.lib.recursiveUpdate + { + # Allow my custom css + "toolkit.legacyUserProfileCustomizations.stylesheets" = true; + + # might improve performance TODO + "gfx.webrender.all" = true; + + # disable updates (pretty pointless with nix) + "extensions.update.autoUpdateDefault" = false; + "extensions.update.enabled" = false; + "app.update.channel" = "default"; + + "browser.ctrlTab.recentlyUsedOrder" = false; + + "browser.download.useDownloadDir" = true; + "browser.download.dir" = "${config.user.soisha.home}/media/downloads"; + "browser.download.folderList" = 2; # TODO + "browser.download.viewableInternally.typeWasRegistered.svg" = true; + "browser.download.viewableInternally.typeWasRegistered.webp" = true; + "browser.download.viewableInternally.typeWasRegistered.xml" = true; + + # TODO what does this do? + "browser.search.widget.inNavBar" = true; + + "browser.shell.checkDefaultBrowser" = false; + "browser.tabs.loadInBackground" = true; + "browser.urlbar.placeholderName" = "Brave"; + + "general.autoScroll" = true; + + # Set the tabs and bookmarks + "browser.tabs.inTitlebar" = 1; + "browser.toolbars.bookmarks.visibility" = "always"; + + # Theme + "extensions.activeThemeID" = "firefox-alpenglow@mozilla.org"; + "extensions.extensions.activeThemeID" = "firefox-alpenglow@mozilla.org"; + + # highlight all entries when searching + "findbar.highlightAll" = true; + + # TODO + #"extensions.webcompat.enable_picture_in_picture_overrides" = true; + #"extensions.webcompat.enable_shims" = true; + #"extensions.webcompat.perform_injections" = true; + #"extensions.webcompat.perform_ua_overrides" = true; + + # onlykey / copied from a yubikey config + #"security.webauth.u2f" = true; + #"security.webauth.webauthn" = true; + #"security.webauth.webauthn_enable_softtoken" = true; + #"security.webauth.webauthn_enable_usbtoken" = true; + } + builtins.readFile + "${user_js}/user.nix"; +in { + home-manager.users.${config.soisha.user.username} = { + packages = [ + pkgs.firefox-wayland + ]; + sessionVariables = { + # improve touch input & make scrolling smother + MOZ_USE_XINPUT2 = "1"; + # improve wayland support + MOZ_ENABLE_WAYLAND = 1; + XDG_CURRENT_DESKTOP = "river"; + }; + xdg.mimeApps = { + enable = true; + defaultApplications = { + "text/html" = ["firefox.desktop"]; + "x-scheme-handler/http" = ["firefox.desktop"]; + "x-scheme-handler/https" = ["firefox.desktop"]; + "x-scheme-handler/about" = ["firefox.desktop"]; + "x-scheme-handler/unknown" = ["firefox.desktop"]; + }; + }; + programs.firefox = { + enable = true; + package = pkgs.firefox; + extensions = builtins.map buildFirefoxXpiAddon (lib.attrValues (lib.importJSON ./extensions.json)); + profile."default" = { + isDefault = true; + id = 0; + name = "default"; + + userChrome = builtins.readFile "./chrome/userChrome.css"; + + search = { + default = "Brave Search"; + force = true; + + engines = { + "Brave Search" = { + urls = [{template = "https://search.brave.com/search?q={searchTerms}";}]; + iconUpdateURL = "https://cdn.search.brave.com/serp/v1/static/brand/8eabe183f0d1f2cb3e2916b7b20c310efd196d740c8cecd341732fcd396fb665-apple-touch-icon.png"; + updateInterval = 24 * 60 * 60 * 1000; # every day + definedAliases = ["@bs"]; + }; + + "Nix Packages" = { + urls = [ + { + template = "https://search.nixos.org/packages"; + params = [ + { + name = "type"; + value = "packages"; + } + { + name = "query"; + value = "{searchTerms}"; + } + ]; + } + ]; + + icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; + definedAliases = ["@np"]; + }; + + "NixOS Wiki" = { + urls = [{template = "https://nixos.wiki/index.php?search={searchTerms}";}]; + iconUpdateURL = "https://nixos.wiki/favicon.png"; + updateInterval = 24 * 60 * 60 * 1000; # every day + definedAliases = ["@nw"]; + }; + "Bing".metaData.hidden = true; + "Google".metaData.hidden = true; + "Amazon.de".metaData.hidden = true; + }; + }; + + bookmarks = [ + { + name = "Rust::std"; + # TODO + url = "file:///home/dt/.local/share/rustup/toolchains/stable-x86_64-unknown-linux-gnu/share/doc/rust/html/std/all.html"; + } + + { + name = "Feed - Piped"; + url = "https://piped.kavin.rocks/feed"; + } + + { + name = "DeepL Translate"; + url = "https://www.deepl.com/translator#en/de/test"; + } + + { + name = "Google Scholar"; + url = "https://scholar.google.com/"; + } + + { + name = "ArchWiki"; + url = "https://wiki.archlinux.org/"; + } + + { + name = "Arch Package "; + url = "https://archlinux.org/packages/"; + } + + { + name = "layout.css.devPixelsPerPx"; + url = "about:config"; + } + ]; + inherit settings; + }; + }; + }; +} diff --git a/home-manager/firefox/extensions.json b/home-manager/firefox/extensions.json new file mode 100644 index 00000000..a7673612 --- /dev/null +++ b/home-manager/firefox/extensions.json @@ -0,0 +1,30 @@ +{ + "darkreader": { + "pname": "darkreader", + "version": "4.9.62", + "addonId": "addon@darkreader.org", + "url": "https://addons.mozilla.org/firefox/downloads/file/4053589/darkreader-4.9.62.xpi", + "sha256": "sha256:e537a2cee45ed7c26f79ecd3ed362620e3f00d24c158532a58e163a63a3d60cc" + }, + "firenvim": { + "pname": "firenvim", + "version": "0.2.14", + "addonId": "firenvim@lacamb.re", + "url": "https://addons.mozilla.org/firefox/downloads/file/4026386/firenvim-0.2.14.xpi", + "sha256": "sha256:a8c495a59e30eaabbb3fcd188db9b5e28b40bffefe41a3f0fa22ecc58c80c2b6" + }, + "keepassxc-browser": { + "pname": "keepassxc-browser", + "version": "1.8.4", + "addonId": "keepassxc-browser@keepassxc.org", + "url": "https://addons.mozilla.org/firefox/downloads/file/4045866/keepassxc_browser-1.8.4.xpi", + "sha256": "sha256:cc39aa058cb8915cfc88424e2e1cebe3ccfc3f95d7bddb2abd0c4905d2b17719" + }, + "simple-tab-groups": { + "pname": "simple-tab-groups", + "version": "4.7.2.1", + "addonId": "simple-tab-groups@drive4ik", + "url": "https://addons.mozilla.org/firefox/downloads/file/3873608/simple_tab_groups-4.7.2.1.xpi", + "sha256": "sha256:75077589098ca62c00b86cf9554c6120bf8dc04c5f916fe26f84915f5147b2a4" + } +} \ No newline at end of file diff --git a/home-manager/firefox/generate-extension.py b/home-manager/firefox/generate-extension.py new file mode 100755 index 00000000..cfb73542 --- /dev/null +++ b/home-manager/firefox/generate-extension.py @@ -0,0 +1,41 @@ +#!/usr/bin/env python +# source: https://github.com/etu/nixconfig/blob/ba47d577c8bfb4a1c06927c34ece34118f4a0460/modules/graphical/firefox/generate.py + +from concurrent.futures import ThreadPoolExecutor +import json +import os +import requests + +EXTENSIONS = sorted([ + "darkreader", + "firenvim", + "keepassxc-browser", + "simple-tab-groups", +]) + +def index_ext(ext: str): + print(f"Indexing {ext}...") + + resp = requests.get(f"https://addons.mozilla.org/api/v5/addons/addon/{ext}/").json() + rel = resp["current_version"] + + if not rel["file"]["hash"].startswith("sha256:"): + raise ValueError("Unhandled hash type") + + return { + "pname": ext, + "version": rel["version"], + "addonId": resp["guid"], + "url": rel["file"]["url"], + "sha256": rel["file"]["hash"], + } + +if __name__ == "__main__": + outfile = os.path.dirname(os.path.realpath(__file__)) + "/extensions.json" + + with ThreadPoolExecutor() as e: + extensions = {ext: e.submit(index_ext, ext) for ext in EXTENSIONS} + extensions = {k: v.result() for k, v in extensions.items()} + + with open(outfile, "w") as f: + json.dump(extensions, f, indent=2) diff --git a/home-manager/firefox/settings.nix b/home-manager/firefox/settings.nix new file mode 100644 index 00000000..f38e23b3 --- /dev/null +++ b/home-manager/firefox/settings.nix @@ -0,0 +1,660 @@ +{config, ...}: { + settings = { + accessibility.typeaheadfind.flashBar = 0; + + app = { + normandy = { + first_run = false; + migrationsApplied = 12; + startupRolloutPrefs.extensions.webcompat.disabled_shims.AdvertisingDotCom = true; + user_id = "9b445ee0-1055-4b05-ad18-cdcfd8d15cdb"; + }; + + update.lastUpdateTime = { + addon-background-update-timer = 1675712908; + browser-cleanup-thumbnails = 1675795148; + recipe-client-addon-run = 1675774559; + region-update-timer = 1675779021; + rs-experiment-loader-timer = 1675777057; + search-engine-update-timer = 1675777177; + services-settings-poll-changes = 1675710065; + telemetry_modules_ping = 1675779141; + xpi-signature-verification = 1675706945; + }; + }; + + browser = { + anchor_color = "#57e389"; + + bookmarks = { + editDialog.confirmationHintShowCount = 3; + restore_default_bookmarks = false; + }; + + contentblocking = { + category = "custom"; + cfr-milestone.milestone-achieved = 10000; + report.hide_vpn_banner = true; + }; + + contextual-services.contextId = "{c840a4ea-6278-46b7-bb56-21d7faab57dd}"; + + discovery.enabled = false; + + display = { + background_color = "#551a8b"; + foreground_color = "#ffbe6f"; + use_system_colors = true; + }; + + download = { + dir = "/home/dt/media/downloads"; + folderList = 2; + lastDir = "/home/dt/media/downloads"; + panel.shown = true; + viewableInternally.typeWasRegistered.avif = true; + viewableInternally.typeWasRegistered.webp = true; + }; + + eme.ui.firstContentShown = true; + + engagement = { + ctrlTab.has-used = true; + downloads-button.has-used = true; + }; + + firefox-view.feature-tour = { + message = "FIREFOX_VIEW_FEATURE_TOUR"; + screen = ""; + complete = true; + }; + + firefox-view.view-count = 1; + + laterrun.bookkeeping = { + profileCreationTime = 1654872928; + sessionCount = 39; + }; + + migration.version = 133; + + newtabpage = { + activity-stream = { + impressionId = "{ade7a2f2-7d8f-49b0-a684-d2bb3bda1e09}"; + improvesearch.topSiteSearchShortcuts.havePinned = "google"; + }; + pinned = "[]"; + storageVersion = 1; + }; + + pageActions.persistedActions = { + ids = ["bookmark"]; + idsInUrlbar = ["bookmark"]; + idsInUrlbarPreProton = []; + version = 1; + }; + + pagethumbnails.storage_version = 3; + + protections_panel.infoMessage.seen = true; + + proton.toolbar.version = 3; + + region.update.updated = 1675779022; + + "rights.3.shown" = true; + + safebrowsing.provider = { + google4.lastupdatetime = "1675794837495"; + google4.nextupdatetime = "1675796650495"; + mozilla.lastupdatetime = "1675795004767"; + mozilla.nextupdatetime = "1675816604767"; + }; + + search = { + region = "DE"; + separatePrivateDefault.urlbarResult.enabled = false; + }; + + sessionstore.upgradeBackup.latestBuildID = "20230130183437"; + + shell.mostRecentDateSetAsDefault = "1675756595"; + + startup = { + couldRestoreSession.count = 1; + homepage_override.buildID = "20230130183437"; + homepage_override.mstone = "109.0.1"; + lastColdStartupCheck = 1675756594; + page = 3; + upgradeDialog.version = 106; + }; + + tabs.inTitlebar = 1; + + toolbars.bookmarks.visibility = "always"; + + uiCustomization.state = { + placements = { + widget-overflow-fixed-list = []; + unified-extensions-area = ["yt_pause_example_com-browser-action" "_762f9885-5a13-4abd-9c77-433dcd38b8fd_-browser-action"]; + + nav-bar = [ + "back-button" + "forward-button" + "stop-reload-button" + "urlbar-container" + "save-to-pocket-button" + "downloads-button" + "fxa-toolbar-menu-button" + "enhancerforyoutube_maximerf_addons_mozilla_org-browser-action" + "plasma-browser-integration_kde_org-browser-action" + "tab-stash_condordes_net-browser-action" + "addon_darkreader_org-browser-action" + "vim-vixen_i-beam_org-browser-action" + "simple-tab-groups_drive4ik-browser-action" + "e2933bff1d77b6ea81b2df1dda992244e7892b6c_temporary-addon-browser-action" + "74a30c85e187d69156225de1c415366fafa84866_temporary-addon-browser-action" + "e6fd60f4f456c06312d75c0eceabef8ee0c28bbb_temporary-addon-browser-action" + "addon_example_com-browser-action" + "pause_example_com-browser-action" + "stackoverflowtweakstools_richard_com-browser-action" + "keepassxc-browser_keepassxc_org-browser-action" + "firenvim_lacamb_re-browser-action" + ]; + + toolbar-menubar = ["menubar-items"]; + + TabsToolbar = ["tabbrowser-tabs" "new-tab-button" "alltabs-button"]; + PersonalToolbar = ["personal-bookmarks"]; + + seen = [ + "save-to-pocket-button" + "enhancerforyoutube_maximerf_addons_mozilla_org-browser-action" + "plasma-browser-integration_kde_org-browser-action" + "developer-button" + "tab-stash_condordes_net-browser-action" + "addon_darkreader_org-browser-action" + "vim-vixen_i-beam_org-browser-action" + "simple-tab-groups_drive4ik-browser-action" + "_762f9885-5a13-4abd-9c77-433dcd38b8fd_-browser-action" + "e2933bff1d77b6ea81b2df1dda992244e7892b6c_temporary-addon-browser-action" + "74a30c85e187d69156225de1c415366fafa84866_temporary-addon-browser-action" + "e6fd60f4f456c06312d75c0eceabef8ee0c28bbb_temporary-addon-browser-action" + "addon_example_com-browser-action" + "pause_example_com-browser-action" + "yt_pause_example_com-browser-action" + "stackoverflowtweakstools_richard_com-browser-action" + "keepassxc-browser_keepassxc_org-browser-action" + "firenvim_lacamb_re-browser-action" + ]; + dirtyAreaCache = ["nav-bar" "toolbar-menubar" "PersonalToolbar" "unified-extensions-area"]; + currentVersion = 18; + newElementCount = 6; + browser = { + urlbar = { + quicksuggest = { + migrationVersion = 2; + scenario = "history"; + }; + tabToSearch.onboard.interactionsLeft = 0; + tipShownCount.searchTip_onboard = 4; + }; + visited_color = "#cdab8f"; + }; + + datareporting.policy = { + dataSubmissionPolicyAcceptedVersion = 2; + dataSubmissionPolicyNotifiedTime = "1655649367480"; + }; + + devtools = { + aboutdebugging = { + collapsibilities.processes = false; + tmpExtDirPath = "/home/dt/repos/javascript/firefox-extension/YouTube-Extension"; + }; + + debugger = { + pending-selected-location = { + sourceId = "source-file=///home/dt/repos/web/i5/test/silas.html"; + line = 0; + column = 0; + sourceActorId = "server0.conn0.windowGlobal423054278666/source25"; + url = "file=///home/dt/repos/web/i5/test/silas.html"; + }; + prefs-schema-version = 11; + }; + everOpened = true; + netmonitor = { + columnsData = [ + { + name = "status"; + minWidth = 30; + width = 6.67; + } + { + name = "method"; + minWidth = 30; + width = 6.67; + } + { + name = "domain"; + minWidth = 30; + width = 13.33; + } + { + name = "file"; + minWidth = 30; + width = 33.32; + } + { + name = "url"; + minWidth = 30; + width = 25; + } + { + name = "initiator"; + minWidth = 30; + width = 13.33; + } + { + name = "type"; + minWidth = 30; + width = 6.67; + } + { + name = "transferred"; + minWidth = 30; + width = 13.33; + } + { + name = "contentSize"; + minWidth = 30; + width = 6.67; + } + { + name = "waterfall"; + minWidth = 150; + width = 11.11; + } + ]; + customRequest = { + "method" = "GET"; + "url" = ""; + "urlQueryParams" = []; + "headers" = []; + "postBody" = ""; + }; + msg.visibleColumns = ["data" "time"]; + panes-search-height = 1175; + panes-search-width = 466; + }; + performance.recording = { + entries = 134217728; + features = ["screenshots" "js" "cpu"]; + threads = ["GeckoMain" "Compositor" "Renderer" "DOM Worker"]; + }; + + selfxss.count = 5; + + toolbox = { + alwaysOnTop = false; + footer.height = 692; + host = "right"; + previousHost = "bottom"; + selectedTool = "webconsole"; + sidebar.width = 699; + splitconsoleEnabled = true; + }; + + toolsidebar-height.inspector = 350; + "toolsidebar-width.inspector" = 244; # TODO + toolsidebar-width.inspector.splitsidebar = 0; + + webconsole.filter = { + css = true; + filter = { + net = true; + netxhr = true; + }; + + input = { + editor = true; + editorOnboarding = false; + }; + + persistlog = true; + timestampMessages = true; + }; + }; + distribution = { + archlinux.bookmarksProcessed = true; + iniFile.exists = { + appversion = "109.0.1"; + value = true; + }; + }; + + doh-rollout = { + balrog-migration-done = true; + doneFirstRun = true; + home-region = "DE"; + }; + + dom = { + forms.autocomplete.formautofill = true; + push.userAgentID = "5e34b02066224519abd755189f802422"; + security.https_only_mode_ever_enabled = true; + }; + + extensions = { + activeThemeID = "default-theme@mozilla.org"; + blocklist.pingCountVersion = -1; + databaseSchema = 35; + formautofill.creditCards.used = 2; + getAddons = { + cache.lastUpdate = 1675712909; + databaseSchema = 6; + }; + + lastAppBuildId = "20230130183437"; + lastAppVersion = "109.0.1"; + + lastPlatformVersion = "109.0.1"; + + pendingOperations = false; + pictureinpicture.enable_picture_in_picture_overrides = true; + systemAddonSet = { + "schema" = 1; + "addons" = {}; + }; + ui = { + dictionary.hidden = true; + extension.hidden = false; + lastCategory = "addons://list/extension"; + locale.hidden = true; + sitepermission.hidden = true; + theme.hidden = false; + }; + + webcompat = { + enable_shims = true; + perform_injections = true; + perform_ua_overrides = true; + }; + + webextensions = { + ExtensionStorageIDB.migrated = { + "addon@darkreader.org" = true; + "enhancerforyoutube@maximerf.addons.mozilla.org" = true; + "firenvim@lacamb.re" = true; + "keepassxc-browser@keepassxc.org" = true; + "screenshots@mozilla.org" = true; + "simple-tab-groups@drive4ik" = true; + "{762f9885-5a13-4abd-9c77-433dcd38b8fd}" = true; + }; + uuids = { + "doh-rollout@mozilla.org" = "3830b9af-a7ab-45ae-a10a-df08c432e9f7"; + "formautofill@mozilla.org" = "e05754ff-1fe6-4e78-84dc-f5cc845da180"; + "pictureinpicture@mozilla.org" = "d7135e8a-368e-4f92-bd09-e19c0975de7f"; + "screenshots@mozilla.org" = "6a611696-f2f7-41c4-bb4e-a56eda2447a5"; + "webcompat-reporter@mozilla.org" = "99972218-65f7-4a9a-9f1d-8dcd1f86a563"; + "webcompat@mozilla.org" = "71ce01a8-6fa2-4b21-ba57-59b36478daf6"; + "default-theme@mozilla.org" = "f8e9414d-e977-4d2a-8941-93bf72212b01"; + "addons-search-detection@mozilla.com" = "344d2821-32ec-418f-8665-32c5ae14c40b"; + "google@search.mozilla.org" = "caa826ac-7699-4cdc-9a01-3b35145dbb92"; + "wikipedia@search.mozilla.org" = "ee7a4ba4-10d2-440b-a259-33fc62084480"; + "bing@search.mozilla.org" = "bb80bdc4-bd41-47a8-b9d5-10d4a57f2b2d"; + "ddg@search.mozilla.org" = "2ad38783-b68d-41f2-a76d-c4e800f65d64"; + "amazon@search.mozilla.org" = "aac3e95f-8267-4182-b8a2-2b949160adb7"; + "enhancerforyoutube@maximerf.addons.mozilla.org" = "1ecb30aa-dd3a-4e1c-b405-7400176b683a"; + "@contain-facebook" = "7e386381-dd25-43f7-9fcc-c3f541f2a458"; + "addon@darkreader.org" = "9b7b4403-7e99-4138-a9a9-114b72299253"; + "simple-tab-groups@drive4ik" = "3f29df14-5127-4de4-863c-17846549e474"; + "{762f9885-5a13-4abd-9c77-433dcd38b8fd}" = "3f954cd9-0f14-4595-ba83-4dc0f318e002"; + "e2933bff1d77b6ea81b2df1dda992244e7892b6c@temporary-addon" = "b6ad60ec-a560-427d-aaac-c2c568d69495"; + "pause@example.com" = "87db7ee4-2820-4a56-bb94-9d837886e029"; + "yt_pause@example.com" = "ba2218e1-792e-47a5-99ae-942fc46441fd"; + "keepassxc-browser@keepassxc.org" = "00b8fb40-3ba7-4a33-b086-cb71c5bbe952"; + "firenvim@lacamb.re" = "cf26e07b-4e07-4a42-978f-30f92409ae88"; + }; + }; + }; + + findbar.highlightAll = true; + + fission.experiment.max-origins = { + last-disqualified = 1675596365; + last-qualified = 1675793855; + qualified = false; + }; + + gecko.handlerService.defaultHandlersVersion = 1; + + gfx.blacklist = { + layers.opengl.failureid = "FEATURE_FAILURE_SOFTWARE_GL"; + + "vaapi" = 4; + "vaapi.failureid" = "FEATURE_FAILURE_VAAPI_TEST_FAILED"; + }; + + idle.lastDailyNotification = 1675756850; + + intl.regional_prefs.use_os_locales = true; + + media = { + eme.enabled = true; + + gmp-gmpopenh264 = { + abi = "x86_64-gcc3"; + lastDownload = 1668329402; + lastDownloadFailReason = "Error: Failed downloading via ServiceRequest, status: 0, reason: error"; + lastDownloadFailed = 1666889531; + lastInstallStart = 1668329400; + lastUpdate = 1668329402; + version = "1.8.1.2"; + }; + + gmp-manager = { + buildID = "20230130183437"; + lastCheck = 1675756691; + lastEmptyCheck = 1675756691; + }; + + gmp-widevinecdm = { + abi = "x86_64-gcc3"; + lastDownload = 1674828538; + lastInstallStart = 1674828533; + lastUpdate = 1674828538; + version = "4.10.2557.0"; + }; + + gmp.storage.version.observed = 1; + + videocontrols.picture-in-picture.video-toggle.enabled = false; + }; + + network = { + cookie.cookieBehavior = 1; + http.referer.disallowCrossSiteRelaxingDefault.top_navigation = true; + }; + + pdfjs = { + enabledCache.state = true; + migrationVersion = 2; + }; + + permissions.default = { + camera = 2; + desktop-notification = 2; + geo = 2; + microphone = 2; + xr = 2; + }; + + places.database.lastMaintenance = 1675756852; + + pref.privacy.disable_button = { + tracking_protection_exceptions = false; + view_passwords = false; + }; + + print = { + more-settings.open = true; + print = { + printer_Brother.print_in_color = false; + + printer_Brother_DCP_9022CDW = { + print_duplex = 0; + print_footercenter = ""; + print_footerleft = ""; + print_footerright = ""; + print_headercenter = ""; + print_headerleft = ""; + print_headerright = ""; + print_in_color = false; + }; + }; + + print_printer = "Brother_DCP_9022CDW"; + }; + + privacy = { + annotate_channels.strict_list.enabled = true; + donottrackheader.enabled = true; + partition.network_state.ocsp_cache = true; + + purge_trackers = { + date_in_cookie_database = "0"; + last_purge = "1675756851136"; + }; + + "query_stripping.enabled" = true; # TODO + query_stripping.enabled.pbmode = true; + + restrict3rdpartystorage.rollout.enabledByDefault = true; + + sanitize.pending = [ + { + "id" = "newtab-container"; + "itemsToClear" = []; + "options" = {}; + } + ]; + + trackingprotection = { + enabled = true; + socialtracking.enabled = true; + }; + + userContext = { + enabled = true; + extension = "simple-tab-groups@drive4ik"; + ui.enabled = true; + }; + }; + + security = { + remote_settings = { + crlite_filters.checked = 1656529337; + intermediates.checked = 1656529337; + }; + + sandbox.content.tempDirSuffix = "86b82f75-b18b-4db2-a563-ba4380a07a97"; + }; + + services = { + blocklist = { + addons-mlbf.checked = 1656684436; + gfx.checked = 1656684436; + }; + + settings = { + blocklists = { + addons-bloomfilters.last_check = 1675773838; + gfx.last_check = 1675772639; + }; + + clock_skew_seconds = 0; + last_etag = 1675795222827; + last_update_seconds = 1675795598; + + main = { + addons-manager-settings.last_check = 1675772639; + anti-tracking-url-decoration.last_check = 1675772639; + cfr.last_check = 1675772639; + cookie-banner-rules-list.last_check = 1675772639; + devtools-compatibility-browsers.last_check = 1675772639; + devtools-devices.last_check = 1675772639; + doh-config.last_check = 1675772639; + doh-providers.last_check = 1675772639; + fxmonitor-breaches.last_check = 1675772639; + hijack-blocklists.last_check = 1675772639; + language-dictionaries.last_check = 1675772639; + message-groups.last_check = 1675772639; + ms-images.last_check = 1675772639; + nimbus-desktop-experiments.last_check = 1675793197; + normandy-recipes-capabilities.last_check = 1675772639; + partitioning-exempt-urls.last_check = 1675772639; + password-recipes.last_check = 1675772639; + password-rules.last_check = 1675772639; + personality-provider-models.last_check = 1675772639; + personality-provider-recipe.last_check = 1675772639; + pioneer-study-addons-v1.last_check = 1675772639; + public-suffix-list.last_check = 1675772639; + query-stripping.last_check = 1675772639; + search-config.last_check = 1675772639; + search-default-override-allowlist.last_check = 1675772639; + search-telemetry-v2.last_check = 1675772639; + sites-classification.last_check = 1675772639; + tippytop.last_check = 1675772639; + top-sites.last_check = 1675772639; + url-classifier-skip-urls.last_check = 1675772639; + websites-with-shared-credential-backends.last_check = 1675772639; + whats-new-panel.last_check = 1675772639; + }; + + security-state = { + cert-revocations.last_check = 1675772639; + intermediates.last_check = 1675772639; + onecrl.last_check = 1675772639; + }; + security.onecrl.checked = 1656529337; + }; + + sync = { + clients.lastSync = "0"; + declinedEngines = ""; + globalScore = 0; + nextSync = 0; + tabs.lastSync = "0"; + }; + }; + + signon.rememberSignons = false; + + storage.vacuum.last = { + index = 1; + places.sqlite = 1673364894; + }; + + svg.context-properties.content.enabled = true; + + toolkit = { + legacyUserProfileCustomizations.stylesheets = true; + + startup.last_success = 1675756592; + + telemetry = { + cachedClientID = "7d88e3fb-f77d-4d7e-8aa5-623d7349a4dc"; + pioneer-new-studies-available = true; + reportingpolicy.firstRun = false; + previousBuildID = "20230130183437"; + }; + }; + + trailhead.firstrun.didSeeAboutWelcome = true; + }; + }; + }; + }; +} diff --git a/home-manager/firefox/settings/override.js b/home-manager/firefox/settings/override.js new file mode 100644 index 00000000..1f92735b --- /dev/null +++ b/home-manager/firefox/settings/override.js @@ -0,0 +1,137 @@ +/* + 0100: STARTUP + 0200: GEOLOCATION / LANGUAGE / LOCALE + 0300: QUIETER FOX + 0400: SAFE BROWSING + 0600: BLOCK IMPLICIT OUTBOUND + 0700: DNS / DoH / PROXY / SOCKS / IPv6 + 0800: LOCATION BAR / SEARCH BAR / SUGGESTIONS / HISTORY / FORMS + 0900: PASSWORDS + 1000: DISK AVOIDANCE + 1200: HTTPS (SSL/TLS / OCSP / CERTS / HPKP) + 1400: FONTS + 1600: HEADERS / REFERERS + 1700: CONTAINERS + 2000: PLUGINS / MEDIA / WEBRTC + 2400: DOM (DOCUMENT OBJECT MODEL) + 2600: MISCELLANEOUS + 2700: ETP (ENHANCED TRACKING PROTECTION) + 2800: SHUTDOWN & SANITIZING + 4500: RFP (RESIST FINGERPRINTING) + 5000: OPTIONAL OPSEC + 5500: OPTIONAL HARDENING + 6000: DON'T TOUCH + 7000: DON'T BOTHER + 8000: DON'T BOTHER: FINGERPRINTING + 9000: NON-PROJECT RELATED + 9999: DEPRECATED / REMOVED / LEGACY / RENAMED +*/ + + +// restore session +user_pref("browser.startup.page", 3); // 0102 + +user_pref("browser.startup.homepage", "file:///home/dt/home.html"); // 0103 +user_pref("browser.newtabpage.enabled", true); // 0104 + +// disable the geoservice, TODO don't know if I want this +//user_pref("geo.provider.use_geoclue", false); // 0202 + +// TODO is this something useful? +user_pref("datareporting.policy.dataSubmissionEnabled", true); // 0330 + +// enable health reports +user_pref("datareporting.healthreport.uploadEnabled", true); // 0331 + +// Do I want to opt-out? +user_pref("toolkit.telemetry.coverage.opt-out", false); // 0333 + +// enables studies +user_pref("app.shield.optoutstudies.enabled", true); // 0340 + +// I guess that browsing protection is useful +user_pref("browser.safebrowsing.downloads.remote.enabled", true); // 0403 + +// TODO does this (-> set to false) make things slower? +user_pref("network.prefetch-next", true); // 0601 + +// enable ipv6 because the rest of the system uses it +user_pref("network.dns.disableIPv6", true); // 0701 + +// TRR only +user_pref("network.trr.mode", 3); // 0710 + +// I trust my search engine +user_pref("keyword.enabled", true); // 801 +user_pref("browser.search.suggest.enabled", true); // 0804 +user_pref("browser.urlbar.suggest.searches", true); // 0804 + +// prefetch urls, if the get auto completed +user_pref("browser.urlbar.speculativeConnect.enabled", true); // 0805 + +// TODO I might want to enable this +//user_pref("browser.urlbar.suggest.quicksuggest.nonsponsored", false); // 0807 + +// TODO enable form and search history? +//user_pref("browser.formfill.enable", false); // 0810 + +// disk cache should help performance +user_pref("browser.cache.disk.enable", true); // 1001 + +// store extra session data (form content, cookies and POST data) 0: everywhere +user_pref("browser.sessionstore.privacy_level", 0); // 1003 + +// Disable unsafe passive content (images) on https sites +user_pref("security.mixed_content.block_display_content", true); // 1241 + +// Disable the eme banner +user_pref("browser.eme.ui.enabled", false); // 2022 + +// Don't delete my precious temp files +user_pref("browser.helperApps.deleteTempFileOnExit", false); // 2603 + +// Download to the download dir +user_pref("browser.download.useDownloadDir", true); // 2651 + +// Open the download panel +user_pref("browser.download.alwaysOpenPanel", true); // 2652 + +// Block after custom ruleset +user_pref("browser.contentblocking.category", "custom"); // 2701 + +// set the custome settings // 7016 +user_pref("network.cookie.cookieBehavior", 1); +user_pref("network.http.referer.disallowCrossSiteRelaxingDefault", true); +user_pref("network.http.referer.disallowCrossSiteRelaxingDefault.top_navigation", true); +user_pref("privacy.partition.network_state.ocsp_cache", true); +user_pref("privacy.query_stripping.enabled", true); +user_pref("privacy.trackingprotection.enabled", true); +user_pref("privacy.trackingprotection.socialtracking.enabled", true); +user_pref("privacy.trackingprotection.cryptomining.enabled", true); +user_pref("privacy.trackingprotection.fingerprinting.enabled", true); + + +// I might want to change that, when it hinders session restore +//user_pref("privacy.partition.always_partition_third_party_non_cookie_storage.exempt_sessionstorage", false); // 2720 + +// I like my history very much! +user_pref("privacy.sanitize.sanitizeOnShutdown", false); // 2810 + +// The downsides (light theme + potential breakages): +//user_pref("privacy.resistFingerprinting", true); // 4501 +user_pref("privacy.resistFingerprinting.letterboxing", false); // 4504 + +// I would like to keep my gl, even in the web +user_pref("webgl.disabled", false); // 4520 + +// I like my service workers and am using a service using them. +user_pref("dom.serviceWorkers.enabled", true); // 7017 + +// I've got a password manager already +user_pref("signon.rememberSignons", false); // 5003 + +// Do not track header +user_pref("privacy.donottrackheader.enabled", true); // 7015 + +// TODO no idea what this does, enabling it +user_pref("browser.urlbar.showSearchTerms.enabled", true); // 9004 diff --git a/home-manager/firefox/unzip_mozlz4.py b/home-manager/firefox/unzip_mozlz4.py new file mode 100755 index 00000000..311fd214 --- /dev/null +++ b/home-manager/firefox/unzip_mozlz4.py @@ -0,0 +1,43 @@ +#!/usr/bin/python +# source: https://unix.stackexchange.com/a/497861 +# Command-line tool to decompress mozLz4 files used for example by Firefox to store various kinds of session backup information. +# Works in both Python 2.7.15 and 3.6.7, as of version 2.1.6 of the LZ4 Python bindings at pypi.org/project/lz4. +# To use in another script, simply cut and paste the import statement and the mozlz4_to_text() function (lines 8 to 17). + +import lz4.block # pip install lz4 --user + + +def mozlz4_to_text(filepath): + # Given the path to a "mozlz4", "jsonlz4", "baklz4" etc. file, + # return the uncompressed text. + bytestream = open(filepath, "rb") + bytestream.read(8) # skip past the b"mozLz40\0" header + valid_bytes = bytestream.read() + text = lz4.block.decompress(valid_bytes) + return text + + +def main(args): + # Given command-line arguments of an input filepath for a ".mozlz4" file + # and optionally an output filepath, write the decompressed text to the + # output filepath. + # Default output filepath is the input filepath minus the last three characters + # (e.g. "foo.jsonlz4" becomes "foo.json") + filepath_in = args[0] + if len(args) < 2: + filepath_out = filepath_in[:-3] + else: + filepath_out = args[1] + text = mozlz4_to_text(filepath_in) + with open(filepath_out, "wb") as outfile: + outfile.write(text) + print("Wrote decompressed text to {}".format(filepath_out)) + + +if __name__ == "__main__": + import sys + args = sys.argv[1:] + if args and not args[0] in ("--help", "-h"): + main(args) + else: + print("Usage: mozlz4.py ") diff --git a/home-manager/gammastep/default.nix b/home-manager/gammastep/default.nix new file mode 100644 index 00000000..75c5630f --- /dev/null +++ b/home-manager/gammastep/default.nix @@ -0,0 +1,20 @@ +{config, ...}: { + home-manager.services.gammastep = { + enable = true; + settings = { + general = { + temp-day = 1300; + temp-night = 1300; + gamma = "0.8:0.8:0.8"; + fade = 0; + adjustment-method = "wayland"; + location-provider = "manual"; + }; + + manual = { + lat = 48.1; + lon = 11.6; + }; + }; + }; +} diff --git a/home-manager/git/default.nix b/home-manager/git/default.nix new file mode 100644 index 00000000..179c449b --- /dev/null +++ b/home-manager/git/default.nix @@ -0,0 +1,141 @@ +{ + config, + pkgs, + ... +}: let + gitTemplateFile = + pkgs.writeText "git_template.git" + '' + # Title: Summary, imperative, start upper case, don't end with a period + # If applied, this commit will + + # Body: Explain *what* and *why* (not *how*). + + + # BREAKING CHANGE: + # Fixes: # + # Refs: # + # Co-authored-by: + + + + # Convention Commits (https://www.conventionalcommits.org/en/v1.0.0/): + # feat: [Features] -> MINOR version bump + # A new feature + # + # fix: [Bug Fixes] -> PATCH version bump + # A bug fix + # + # append '!' after the type/scope: [Breaking Change] -> MAJOR version bump + # A breaking API change + # + # docs: [Documentation] + # Documentation only changes + # + # style: [Styles] + # Changes that do not affect the meaning of the code + # (white-space, formatting, missing semi-colons, etc) + # + # refactor: [Code Refactoring] + # A code change that neither fixes a bug nor adds a feature + # + # perf: [Performance Improvements] -> PATCH version bump + # A code change that improves performance + # + # test: [Tests] + # Adding missing tests or correcting existing tests + # + # build: [Builds] -> PATCH version bump + # Changes that affect the build system or external dependencies + # (example scopes: gulp, broccoli, npm) + # + # ci: [Continuous Integrations] + # Changes to our CI configuration files and scripts + # (example scopes: Travis, Circle, BrowserStack, SauceLabs) + # + # chore: [Chores] + # Other changes that don't modify src or test files + # + # reverts: [Reverts] + # Reverts a previous commit + + # How to Write a Git Commit Message: + # [https://chris.beams.io/posts/git-commit/] -> https://cbea.ms/git-commit/ + # + # 1. Separate subject from body with a blank line + # 2. Limit the subject line to 50 characters + # 3. Capitalize the subject line + # 4. Do not end the subject line with a period + # 5. Use the imperative mood in the subject line + # 6. Wrap the body at 72 characters + # 7. Use the body to explain *what* and *why* vs. *how* + ''; + + gitConfig = { + init = { + defaultBranch = "prime"; + }; + credential = { + helper = "cache --timeout 43200"; + }; + user = { + email = "ene@sils.li"; + name = "ene"; + }; + help = { + autocorrect = 5; + }; + commit = { + template = "${gitTemplateFile}"; + }; + }; +in { + home-manager.programs.git = { + enable = true; + #package = pkgs.gitAndTools.gitFull; # TODO for git send-email support + aliases = { + st = "status"; + + ## Logging: + ls = "log --max-count=10 --color --format=format:'%C(bold red)%h%C(reset) %C(dim bold blue)%s%C(reset) %C(dim white)[%aN]' "; + + # https://stackoverflow.com/a/61487052 + lg = "lg1"; + lg1 = "lg1-specific --all"; + lg2 = "lg2-specific --all"; + lg3 = "lg3-specific --all"; + + lg1-specific = "log --graph --abbrev-commit --decorate \ + --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(auto)%d%C(reset)'"; + + lg2-specific = "log --graph --abbrev-commit --decorate \ + --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(auto)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)'"; + + lg3-specific = "log --graph --abbrev-commit --decorate \ + --format=format:'%C(bold blue)%h%C(reset)\ + - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)\ + %C(bold cyan)(committed: %cD)%C(reset) %C(auto)%d%C(reset)%n\ + '' %C(white)%s%C(reset)%n'' \ + %C(dim white)- %an <%ae> %C(reset) %C(dim white)(committer: %cn <%ce>)%C(reset)'"; + }; + extraConfig = gitConfig; + delta = { + enable = true; + options = { + decorations = { + commit-decoration-style = "bold yellow box ul"; + file-decoration-style = "none"; + file-style = "bold yellow ul"; + }; + features = "decorations"; + whitespace-error-style = "22 reverse"; + }; + }; + signing = { + key = null; #let gpg2 decide, based on the author + signByDefault = true; + }; + }; +} +# vim: ts=2 + diff --git a/home-manager/grades/config.yaml b/home-manager/grades/config.yaml new file mode 100644 index 00000000..ebbc61f8 --- /dev/null +++ b/home-manager/grades/config.yaml @@ -0,0 +1,59 @@ +--- +# The unit of your grades. +# This can also be specified +# on a per grade basis on the command line +unit: Punkte + +# List of the possible grade groups +# +# name: +# This is the name used below +# +# weight: +# This is the weight applied to all grades form the group +# when calculation the average (see https://en.wikipedia.org//wiki/Weighted_arithmetic_mean for a explanation). +grade_groups: + - name: major + weight: '2' + - name: minor + weight: '1' + +# List of the types of grades. +# +# name: +# This is the name used on the command line. +# NB: The name is case sensitive. +# +# group: +# This is used when calculating the average, to group multiple types together. +# You might want to use separate types to keep grades ordered, +# but calculate their average as one. +# The value is one of the names you declared in the grade_group section. +grade_types: + - name: graded-homework + group: minor + - name: exam + group: major + - name: oral-mark + group: minor + +# List of the types of Classes +# +# name: +# The name used below +class_types: + - name: subsidiary-subject + - name: intensified-course + +# List of classes +# +# name: +# The name used on the cli +# +# class_type: +# The name of the class type you declared above +classes: + - name: Math + class_type: intensified-course2 + - name: English + class_type: subsidiary-subject diff --git a/home-manager/grades/default.nix b/home-manager/grades/default.nix new file mode 100644 index 00000000..8cca9640 --- /dev/null +++ b/home-manager/grades/default.nix @@ -0,0 +1,7 @@ +{config, ...}: { + home-manager.xdg.configFile."grades/config.yaml" = { + enable = true; + target = "grades/config.yaml"; + source = "./config.yaml"; + }; +} diff --git a/home-manager/gtk/default.nix b/home-manager/gtk/default.nix new file mode 100644 index 00000000..d72986d5 --- /dev/null +++ b/home-manager/gtk/default.nix @@ -0,0 +1,58 @@ +{ + config, + pkgs, + ... +}: { + home-manager.gkt = { + enable = true; + theme = { + package = pkgs.nordic; + name = "Nordic"; + }; + cursorTheme = { + package = pkgs.nordzy-cursor-theme; + name = "Nordzy-cursors"; + }; + iconTheme = { + package = pkgs.nordzy-icon-theme; + name = "Nordzy-icon"; + }; + font = { + name = "Noto Sans"; + size = 10; + }; + gtk2 = { + configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc"; + # extraConfig = '' + # gtk-enable-animations=1 + # gtk-primary-button-warps-slider=0 + # gtk-toolbar-style=3 + # gtk-menu-images=1 + # gtk-button-images=1 + # + # ''; + }; + gtk3 = { + # extraConfig = '' + # gtk-button-images=true + # gtk-decoration-layout=icon:minimize,maximize,close + # gtk-enable-animations=true + # gtk-menu-images=true + # gtk-primary-button-warps-slider=false + # gtk-toolbar-style=3 + # #gtk-modules=window-decorations-gtk-module:colorreload-gtk-module + # ''; + extraCss = ""; + }; + gtk4 = { + # extraConfig = '' + # gtk-application-prefer-dark-theme=true + # gtk-decoration-layout=icon:minimize,maximize,close + # gtk-enable-animations=true + # gtk-primary-button-warps-slider=false + # ''; + }; + }; +} +# vim: ts=2 + diff --git a/home-manager/keepassxc/default.nix b/home-manager/keepassxc/default.nix new file mode 100644 index 00000000..dfe89e35 --- /dev/null +++ b/home-manager/keepassxc/default.nix @@ -0,0 +1,12 @@ +{ + config, + pkgs, + ... +}: { + home-manager.xdg.configFile."keepassxc/keepassxc.ini" = { + target = "keepassxc/keepassxc.ini"; + source = "./keepasxc.ini"; + }; +} +# vim: ts=2 + diff --git a/home-manager/keepassxc/keepassxc.ini b/home-manager/keepassxc/keepassxc.ini new file mode 100644 index 00000000..ee10d691 --- /dev/null +++ b/home-manager/keepassxc/keepassxc.ini @@ -0,0 +1,58 @@ +[General] +AutoSaveAfterEveryChange=true +BackupBeforeSave=true +BackupFilePathPattern=/home/dt/.local/share/keepassxc/{DB_FILENAME}.old.kdbx +ConfigVersion=2 +HideWindowOnCopy=false + +[Browser] +CustomProxyLocation= +Enabled=true + +[FdoSecrets] +Enabled=true + +[GUI] +AdvancedSettings=true +ApplicationTheme=dark +CompactMode=false +HidePasswords=true +ShowExpiredEntriesOnDatabaseUnlockOffsetDays=1 +TrayIconAppearance=monochrome-light + +[KeeShare] +Active="\n" +Own="MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC70HR8Lq7Sgg9cjJQ6qWnPywUl48IDhI93CYhg7VC7sEsMjNCyUqUpYpkO40lg3slmkWgB8XXa7MUa4DDZo2V4qXz+E5WfZLnr77B64n2WqTAsx7HqQjRw1SOLBceXxU3Zh7486fdekeg/mgJQPcU+snh1JeMqRqHGvtVo4hGM4TOwWjbQ8gRZmqPBELCLry2Dj4m2/swFZo3yARwnSpMBO5IyKq9aAZctKxQG4EeFJcm6MiZ2UkrDUe9RI8x9LwhIbDZ8G2WEy82dESaj4KOSRiz1XCiQ54wqE/MYDWzBUXA8+Q+vyuKXKUKU2RY5ScXCaLHUzBwcU7tX8HeThs5NAgMBAAECggEAIoMF4KroY5TUM06+zz/BypX1IncFeAWEIlzdU2hQYUjeJZZ7pAUFRgNQ+lggK/2MVz1pdg/zdvDysENZnqiElSVZ60tYf3NwKa+AB7i2WLjKujPQ2Onk/oXf8+QyPsyaB1rHBaT9mIJpwcQwYCPVqrV7ZpV5dpOHl0CKcS03ieIoa5UOGB8bx35xkDtSW27tyyfdtAdkycni22MdHbgVYozUkpVnwtxGqg0zBxTQWxzhD+qVNxGBhT0HZNLz7qQOGghoDsDXkYWvbcJmnOLA9FvH7ihdDw5LjsWQf+rUwCxCKX4JLpSAhkGcEIz1yvlmJR1kWD0NnJDkKvGZxnpXsQKBgQDjp9fgxMx8k9apFzSaIaA77D9aJBGR9QHuewhd4EJR7tCqyjV9CZ+V86T8pqDTtCAEyvmO7VPiHuw2ZzgrzZLr2Suy2fur53AdWDk7PYrWjUtYolyVdsTWHdGoyPksSZM/1biCVW4eY986R9wHnn88m1X4Rz52BC0m22cNrVUbnQKBgQDTMruJXWegrytWdJcx8VoD81WA0/pqbTB9qMoaoR4i/VYK1BGyFnnwuMpoAAX72yhMbJRSLdIO5eQXNHleMLEKEkrWkQIkwYGyvGkTEM7bDWoAIdLA8MV6ad/1G9txT/QtH9PlQYpK65RB1L6Nabgeavwultb5izkuRzIb/mS2cQKBgQDXD10hieg/G44i6LgZjwCG+zQR3Jb4kkMD3hhWTp94NSnM3f9PosKubp+CyYqO08+Xl4PPoKWorFurPTFUN/y+bscYS1Kz34wLPKe8LfQ1oP73uVHLJIroVv0T/N9fFhZTrHuELF49uU1NCktyqyk5wOijBfKcnG9nEMc2pXMMBQKBgQCMsCn/aopinu3mrMofSeCl6w4VQKB7DvuTacIgFR4nPs13byfOk2xtsBudRg62ZJqmtlnjmIRqyje0QY9r8FGvHNpfrr9XztPgReRVAAhcIcZwChgD0SAr2KWI+SKojBNjj+Uuvgcqu13KsLazKy6sjKYrPu4708OmkWTPAxsB8QKBgB7rvH8tRZQqUGYVW0+Q89jmUNK/MFGiIUMLBA9d45sEG6daDdDMXPV/M/uvwVyr3iUPIZpKTtM1kjz60P2zQKXIlGwkfdXiNg+fq9cfY0NE0tyckZubi8/P8+Uw6AkU70i7zwVWRm8/r3QliThjLLq1GiKrkvaXTG7ATAOpPYdUdtMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC70HR8Lq7Sgg9cjJQ6qWnPywUl48IDhI93CYhg7VC7sEsMjNCyUqUpYpkO40lg3slmkWgB8XXa7MUa4DDZo2V4qXz+E5WfZLnr77B64n2WqTAsx7HqQjRw1SOLBceXxU3Zh7486fdekeg/mgJQPcU+snh1JeMqRqHGvtVo4hGM4TOwWjbQ8gRZmqPBELCLry2Dj4m2/swFZo3yARwnSpMBO5IyKq9aAZctKxQG4EeFJcm6MiZ2UkrDUe9RI8x9LwhIbDZ8G2WEy82dESaj4KOSRiz1XCiQ54wqE/MYDWzBUXA8+Q+vyuKXKUKU2RY5ScXCaLHUzBwcU7tX8HeThs5NAgMBAAECggEAIoMF4KroY5TUM06+zz/BypX1IncFeAWEIlzdU2hQYUjeJZZ7pAUFRgNQ+lggK/2MVz1pdg/zdvDysENZnqiElSVZ60tYf3NwKa+AB7i2WLjKujPQ2Onk/oXf8+QyPsyaB1rHBaT9mIJpwcQwYCPVqrV7ZpV5dpOHl0CKcS03ieIoa5UOGB8bx35xkDtSW27tyyfdtAdkycni22MdHbgVYozUkpVnwtxGqg0zBxTQWxzhD+qVNxGBhT0HZNLz7qQOGghoDsDXkYWvbcJmnOLA9FvH7ihdDw5LjsWQf+rUwCxCKX4JLpSAhkGcEIz1yvlmJR1kWD0NnJDkKvGZxnpXsQKBgQDjp9fgxMx8k9apFzSaIaA77D9aJBGR9QHuewhd4EJR7tCqyjV9CZ+V86T8pqDTtCAEyvmO7VPiHuw2ZzgrzZLr2Suy2fur53AdWDk7PYrWjUtYolyVdsTWHdGoyPksSZM/1biCVW4eY986R9wHnn88m1X4Rz52BC0m22cNrVUbnQKBgQDTMruJXWegrytWdJcx8VoD81WA0/pqbTB9qMoaoR4i/VYK1BGyFnnwuMpoAAX72yhMbJRSLdIO5eQXNHleMLEKEkrWkQIkwYGyvGkTEM7bDWoAIdLA8MV6ad/1G9txT/QtH9PlQYpK65RB1L6Nabgeavwultb5izkuRzIb/mS2cQKBgQDXD10hieg/G44i6LgZjwCG+zQR3Jb4kkMD3hhWTp94NSnM3f9PosKubp+CyYqO08+Xl4PPoKWorFurPTFUN/y+bscYS1Kz34wLPKe8LfQ1oP73uVHLJIroVv0T/N9fFhZTrHuELF49uU1NCktyqyk5wOijBfKcnG9nEMc2pXMMBQKBgQCMsCn/aopinu3mrMofSeCl6w4VQKB7DvuTacIgFR4nPs13byfOk2xtsBudRg62ZJqmtlnjmIRqyje0QY9r8FGvHNpfrr9XztPgReRVAAhcIcZwChgD0SAr2KWI+SKojBNjj+Uuvgcqu13KsLazKy6sjKYrPu4708OmkWTPAxsB8QKBgB7rvH8tRZQqUGYVW0+Q89jmUNK/MFGiIUMLBA9d45sEG6daDdDMXPV/M/uvwVyr3iUPIZpKTtM1kjz60P2zQKXIlGwkfdXiNg+fq9cfY0NE0tyckZubi8/P8+Uw6AkU70i7zwVWRm8/r3QliThjLLq1GiKrkvaXTG7ATAOpPYdU\n" +QuietSuccess=true + +[PasswordGenerator] +AdditionalChars= +AdvancedMode=true +Braces=true +Dashes=true +EASCII=true +ExcludedChars= +Length=128 +Logograms=true +LowerCase=true +Math=true +Numbers=true +Punctuation=true +Quotes=true +SpecialChars=true +Type=0 +UpperCase=true +WordCount=4 +WordSeparator="," + +[SSHAgent] +Enabled=true + +[Security] +HidePasswordPreviewPanel=true +IconDownloadFallback=true +LockDatabaseIdle=false +LockDatabaseIdleSeconds=960 +PasswordEmptyPlaceholder=true +PasswordsHidden=true +PasswordsRepeatVisible=true diff --git a/home-manager/latexindent/default.nix b/home-manager/latexindent/default.nix new file mode 100644 index 00000000..657382ca --- /dev/null +++ b/home-manager/latexindent/default.nix @@ -0,0 +1,16 @@ +{ + config, + pkgs, + ... +}: { + home-manager.xdg.configFile."latexindent/indentconfig.yaml" = { + target = "latexindent/indentconfig.yaml"; + source = "./indentconfig.yaml"; + }; + home-manager.xdg.configFile."latexindent/mysettings.yaml" = { + target = "latexindent/mysettings.yaml"; + source = "./mysettings.yaml"; + }; +} +# vim: ts=2 + diff --git a/home-manager/latexindent/indentconfig.yaml b/home-manager/latexindent/indentconfig.yaml new file mode 100644 index 00000000..d67351f3 --- /dev/null +++ b/home-manager/latexindent/indentconfig.yaml @@ -0,0 +1,2 @@ +paths: +- /home/dt/.config/latexindent/mysettings.yaml diff --git a/home-manager/latexindent/mysettings.yaml b/home-manager/latexindent/mysettings.yaml new file mode 100644 index 00000000..9a0f8b2f --- /dev/null +++ b/home-manager/latexindent/mysettings.yaml @@ -0,0 +1,672 @@ +# defaultSettings.yaml for latexindent.pl, version 3.19.1, 2022-12-04 +# a script that aims to +# beautify .tex, .sty, .cls files +# +# (or latexindent.exe if you're on Windows) +# +#--------------------------------------------------------------------------------------- +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# See http://www.gnu.org/licenses/. +# +# Chris Hughes, 2017 +# +# For all communication, please visit: https://github.com/cmhughes/latexindent.pl +# +#--------------------------------------------------------------------------------------- +# You should feel encouraged to change anything you like in these settings, but +# it would probably be better to have your own user settings +# files somewhere else - remember that this file may be overwritten +# when you update your tex distribution. Please see the manual linked from: +# +# https://github.com/cmhughes/latexindent.pl +# +# for details of how to create and configure your own settings files. +# +# Please read the manual (linked from above) first to understand what each switch does. +# +#--------------------------------------------------------------------------------------- + +# latexindent can be called to act on a file without using the file's extension, +# e.g, simply +# latexindent myfile +# in which case the choice of file extension is chosen +# according to the choices made in fileExtensionPreference +# Other file extensions can be added. +fileExtensionPreference: + .tex: 1 + .sty: 2 + .cls: 3 + .bib: 4 + +# default file extension of backup file (if -w switch is active) +# for example, if your .tex file is called +# myfile.tex +# and you specify the backupExtension as BACKUP.bak then your +# backup file will be +# myfileBACKUP.bak +backupExtension: .bak + +# only one backup per file: +# - if onlyOneBackUp is 0 then, as a safety measure, +# the number on the extension increments by 1 each time: +# +# myfile.bak0, myfile.bak1, myfile.bak2 +# - if you set onlyOnebackUp to 1, then the backup file will +# be overwritten each time (not recommended until you trust the script) +onlyOneBackUp: 0 + +# some users may want a finite number of backup files, +# say at most 3; in which case, they can change this maxNumberOfBackUps. +# +# If maxNumberOfBackUps is set to 0 (or less) then infinitely +# many backups are possible, unless onlyOneBackUp is switched on +maxNumberOfBackUps: 0 + +# some users may wish to cycle through back up files. +# +# for example, with maxNumberOfBackUps: 4, they may +# wish to delete the oldest back up file, and keep only the most recent. +# +# copy myfile.bak1 to myfile.bak0 +# copy myfile.bak2 to myfile.bak1 +# copy myfile.bak3 to myfile.bak2 +# copy myfile.bak4 to myfile.bak3 +# +# the back up will be written to myfile.bak4 +cycleThroughBackUps: 0 + +# preferences for information displayed in the log file +logFilePreferences: + showEveryYamlRead: 1 + showAmalgamatedSettings: 0 + showDecorationStartCodeBlockTrace: 0 + showDecorationFinishCodeBlockTrace: 0 + endLogFileWith: '--------------' + showGitHubInfoFooter: 1 + Dumper: + Terse: 1 + Indent: 1 + Useqq: 1 + Deparse: 1 + Quotekeys: 0 + Sortkeys: 1 + Pair: " => " + +# verbatim environments specified +# in this field will not be changed at all! +verbatimEnvironments: + verbatim: 1 + lstlisting: 1 + minted: 1 + +# verbatim commands such as \verb! body !, \lstinline$something else$ +verbatimCommands: + verb: 1 + lstinline: 1 + +# no indent blocks (not necessarily verbatim +# environments) which are marked as %\begin{noindent} +# or anything else that you detail in the following +noIndentBlock: + noindent: 1 + cmhtest: 1 + +# \begin{document} and \end{document} are treated differently +# by latexindent within filecontents environments +fileContentsEnvironments: + filecontents: 1 + filecontents*: 1 + +# indent preamble +indentPreamble: 1 + +# assume no preamble in cls, sty, by default +lookForPreamble: + .tex: 1 + .sty: 0 + .cls: 0 + .bib: 0 + +# some preambles can contain \begin and \end statements +# that are not in their 'standard environment block', for example, +# consider the following key = values: +# preheadhook={\begin{mdframed}[style=myframedstyle]}, +# postfoothook=\end{mdframed}, +preambleCommandsBeforeEnvironments: 0 + +# default value of indentation +defaultIndent: " " + +# remove trailing whitespace from all lines +removeTrailingWhitespace: + beforeProcessing: 0 + afterProcessing: 1 + +# name of code blocks that should have their body aligned at ampersand delimiters +lookForAlignDelims: + tabular: + delims: 1 + alignDoubleBackSlash: 1 + spacesBeforeDoubleBackSlash: 1 + multiColumnGrouping: 0 + alignRowsWithoutMaxDelims: 1 + spacesBeforeAmpersand: 1 + spacesAfterAmpersand: 1 + justification: left + alignFinalDoubleBackSlash: 0 + dontMeasure: 0 + delimiterRegEx: '(?]*?>)' + keyEqualsValuesBracesBrackets: + name: '[a-zA-Z@\*0-9_\/.:\#-]+[a-zA-Z@\*0-9_\/.\h\{\}:\#-]*?' + follow: '(?:(?<]+?' + follow: '\h|\R|\{|\[|\$|\)|\(' + UnNamedGroupingBracesBrackets: + follow: '\{|\[|,|&|\)|\(|\$' + arguments: + before: '(?:#\d\h*;?,?\/?)+|\<.*?\>' + between: '_|\^|\*' + trailingComments: + notPreceededBy: '(? $archivers; + +readp "File Name: " name + + +case $(awk '{for (i=1; i<=NF; i++) print $i}' $archivers | fzf) in + "tar+zip") + tar -czf "$name".tar.gz "$name" + ;; + "tar+xz") + tar -cf "$name".tar $fx + xz -z -9 -e -T0 "$name".tar + ;; + "7z") + 7z a "$name".7z $fx + ;; + "zip") + zip -r "$name".zip $fx + ;; +esac + + + + +if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manager/lf/cmds/broot_jump.sh b/home-manager/lf/cmds/broot_jump.sh new file mode 100644 index 00000000..188c9508 --- /dev/null +++ b/home-manager/lf/cmds/broot_jump.sh @@ -0,0 +1,19 @@ +#!/bin/sh +# shellcheck disable=SC2086 +# shellcheck source=/dev/null +. ~/.local/lib/shell/lib + +f=$(mktemp) +res="$(broot --outcmd $f && cat $f | sed 's/cd //')" +rm -f "$f" +if [ -f "$res" ]; then + cmd="select" +elif [ -d "$res" ]; then + cmd="cd" +fi +lf -remote "send $id $cmd \"$res\"" + + + + +if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manager/lf/cmds/chmod.sh b/home-manager/lf/cmds/chmod.sh new file mode 100644 index 00000000..f6a87336 --- /dev/null +++ b/home-manager/lf/cmds/chmod.sh @@ -0,0 +1,17 @@ +#!/bin/sh +# shellcheck disable=SC2086 +# shellcheck source=/dev/null +. ~/.local/lib/shell/lib + + +readp "Mode Bits: " ans + +for file in $fx +do + chmod "$ans" "$file" +done + +lf -remote 'send reload' + + +if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manager/lf/cmds/clear_trash.sh b/home-manager/lf/cmds/clear_trash.sh new file mode 100644 index 00000000..c02321f2 --- /dev/null +++ b/home-manager/lf/cmds/clear_trash.sh @@ -0,0 +1,10 @@ +#!/bin/sh +# shellcheck disable=SC2086 +# shellcheck source=/dev/null +. ~/.local/lib/shell/lib + + +trash-empty + + +if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manager/lf/cmds/dl_file.sh b/home-manager/lf/cmds/dl_file.sh new file mode 100644 index 00000000..9cb9023c --- /dev/null +++ b/home-manager/lf/cmds/dl_file.sh @@ -0,0 +1,36 @@ +#!/bin/sh +# shellcheck disable=SC2086 +# shellcheck source=/dev/null +. ~/.local/lib/shell/lib + +# Provides the ability to download a file by dropping it into a window + +url=$(dragon-drop -t -x) + +if [ -n "$url" ]; then + printf "File Name: " + name="" + while [ -z $name ] || [ -e $name ] + do + read -r name + if [ -e "$name" ]; then + printf "File already exists, overwrite (y|n): " + read -r ans + + if [ "$ans" = "y" ]; then + break + else + printf "File Name: " + fi + fi + done + + # Download the file with curl + [ -n "$name" ] && curl -o "$name" "$url" || exit 1 +else + exit 1 +fi + + + +if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manager/lf/cmds/dragon.sh b/home-manager/lf/cmds/dragon.sh new file mode 100644 index 00000000..36e94706 --- /dev/null +++ b/home-manager/lf/cmds/dragon.sh @@ -0,0 +1,11 @@ +#!/bin/sh +# shellcheck disable=SC2086 +# shellcheck source=/dev/null +. ~/.local/lib/shell/lib + +dragon-drop -a -x "$fx" + + + + +if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manager/lf/cmds/dragon_individual.sh b/home-manager/lf/cmds/dragon_individual.sh new file mode 100644 index 00000000..abcadb13 --- /dev/null +++ b/home-manager/lf/cmds/dragon_individual.sh @@ -0,0 +1,10 @@ +#!/bin/sh +# shellcheck disable=SC2086 +# shellcheck source=/dev/null +. ~/.local/lib/shell/lib + +dragon-drop "$fx" + + + +if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manager/lf/cmds/dragon_stay.sh b/home-manager/lf/cmds/dragon_stay.sh new file mode 100644 index 00000000..60195d09 --- /dev/null +++ b/home-manager/lf/cmds/dragon_stay.sh @@ -0,0 +1,11 @@ +#!/bin/sh +# shellcheck disable=SC2086 +# shellcheck source=/dev/null +. ~/.local/lib/shell/lib + +dragon-drop -a "$fx" + + + + +if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manager/lf/cmds/fzf_jump.sh b/home-manager/lf/cmds/fzf_jump.sh new file mode 100644 index 00000000..688efdb9 --- /dev/null +++ b/home-manager/lf/cmds/fzf_jump.sh @@ -0,0 +1,17 @@ +#!/bin/sh +# shellcheck disable=SC2086 +# shellcheck source=/dev/null +. ~/.local/lib/shell/lib + +res="$(find . -maxdepth 3 | fzf --reverse --header='Jump to location')" +if [ -f "$res" ]; then + cmd="select" +elif [ -d "$res" ]; then + cmd="cd" +fi +lf -remote "send $id $cmd \"$res\"" + + + + +if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manager/lf/cmds/help.sh b/home-manager/lf/cmds/help.sh new file mode 100644 index 00000000..8fedd0ea --- /dev/null +++ b/home-manager/lf/cmds/help.sh @@ -0,0 +1,10 @@ +#!/bin/sh +# shellcheck disable=SC2086 +# shellcheck source=/dev/null +. ~/.local/lib/shell/lib + + +cat ~/.config/lf/lfrc + + +if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manager/lf/cmds/mk_dir.sh b/home-manager/lf/cmds/mk_dir.sh new file mode 100644 index 00000000..bfa0627d --- /dev/null +++ b/home-manager/lf/cmds/mk_dir.sh @@ -0,0 +1,12 @@ +#!/bin/sh +# shellcheck disable=SC2086 +# shellcheck source=/dev/null +. ~/.local/lib/shell/lib + + +readp "Directory Name: " ans +mkdir $ans + + + +if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manager/lf/cmds/mk_file.sh b/home-manager/lf/cmds/mk_file.sh new file mode 100644 index 00000000..044016a6 --- /dev/null +++ b/home-manager/lf/cmds/mk_file.sh @@ -0,0 +1,11 @@ +#!/bin/sh +# shellcheck disable=SC2086 +# shellcheck source=/dev/null +. ~/.local/lib/shell/lib + + +readp "File Name: " name +$EDITOR "$name" + + +if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manager/lf/cmds/mk_ln.sh b/home-manager/lf/cmds/mk_ln.sh new file mode 100644 index 00000000..71a70a36 --- /dev/null +++ b/home-manager/lf/cmds/mk_ln.sh @@ -0,0 +1,43 @@ +#!/bin/sh +# shellcheck disable=SC2086 +# shellcheck source=/dev/null +. ~/.local/lib/shell/lib + +while IFS= read -r i;do + set -- "$@" "$i" +done < "$(tmp "cat ~/.local/share/lf/files")" + +mode="$1" +shift + +if [ "$#" -lt 1 ]; then + msg "no files to link" + exit 0 +fi + + +case "$mode" in + copy) + while [ "$#" -gt 0 ]; do + file=$1 + ans="$(basename "$file")" + + while ls -a "$(pwd)" | grep --word-regexp "$ans" > /dev/null;do + printf "\"%s\" already exists, new name for link: " "$ans" + read -r ans + done + + ln -s "$file" "$(pwd)/$ans" + + + shift + done + ;; +esac +rm ~/.local/share/lf/files +# lf -remote "send clear" + + + + +if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manager/lf/cmds/mk_scr.sh b/home-manager/lf/cmds/mk_scr.sh new file mode 100644 index 00000000..b6c17458 --- /dev/null +++ b/home-manager/lf/cmds/mk_scr.sh @@ -0,0 +1,29 @@ +#!/bin/sh +# shellcheck disable=SC2086 +# shellcheck source=/dev/null +. ~/.local/lib/shell/lib + +star=$(mktmp) +cat << EOF > $star +#!/bin/sh +# shellcheck disable=SC2086 +# shellcheck source=/dev/null +. ~/.local/lib/shell/lib + + + + + +if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi +EOF + +readp "Script Name: " script_name +scr="$(pwd)"/"$script_name" + +[ -e $scr ] && die "$script_name exitst, exiting.." + +cat "$star" > $scr +chmod +x $scr +if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi + +$VISUAL $scr diff --git a/home-manager/lf/cmds/open.sh b/home-manager/lf/cmds/open.sh new file mode 100644 index 00000000..8376be21 --- /dev/null +++ b/home-manager/lf/cmds/open.sh @@ -0,0 +1,16 @@ +#!/bin/sh +# shellcheck disable=SC2086 +# shellcheck source=/dev/null +. ~/.local/lib/shell/lib + + +case $(file --mime-type "$f" -bL) in + text/*|application/json) $EDITOR "$f";; + image/*) $IVIEWER "$f";; + *) xdg-open "$f" ;; +esac + + + + +if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manager/lf/cmds/open_config.sh b/home-manager/lf/cmds/open_config.sh new file mode 100644 index 00000000..93c174d7 --- /dev/null +++ b/home-manager/lf/cmds/open_config.sh @@ -0,0 +1,10 @@ +#!/bin/sh +# shellcheck disable=SC2086 +# shellcheck source=/dev/null +. ~/.local/lib/shell/lib + +$EDITOR "$(bookmenu -b ~/.config/bookmenu/configs -f fzf -o)" + + + +if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manager/lf/cmds/restore_trash.sh b/home-manager/lf/cmds/restore_trash.sh new file mode 100644 index 00000000..432e9e9b --- /dev/null +++ b/home-manager/lf/cmds/restore_trash.sh @@ -0,0 +1,10 @@ +#!/bin/sh +# shellcheck disable=SC2086 +# shellcheck source=/dev/null +. ~/.local/lib/shell/lib + + +trash-restore + + +if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manager/lf/cmds/set_wall_paper.sh b/home-manager/lf/cmds/set_wall_paper.sh new file mode 100644 index 00000000..4599de2a --- /dev/null +++ b/home-manager/lf/cmds/set_wall_paper.sh @@ -0,0 +1,15 @@ +#!/bin/sh +# shellcheck disable=SC2086 +# shellcheck source=/dev/null +. ~/.local/lib/shell/lib + + +die "No yet implemented" +#sed -i "s,export AWMWALLPAPER='.*',export AWMWALLPAPER='${f}'," ${ZDOTDIR}/.zshenv +#swaybg -i "$f" & +#feh --bg-max --no-fehbg "$f" + + + + +if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manager/lf/cmds/stripspace.sh b/home-manager/lf/cmds/stripspace.sh new file mode 100644 index 00000000..c7f68767 --- /dev/null +++ b/home-manager/lf/cmds/stripspace.sh @@ -0,0 +1,10 @@ +#!/bin/sh +# shellcheck disable=SC2086 +# shellcheck source=/dev/null +. ~/.local/lib/shell/lib + + +stripspace "$f" + + +if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manager/lf/cmds/sudo_mk_file.sh b/home-manager/lf/cmds/sudo_mk_file.sh new file mode 100644 index 00000000..1f06a92f --- /dev/null +++ b/home-manager/lf/cmds/sudo_mk_file.sh @@ -0,0 +1,13 @@ +#!/bin/sh +# shellcheck disable=SC2086 +# shellcheck source=/dev/null +. ~/.local/lib/shell/lib + + +readp "File Name: " ans +sudo $EDITOR "$ans" + + + + +if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manager/lf/cmds/trash.sh b/home-manager/lf/cmds/trash.sh new file mode 100644 index 00000000..4598b4fd --- /dev/null +++ b/home-manager/lf/cmds/trash.sh @@ -0,0 +1,27 @@ +#!/bin/sh +# shellcheck disable=SC2086 +# shellcheck source=/dev/null +. ~/.local/lib/shell/lib + +files=$(printf "$fx" | tr '\n' ';') + +while [ "$files" ]; do + # extract the substring from start of string up to delimiter. + # this is the first "element" of the string. + file=${files%%;*} + + trash-put "$(basename "$file")" + # if there's only one element left, set `files` to an empty string. + # this causes us to exit this `while` loop. + # else, we delete the first "element" of the string from files, and move onto the next. + if [ "$files" = "$file" ]; then + files='' + else + files="${files#*;}" + fi +done + + + + +if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manager/lf/cmds/unarchive.sh b/home-manager/lf/cmds/unarchive.sh new file mode 100644 index 00000000..47a713fa --- /dev/null +++ b/home-manager/lf/cmds/unarchive.sh @@ -0,0 +1,22 @@ +#!/bin/sh +# shellcheck disable=SC2086 +# shellcheck source=/dev/null +. ~/.local/lib/shell/lib + + +# extract the current file with the right command +# (xkcd link: https://xkcd.com/1168/) +set -f +case "$f" in + *.tar.bz|*.tar.bz2|*.tbz|*.tbz2) tar xjvf $f;; + *.tar.gz|*.tgz) tar xzvf $f;; + *.tar.xz|*.txz) tar xJvf $f;; + *.zip) unzip $f;; + *.rar) unrar x $f;; + *.7z) 7z x $f;; + *) warning "Unsupported format" ;; +esac + + + +if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manager/lf/colors b/home-manager/lf/colors new file mode 100644 index 00000000..c4b6417b --- /dev/null +++ b/home-manager/lf/colors @@ -0,0 +1,196 @@ +# vim:ft=dircolors +# (This is not a dircolors file but it helps to highlight colors and comments) + +# default values from dircolors +# (entries with a leading # are not implemented in lf) +# #no 00 # NORMAL +# fi 00 # FILE +# #rs 0 # RESET +# di 01;34 # DIR +# ln 01;36 # LINK +# #mh 00 # MULTIHARDLINK +# pi 40;33 # FIFO +# so 01;35 # SOCK +# #do 01;35 # DOOR +# bd 40;33;01 # BLK +# cd 40;33;01 # CHR +# or 40;31;01 # ORPHAN +# #mi 00 # MISSING +# su 37;41 # SETUID +# sg 30;43 # SETGID +# #ca 30;41 # CAPABILITY +# tw 30;42 # STICKY_OTHER_WRITABLE +# ow 34;42 # OTHER_WRITABLE +# st 37;44 # STICKY +# ex 01;32 # EXEC + +# default values from lf (with matching order) +# ln 01;36 # LINK +# or 31;01 # ORPHAN +# tw 01;34 # STICKY_OTHER_WRITABLE +# ow 01;34 # OTHER_WRITABLE +# st 01;34 # STICKY +# di 01;34 # DIR +# pi 33 # FIFO +# so 01;35 # SOCK +# bd 33;01 # BLK +# cd 33;01 # CHR +# su 01;32 # SETUID +# sg 01;32 # SETGID +# ex 01;32 # EXEC +# fi 00 # FILE + + +# file types (with matching order) +ln 01;33 # LINK +#ln 01;34 # LINK +or 01;35;46 # ORPHAN +tw 35 # STICKY_OTHER_WRITABLE +ow 35 # OTHER_WRITABLE +st 01;36 # STICKY +di 01;36 # DIR +pi 33 # FIFO +so 01;35 # SOCK +bd 33;01 # BLK +cd 33;01 # CHR +su 01;32 # SETUID +sg 01;32 # SETGID +ex 01;31;44 # EXEC +fi 00 # FILE + +# links +# ~/.librewolf 01;34 +~/.cups 01;34 +~/.mozilla 01;34 +#~/.pki 01;34 +~/.ssh 01;34 +#~/.lesskey 01;34 +#~/.pulse-cookie 01;34 + +~/.steampid 01;34 +~/.steam 01;34 +~/.steampath 01;34 + +# nix +~/.nix-profile 01;34 +~/.nix-defexpr 01;34 + +# can now be removed +~/.indentconfig.yaml 01;34 + +# archives or compressed (dircolors defaults) +*.tar 01;31 +*.tgz 01;31 +*.arc 01;31 +*.arj 01;31 +*.taz 01;31 +*.lha 01;31 +*.lz4 01;31 +*.lzh 01;31 +*.lzma 01;31 +*.tlz 01;31 +*.txz 01;31 +*.tzo 01;31 +*.t7z 01;31 +*.zip 01;31 +*.z 01;31 +*.dz 01;31 +*.gz 01;31 +*.lrz 01;31 +*.lz 01;31 +*.lzo 01;31 +*.xz 01;31 +*.zst 01;31 +*.tzst 01;31 +*.bz2 01;31 +*.bz 01;31 +*.tbz 01;31 +*.tbz2 01;31 +*.tz 01;31 +*.deb 01;31 +*.rpm 01;31 +*.jar 01;31 +*.war 01;31 +*.ear 01;31 +*.sar 01;31 +*.rar 01;31 +*.alz 01;31 +*.ace 01;31 +*.zoo 01;31 +*.cpio 01;31 +*.7z 01;31 +*.rz 01;31 +*.cab 01;31 +*.wim 01;31 +*.swm 01;31 +*.dwm 01;31 +*.esd 01;31 + +# image formats (dircolors defaults) +*.jpg 01;35 +*.jpeg 01;35 +*.mjpg 01;35 +*.mjpeg 01;35 +*.gif 01;35 +*.bmp 01;35 +*.pbm 01;35 +*.pgm 01;35 +*.ppm 01;35 +*.tga 01;35 +*.xbm 01;35 +*.xpm 01;35 +*.tif 01;35 +*.tiff 01;35 +*.png 01;35 +*.svg 01;35 +*.svgz 01;35 +*.mng 01;35 +*.pcx 01;35 +*.mov 01;35 +*.mpg 01;35 +*.mpeg 01;35 +*.m2v 01;35 +*.mkv 01;35 +*.webm 01;35 +*.ogm 01;35 +*.mp4 01;35 +*.m4v 01;35 +*.mp4v 01;35 +*.vob 01;35 +*.qt 01;35 +*.nuv 01;35 +*.wmv 01;35 +*.asf 01;35 +*.rm 01;35 +*.rmvb 01;35 +*.flc 01;35 +*.avi 01;35 +*.fli 01;35 +*.flv 01;35 +*.gl 01;35 +*.dl 01;35 +*.xcf 01;35 +*.xwd 01;35 +*.yuv 01;35 +*.cgm 01;35 +*.emf 01;35 +*.ogv 01;35 +*.ogx 01;35 + +# audio formats (dircolors defaults) +*.aac 00;36 +*.au 00;36 +*.flac 00;36 +*.m4a 00;36 +*.mid 00;36 +*.midi 00;36 +*.mka 00;36 +*.mp3 00;36 +*.mpc 00;36 +*.ogg 00;36 +*.ra 00;36 +*.wav 00;36 +*.oga 00;36 +*.opus 00;36 +*.spx 00;36 +*.xspf 00;36 diff --git a/home-manager/lf/default.nix b/home-manager/lf/default.nix new file mode 100644 index 00000000..fd8c4b39 --- /dev/null +++ b/home-manager/lf/default.nix @@ -0,0 +1,200 @@ +{ + config, + pkgs, + ... +}: let + shell = file: + "\${{" + builtins.readFile "${file}" + "}}"; # closes the lf tui + pipe = file: + "%{{" + builtins.readFile "${file}" + "}}"; # runs the command in the ui,term bar + async = file: + "&{{" + builtins.readFile "${file}" + "}}"; # runs the command in the background + wait = file: + "!{{" + builtins.readFile "${file}" + "}}"; # adds a prompt after the command has run +in { + home-manager.xdg.configFile."lf/icons" = { + target = "lf/icons"; + source = "./icons"; + }; + home-manager.xdg.configFile."lf/colors" = { + target = "lf/colors"; + source = "./colors"; + }; + + home-manager.programs.lf = { + enable = true; + + commands = { + help = shell "./cmds/help.sh"; + open = shell "./cmds/open.sh"; + mk_dir = pipe "./cmds/mk_dir.sh"; + mk_scr = shell "./cmds/mk_scr.sh"; + mk_file = shell "./cmds/mk_file.sh"; + chmod = pipe "./cmds/chmod.sh"; + mk_ln = shell "./cmds/mk_ln.sh"; # TODO could be pipe, right? + sudo_mk_file = shell "./cmds/sudo_mk_file.sh"; + set_wall_paper = pipe "./cmds/set_wall_paper.sh"; + fzf_jump = shell "./cmds/fzf_jump.sh"; + broot_jump = shell "./cmds/broot_jump.sh"; + open_config = shell "./cmds/open_config.sh"; + + dragon = pipe "./cmds/dragon.sh"; + dragon_stay = pipe "./cmds/dragon_stay.sh"; + dragon_individual = pipe "./cmds/dragon_individual.sh"; + dl_file = pipe "./cmds/dl_file.sh"; + + unarchive = pipe "./cmds/unarchive.sh"; + archive = pipe "./cmds/archive.sh"; + + trash = pipe "./cmds/trash.sh"; + clear_trash = pipe "./cmds/clear_trash.sh"; + restore_trash = shell "./cmds/restore_trash.sh"; + + stripspace = pipe "./cmds/stripspace.sh"; + }; + keybindings = { + # Remove some defaults + m = null; + "'" = null; + #" = null; # TODO + d = null; + c = null; + e = null; + j = null; + k = null; + l = null; + ";" = null; + + # File Openers + ee = "\$\$EDITOR \"$f\""; + u = "%\$IVIEWER \"$f\""; + cc = "\$sudo -e \"$f\""; + + # Archive Mappings + au = "unarchive"; + a = "archive"; + + # Trash Mappings + dd = "trash"; + jc = "clear_trash"; + jr = "restore_trash"; + + # Broot Mapping + f = "broot_jump"; + + # Dragon Mapping + dr = "dragon"; + ds = "dragon-stay"; + di = "dragon-individual"; + #dm = "mvdragon"; + #dc = "cpdragon"; + dl = "dlfile"; + + ss = "stripspace"; + + # Vim keys + h = "updir"; + t = "down"; + n = "up"; + s = "open"; + + # Basic Functions + bn = "help"; + kk = "mklkn"; + "." = "set hidden!"; + DD = "delete"; + p = "paste"; + x = "cut"; + y = "copy"; + "" = "open"; + mf = "mkfile"; + mr = "sudomkfile"; + md = "mkdir"; + ms = "mkscr"; + ch = "chmod"; + bg = "setwallpaper"; + o = "open_config"; + br = "\$vimv \$fx"; # TODO what is this command? + r = "rename"; + H = "top"; + L = "bottom"; + R = "reload"; + C = "clear"; + U = "unselect"; + + # Movement + gjr = "cd ~/.local/share/Trash/files"; + gus = "cd /run/dt"; + + "gr." = "cd /home/dt/repos"; + grr = "cd /home/dt/repos/rust"; + grp = "cd /home/dt/repos/python"; + grc = "cd /home/dt/repos/c"; + gra = "cd /home/dt/repos/auto_hot_key"; + grt = "cd /home/dt/repos/tex"; + grs = "cd /home/dt/repos/shell"; + + grch = "cd /home/dt/repos/chroot"; + grpe = "cd /home/dt/repos/perl"; + grja = "cd /home/dt/repos/java"; + grjs = "cd /home/dt/repos/java_script"; + # ------------- + "gm." = "cd /home/dt/media"; + gmpi = "cd /home/dt/media/pictures"; + gmdo = "cd /home/dt/media/downloads"; + gmpl = "cd /home/dt/media/playlist"; + gmis = "cd /home/dt/media/isos"; + # ------------- + "gs." = "cd /home/dt/school"; + gsgs = "cd /home/dt/school/geschichte"; + gsch = "cd /home/dt/school/chemie"; + gsen = "cd /home/dt/school/english"; + gsgo = "cd /home/dt/school/geographie"; + gsin = "cd /home/dt/school/infomatik"; + gsso = "cd /home/dt/school/sozialkunde"; + gskr = "cd /home/dt/school/katholische_religion"; + gsmu = "cd /home/dt/school/musik"; + gsla = "cd /home/dt/school/latein"; + gsde = "cd /home/dt/school/deutsch"; + gsma = "cd /home/dt/school/mathematik"; + gspr = "cd /home/dt/school/praktikum"; + gsbi = "cd /home/dt/school/biologie"; + gssp = "cd /home/dt/school/sport"; + gsphy = "cd /home/dt/school/physik"; + gsphi = "cd /home/dt/school/philosophie"; + + gc = "cd ~/.config"; + gl = "cd ~/.local"; + gE = "cd /etc"; + + "gU." = "cd /usr"; + gUs = " cd /usr/share"; + + gt = "cd /tmp"; + }; + previewer = { + keybinding = "i"; + source = "ctpv"; + }; + settings = { + cleaner = "ctpvclear"; + autoquit = true; # quit the server, if no clients are left + dircounts = true; # count things in directories TODO this has performance impact + dirpreviews = true; # preview for directories + drawbox = true; + errorfmt = "\\033[1;91m==> ERROR:\\033[0m\\033[1;93m%s\\033[0m"; + hidden = true; # show hidden files + icons = true; + ifs = "\n"; # internal field separator for shell commands + info = ["size"]; # show the size of a directory + shell = "sh"; + shellopts = ["-e" "-u"]; # e: exit on error; u: error for unset variables + }; + extraConfig = '' + &ctpv -s $id + &ctpvquit $id + ''; + }; +} +# vim: ts=2 + diff --git a/home-manager/lf/icons b/home-manager/lf/icons new file mode 100644 index 00000000..68d53e34 --- /dev/null +++ b/home-manager/lf/icons @@ -0,0 +1,357 @@ +# vim:ft=conf + +# These examples require Nerd Fonts or a compatible font to be used. +# See https://www.nerdfonts.com for more information. + +# default values from lf (with matching order) +# ln l # LINK +# or l # ORPHAN +# tw t # STICKY_OTHER_WRITABLE +# ow d # OTHER_WRITABLE +# st t # STICKY +# di d # DIR +# pi p # FIFO +# so s # SOCK +# bd b # BLK +# cd c # CHR +# su u # SETUID +# sg g # SETGID +# ex x # EXEC +# fi - # FILE + +# file types (with matching order) +ln  # LINK +or  # ORPHAN +tw t # STICKY_OTHER_WRITABLE +ow  # OTHER_WRITABLE +st t # STICKY +di  # DIR +pi p # FIFO +so s # SOCK +bd b # BLK +cd c # CHR +su u # SETUID +sg g # SETGID +ex  # EXEC +fi  # FILE + +# file extensions (vim-devicons) +*.styl  +*.sass  +*.scss  +*.htm  +*.html  +*.slim  +*.haml  +*.ejs  +*.css  +*.less  +*.md  +*.mdx  +*.markdown  +*.rmd  +*.json  +*.webmanifest  +*.js  +*.mjs  +*.jsx  +*.rb  +*.gemspec  +*.rake  +*.php  +*.py  +*.pyc  +*.pyo  +*.pyd  +*.coffee  +*.mustache  +*.hbs  +*.conf  +*.ini  +*.yml  +*.yaml  +*.toml  +*.bat  +*.mk  +*.jpg  +*.jpeg  +*.bmp  +*.png  +*.webp  +*.gif  +*.ico  +*.twig  +*.cpp  +*.c++  +*.cxx  +*.cc  +*.cp  +*.c  +*.cs  +*.h  +*.hh  +*.hpp  +*.hxx  +*.hs  +*.lhs  +*.nix  +*.lua  +*.java  +*.sh  +*.fish  +*.bash  +*.zsh  +*.ksh  +*.csh  +*.awk  +*.ps1  +*.ml λ +*.mli λ +*.diff  +*.db  +*.sql  +*.dump  +*.clj  +*.cljc  +*.cljs  +*.edn  +*.scala  +*.go  +*.dart  +*.xul  +*.sln  +*.suo  +*.pl  +*.pm  +*.t  +*.rss  +'*.f#'  +*.fsscript  +*.fsx  +*.fs  +*.fsi  +*.rs  +*.rlib  +*.d  +*.erl  +*.hrl  +*.ex  +*.exs  +*.eex  +*.leex  +*.heex  +*.vim  +*.ai  +*.psd  +*.psb  +*.ts  +*.tsx  +*.jl  +*.pp  +*.vue ﵂ +*.elm  +*.swift  +*.xcplayground  +*.tex ﭨ +*.r ﳒ +*.rproj 鉶 +*.sol ﲹ +*.pem  + +# file names (vim-devicons) (case-insensitive not supported in lf) +*gruntfile.coffee  +*gruntfile.js  +*gruntfile.ls  +*gulpfile.coffee  +*gulpfile.js  +*gulpfile.ls  +*mix.lock  +*dropbox  +*.ds_store  +*.gitconfig  +*.gitignore  +*.gitattributes  +*.gitlab-ci.yml  +*.bashrc  +*.zshrc  +*.zshenv  +*.zprofile  +*.vimrc  +*.gvimrc  +*_vimrc  +*_gvimrc  +*.bashprofile  +*favicon.ico  +*license  +*node_modules  +*react.jsx  +*procfile  +*dockerfile  +*docker-compose.yml  +*rakefile  +*config.ru  +*gemfile  +*makefile  +*cmakelists.txt  +*robots.txt ﮧ + +# file names (case-sensitive adaptations) +*Gruntfile.coffee  +*Gruntfile.js  +*Gruntfile.ls  +*Gulpfile.coffee  +*Gulpfile.js  +*Gulpfile.ls  +*Dropbox  +*.DS_Store  +*LICENSE  +*React.jsx  +*Procfile  +*Dockerfile  +*Docker-compose.yml  +*Rakefile  +*Gemfile  +*Makefile  +*CMakeLists.txt  + +# file patterns (vim-devicons) (patterns not supported in lf) +# .*jquery.*\.js$  +# .*angular.*\.js$  +# .*backbone.*\.js$  +# .*require.*\.js$  +# .*materialize.*\.js$  +# .*materialize.*\.css$  +# .*mootools.*\.js$  +# .*vimrc.*  +# Vagrantfile$  + +# file patterns (file name adaptations) +*jquery.min.js  +*angular.min.js  +*backbone.min.js  +*require.min.js  +*materialize.min.js  +*materialize.min.css  +*mootools.min.js  +*vimrc  +Vagrantfile  + +# archives or compressed (extensions from dircolors defaults) +*.tar  +*.tgz  +*.arc  +*.arj  +*.taz  +*.lha  +*.lz4  +*.lzh  +*.lzma  +*.tlz  +*.txz  +*.tzo  +*.t7z  +*.zip  +*.z  +*.dz  +*.gz  +*.lrz  +*.lz  +*.lzo  +*.xz  +*.zst  +*.tzst  +*.bz2  +*.bz  +*.tbz  +*.tbz2  +*.tz  +*.deb  +*.rpm  +*.jar  +*.war  +*.ear  +*.sar  +*.rar  +*.alz  +*.ace  +*.zoo  +*.cpio  +*.7z  +*.rz  +*.cab  +*.wim  +*.swm  +*.dwm  +*.esd  + +# image formats (extensions from dircolors defaults) +*.jpg  +*.jpeg  +*.mjpg  +*.mjpeg  +*.gif  +*.bmp  +*.pbm  +*.pgm  +*.ppm  +*.tga  +*.xbm  +*.xpm  +*.tif  +*.tiff  +*.png  +*.svg  +*.svgz  +*.mng  +*.pcx  +*.mov  +*.mpg  +*.mpeg  +*.m2v  +*.mkv  +*.webm  +*.ogm  +*.mp4  +*.m4v  +*.mp4v  +*.vob  +*.qt  +*.nuv  +*.wmv  +*.asf  +*.rm  +*.rmvb  +*.flc  +*.avi  +*.fli  +*.flv  +*.gl  +*.dl  +*.xcf  +*.xwd  +*.yuv  +*.cgm  +*.emf  +*.ogv  +*.ogx  + +# audio formats (extensions from dircolors defaults) +*.aac  +*.au  +*.flac  +*.m4a  +*.mid  +*.midi  +*.mka  +*.mp3  +*.mpc  +*.ogg  +*.ra  +*.wav  +*.oga  +*.opus  +*.spx  +*.xspf  + +# other formats +*.pdf  diff --git a/home-manager/mako/default.nix b/home-manager/mako/default.nix new file mode 100644 index 00000000..30a11930 --- /dev/null +++ b/home-manager/mako/default.nix @@ -0,0 +1,46 @@ +{ + config, + pkgs, + ... +}: { + home-manager.programs.mako = { + enable = true; + backgroudColor = "#2e3440"; + borderColor = "#88c0d0"; + borderRadius = 25; + borderSize = 2; + defaultTimeout = 5000; + font = "Source Code Pro 10"; + width = 500; + height = 500; + icons = true; + ignore-timeout = true; + layer = "overlay"; + markup = true; # TODO + maxIconSize = 64; + sort = "-time"; + extraConfig = '' + [urgency=low] + border-color=#cccccc + + [urgency=normal] + border-color=#d08770 + + [urgency=high] + border-size=3 + border-color=#bf616a + default-timeout=0 + + [urgency=critical] + border-size=4 + border-color=#bf616a + default-timeout=0 + + [category=mpd] + default-timeout=2000 + group-by=category + ''; + }; +} +# vim: ts=2 + diff --git a/home-manager/mpd/default.nix b/home-manager/mpd/default.nix new file mode 100644 index 00000000..02b94d0e --- /dev/null +++ b/home-manager/mpd/default.nix @@ -0,0 +1,30 @@ +{ + config, + pkgs, + ... +}: let + dataDir = "$XDG_DATA_HOME/mpd"; +in { + home-manager.services.mpd = { + enable = true; + inherit dataDir; + musicDirectory = "~/media/music"; + network = { + listenAddress = "${dataDir}/socket"; + }; + extraConfig = '' + metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc,comment" + auto_update "yes" + + #database { + # plugin "simple" + # path "~/.local/share/mpd/db + # cache_directory "~/.local/share/mpd/cache" + #} + + filesystem_charset "UTF-8" + ''; + }; +} +# vim: ts=2 + diff --git a/home-manager/mpd/mpdconf.example b/home-manager/mpd/mpdconf.example new file mode 100644 index 00000000..eaa5e641 --- /dev/null +++ b/home-manager/mpd/mpdconf.example @@ -0,0 +1,418 @@ +# An example configuration file for MPD. +# Read the user manual for documentation: http://www.musicpd.org/doc/user/ + + +# Files and directories ####################################################### +# +# This setting controls the top directory which MPD will search to discover the +# available audio files and add them to the daemon's online database. This +# setting defaults to the XDG directory, otherwise the music directory will be +# be disabled and audio files will only be accepted over ipc socket (using +# file:// protocol) or streaming files over an accepted protocol. +# +#music_directory "~/music" +# +# This setting sets the MPD internal playlist directory. The purpose of this +# directory is storage for playlists created by MPD. The server will use +# playlist files not created by the server but only if they are in the MPD +# format. This setting defaults to playlist saving being disabled. +# +#playlist_directory "~/.mpd/playlists" +# +# This setting sets the location of the MPD database. This file is used to +# load the database at server start up and store the database while the +# server is not up. This setting defaults to disabled which will allow +# MPD to accept files over ipc socket (using file:// protocol) or streaming +# files over an accepted protocol. +# +#db_file "~/.mpd/database" + +# These settings are the locations for the daemon log files for the daemon. +# +# The special value "syslog" makes MPD use the local syslog daemon. This +# setting defaults to logging to syslog. +# +# If you use systemd, do not configure a log_file. With systemd, MPD +# defaults to the systemd journal, which is fine. +# +#log_file "~/.mpd/log" + +# This setting sets the location of the file which stores the process ID +# for use of mpd --kill and some init scripts. This setting is disabled by +# default and the pid file will not be stored. +# +# If you use systemd, do not configure a pid_file. +# +#pid_file "~/.mpd/pid" + +# This setting sets the location of the file which contains information about +# most variables to get MPD back into the same general shape it was in before +# it was brought down. This setting is disabled by default and the server +# state will be reset on server start up. +# +#state_file "~/.mpd/state" +# +# The location of the sticker database. This is a database which +# manages dynamic information attached to songs. +# +#sticker_file "~/.mpd/sticker.sql" +# +############################################################################### + + +# General music daemon options ################################################ +# +# This setting specifies the user that MPD will run as. MPD should never run as +# root and you may use this setting to make MPD change its user ID after +# initialization. This setting is disabled by default and MPD is run as the +# current user. +# +#user "nobody" +# +# This setting specifies the group that MPD will run as. If not specified +# primary group of user specified with "user" setting will be used (if set). +# This is useful if MPD needs to be a member of group such as "audio" to +# have permission to use sound card. +# +#group "nogroup" +# +# This setting sets the address for the daemon to listen on. Careful attention +# should be paid if this is assigned to anything other than the default, any. +# This setting can deny access to control of the daemon. Not effective if +# systemd socket activation is in use. +# +# For network +#bind_to_address "any" +# +# And for Unix Socket +#bind_to_address "~/.mpd/socket" +# +# This setting is the TCP port that is desired for the daemon to get assigned +# to. +# +#port "6600" +# +# Suppress all messages below the given threshold. Use "verbose" for +# troubleshooting. Available setting arguments are "notice", "info", "verbose", +# "warning" and "error". +# +#log_level "notice" +# +# Setting "restore_paused" to "yes" puts MPD into pause mode instead +# of starting playback after startup. +# +#restore_paused "no" +# +# This setting enables MPD to create playlists in a format usable by other +# music players. +# +#save_absolute_paths_in_playlists "no" +# +# This setting defines a list of tag types that will be extracted during the +# audio file discovery process. The complete list of possible values can be +# found in the user manual. +#metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc" +# +# This example just enables the "comment" tag without disabling all +# the other supported tags: +#metadata_to_use "+comment" +# +# This setting enables automatic update of MPD's database when files in +# music_directory are changed. +# +#auto_update "yes" +# +# Limit the depth of the directories being watched, 0 means only watch +# the music directory itself. There is no limit by default. +# +#auto_update_depth "3" +# +############################################################################### + + +# Symbolic link behavior ###################################################### +# +# If this setting is set to "yes", MPD will discover audio files by following +# symbolic links outside of the configured music_directory. +# +#follow_outside_symlinks "yes" +# +# If this setting is set to "yes", MPD will discover audio files by following +# symbolic links inside of the configured music_directory. +# +#follow_inside_symlinks "yes" +# +############################################################################### + + +# Zeroconf / Avahi Service Discovery ########################################## +# +# If this setting is set to "yes", service information will be published with +# Zeroconf / Avahi. +# +#zeroconf_enabled "yes" +# +# The argument to this setting will be the Zeroconf / Avahi unique name for +# this MPD server on the network. %h will be replaced with the hostname. +# +#zeroconf_name "Music Player @ %h" +# +############################################################################### + + +# Permissions ################################################################# +# +# If this setting is set, MPD will require password authorization. The password +# setting can be specified multiple times for different password profiles. +# +#password "password@read,add,control,admin" +# +# This setting specifies the permissions a user has who has not yet logged in. +# +#default_permissions "read,add,control,admin" +# +############################################################################### + + +# Database ####################################################################### +# +# An example of a database section instead of the old 'db_file' setting. +# It enables mounting other storages into the music directory. +# +#database { +# plugin "simple" +# path "~/.local/share/mpd/db +# cache_directory "~/.local/share/mpd/cache" +#} +# +# An example of database config for a satellite setup +# +#music_directory "nfs://fileserver.local/srv/mp3" +#database { +# plugin "proxy" +# host "other.mpd.host" +# port "6600" +#} + +# Input ####################################################################### +# +input { + plugin "curl" +# proxy "proxy.isp.com:8080" +# proxy_user "user" +# proxy_password "password" +} + +# +############################################################################### + +# Audio Output ################################################################ +# +# MPD supports various audio output types, as well as playing through multiple +# audio outputs at the same time, through multiple audio_output settings +# blocks. Setting this block is optional, though the server will only attempt +# autodetection for one sound card. +# +# An example of an ALSA output: +# +#audio_output { +# type "alsa" +# name "My ALSA Device" +## device "hw:0,0" # optional +## mixer_type "hardware" # optional +## mixer_device "default" # optional +## mixer_control "PCM" # optional +## mixer_index "0" # optional +#} +# +# An example of an OSS output: +# +#audio_output { +# type "oss" +# name "My OSS Device" +## device "/dev/dsp" # optional +## mixer_type "hardware" # optional +## mixer_device "/dev/mixer" # optional +## mixer_control "PCM" # optional +#} +# +# An example of a shout output (for streaming to Icecast): +# +#audio_output { +# type "shout" +# encoder "vorbis" # optional +# name "My Shout Stream" +# host "localhost" +# port "8000" +# mount "/mpd.ogg" +# password "hackme" +# quality "5.0" +# bitrate "128" +# format "44100:16:1" +## protocol "icecast2" # optional +## user "source" # optional +## description "My Stream Description" # optional +## url "http://example.com" # optional +## genre "jazz" # optional +## public "no" # optional +## timeout "2" # optional +## mixer_type "software" # optional +#} +# +# An example of a recorder output: +# +#audio_output { +# type "recorder" +# name "My recorder" +# encoder "vorbis" # optional, vorbis or lame +# path "/var/lib/mpd/recorder/mpd.ogg" +## quality "5.0" # do not define if bitrate is defined +# bitrate "128" # do not define if quality is defined +# format "44100:16:1" +#} +# +# An example of a httpd output (built-in HTTP streaming server): +# +#audio_output { +# type "httpd" +# name "My HTTP Stream" +# encoder "vorbis" # optional, vorbis or lame +# port "8000" +# bind_to_address "0.0.0.0" # optional, IPv4 or IPv6 +## quality "5.0" # do not define if bitrate is defined +# bitrate "128" # do not define if quality is defined +# format "44100:16:1" +# max_clients "0" # optional 0=no limit +#} +# +# An example of a pulseaudio output (streaming to a remote pulseaudio server) +# +#audio_output { +# type "pulse" +# name "My Pulse Output" +## server "remote_server" # optional +## sink "remote_server_sink" # optional +## media_role "media_role" #optional +#} +# +# An example of a winmm output (Windows multimedia API). +# +#audio_output { +# type "winmm" +# name "My WinMM output" +## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional +# or +## device "0" # optional +## mixer_type "hardware" # optional +#} +# +# An example of a wasapi output (Windows multimedia API). +# +#audio_output { +# type "wasapi" +# name "My WASAPI output" +## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional +# or +## device "0" # optional +## Exclusive mode blocks all other audio source, and get best audio quality without resampling. +## exclusive "no" # optional +## Enumerate all devices in log. +## enumerate "no" # optional +#} +# +# An example of an openal output. +# +#audio_output { +# type "openal" +# name "My OpenAL output" +## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional +#} +# +# An example of an sndio output. +# +#audio_output { +# type "sndio" +# name "sndio output" +# mixer_type "hardware" +#} +# +# An example of an OS X output: +# +#audio_output { +# type "osx" +# name "My OS X Device" +## device "Built-in Output" # optional +## channel_map "-1,-1,0,1" # optional +#} +# +## Example "pipe" output: +# +#audio_output { +# type "pipe" +# name "my pipe" +# command "aplay -f cd 2>/dev/null" +## Or if you're want to use AudioCompress +# command "AudioCompress -m | aplay -f cd 2>/dev/null" +## Or to send raw PCM stream through PCM: +# command "nc example.org 8765" +# format "44100:16:2" +#} +# +## An example of a null output (for no audio output): +# +#audio_output { +# type "null" +# name "My Null Output" +# mixer_type "none" # optional +#} +# +############################################################################### + + +# Normalization automatic volume adjustments ################################## +# +# This setting specifies the type of ReplayGain to use. This setting can have +# the argument "off", "album", "track" or "auto". "auto" is a special mode that +# chooses between "track" and "album" depending on the current state of +# random playback. If random playback is enabled then "track" mode is used. +# See for +# more details about ReplayGain. +# This setting is off by default. +# +#replaygain "album" +# +# This setting sets the pre-amp used for files that have ReplayGain tags. By +# default this setting is disabled. +# +#replaygain_preamp "0" +# +# This setting sets the pre-amp used for files that do NOT have ReplayGain tags. +# By default this setting is disabled. +# +#replaygain_missing_preamp "0" +# +# This setting enables or disables ReplayGain limiting. +# MPD calculates actual amplification based on the ReplayGain tags +# and replaygain_preamp / replaygain_missing_preamp setting. +# If replaygain_limit is enabled MPD will never amplify audio signal +# above its original level. If replaygain_limit is disabled such amplification +# might occur. By default this setting is enabled. +# +#replaygain_limit "yes" +# +# This setting enables on-the-fly normalization volume adjustment. This will +# result in the volume of all playing audio to be adjusted so the output has +# equal "loudness". This setting is disabled by default. +# +#volume_normalization "no" +# +############################################################################### + +# Character Encoding ########################################################## +# +# If file or directory names do not display correctly for your locale then you +# may need to modify this setting. +# +#filesystem_charset "UTF-8" +# +############################################################################### diff --git a/home-manager/mpd/test.TODO b/home-manager/mpd/test.TODO new file mode 100644 index 00000000..6225d8fd --- /dev/null +++ b/home-manager/mpd/test.TODO @@ -0,0 +1 @@ +# TODO this still needs some client diff --git a/home-manger/alacritty/default.nix b/home-manger/alacritty/default.nix deleted file mode 100644 index 1bb6afac..00000000 --- a/home-manger/alacritty/default.nix +++ /dev/null @@ -1,583 +0,0 @@ -{config, ...}: { - home-manager.users.soispha.programs.alacritty = { - enable = true; - settings = { - env = { - TERM = "alacritty"; - }; - window = { - dimensionns = { - columns = 0; - lines = 0; - }; - - positinon = { - #x = 0; - #y = 0; - }; - - padding = { - x = 5; - y = 5; - }; - - dynamic_padding = false; - decorations = "None"; - opacity = 0.9; - startup_mode = "Windowed"; - title = "Alacritty"; - dynamic_title = true; - class = { - instance = "Alacritty"; - general = "Alacritty"; - }; - docorations_theme_variant = "None"; - }; - - scrolling = { - history = 10000; - multiplier = 3; - }; - - font = { - normal = { - family = "Source Code Pro"; - style = "Regular"; - }; - bold = { - family = "Source Code Pro"; - style = "Bold"; - }; - italic = { - family = "Source Code Pro"; - style = "Italic"; - }; - bold_italic = { - family = "Source Code Pro"; - style = "Bold Italic"; - }; - size = 12.0; - offset = { - x = -1; - y = -1; - }; - glyph_offset = { - x = -1; - y = -1; - }; - builtin_box_drawing = true; - }; - - draw_bold_text_with_bright_colors = false; - - colors = { - primary = { - background = "#191919"; - foreground = "#d8dee9"; - #dim_foreground= "#828482"; - #bright_foreground= "#eaeaea"; - - cursor = { - text = "#191919"; - cursor = "#d8dee9"; - }; - vi_mode_cursor = { - text = "CellBackground"; - cursor = "CellForeground"; - }; - search = { - matches = { - foreground = "#000000"; - background = "#ffffff"; - }; - focused_match = { - foreground = "#ffffff"; - background = "#000000"; - }; - }; - - hints = { - start = { - foreground = "#1d1f21"; - background = "#e9ff5e"; - }; - - end = { - foreground = "#e9ff5e"; - background = "#1d1f21"; - }; - line_indicator = { - #foreground= "None"; - #background= "None"; - }; - - footer_bar = { - background = "#c5c8c6"; - foreground = "#1d1f21"; - }; - - selection = { - text = "#191919"; - background = "#d8dee9"; - }; - - normal = { - black = "#191919"; - red = "#b02626"; - green = "#40a62f"; - yellow = "#f2e635"; - blue = "#314ad0"; - magenta = "#b30ad0"; - cyan = "#32d0fc"; - white = "#acadb1"; - }; - bright = { - black = "#36393d"; - red = "#ce2727"; - green = "#47c930"; - yellow = "#fff138"; - blue = "#2e4bea"; - magenta = "#cc15ed"; - cyan = "#54d9ff"; - white = "#dbdbdb"; - }; - - dim = { - black = "#676f78"; - red = "#b55454"; - green = "#78a670"; - yellow = "#faf380"; - blue = "#707fd0"; - magenta = "#c583d0"; - cyan = "#8adaf1"; - white = "#e0e3e7"; - }; - - #indexed_colors = [ - # {index = 16; color = "#ff00ff";} - # ]; - transparent_background_colors = false; # TODO - }; - }; - - bell = { - animation = "EaseOutExpo"; - duration = 0; - color = "#ffffff"; - command = "None"; - }; - - selection = { - semantic_escape_chars = ",│`|:\"' ()[]{}<>\t"; - save_to_clipboard = false; - }; - - cursor = { - style = { - shape = "Beam"; - blinking = "On"; - }; - vi_mode_style = "None"; - blink_interval = 750; - blink_timeout = 5; - unfocused_hollow = true; - thickness = 0.15; - }; - live_config_reload = true; - - #shell = { - # program = "/bin/sh"; - # args = ["--login"]; - #} - - working_directory = "None"; - - ipc_socket = true; # TODO - - mouse = { - hide_when_typing = false; - double_click.threshold = 300; - triple_click.threshold = 300; - }; - - hints = { - alphabet = "jfkdls;ahgurieowpq"; - enabled = [ - { - regex = "(ipfs:|ipns:|magnet:|mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)\ - [^\u0000-\u001F\u007F-\u009F<>\"\\s{-}\\^⟨⟩`]+"; - hyperlinks = true; - command = "xdg-open"; - post_processing = true; - mouse = { - enabled = true; - mods = "None"; - }; - binding = { - key = "U"; - mods = "Control|Shift"; - }; - } - - { - # multi regex for different purposes: - # 2. UUIDs - # 3. hex (for example signatures) - # 4. IP addresses - regex = "([[:alnum:]_$%&+=/@-]+)|([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})|([0-9a-f]{12,128})|([[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3})"; - action = "Copy"; - post_processing = false; - binding = { - key = "U"; - mods = "Control|Shift"; - }; - } - ]; - - mouse_bindings = [ - # { mouse = "Right"; action = "ExpandSelection" ;} - # { mouse = "Right"; mods = "Control"; action = "ExpandSelection" ;} - # { mouse = "Middle"; mode = "~Vi"; action = "PasteSelection" ;} - { - mouse = "Middle"; - action = "Copy"; - } - ]; - - key_bindings = [ - # (Windows, Linux, and BSD only) - { - key = "P"; - mods = "Control"; - action = "Paste"; - } - { - key = "Insert"; - mods = "Shift"; - action = "Paste"; - } - { - key = "Slash"; - mods = "Control"; - chars = "gc"; - } - { - key = "Y"; - mods = "Control"; - action = "Copy"; - } - { - key = "Key0"; - mods = "Control"; - action = "ResetFontSize"; - } - { - key = "Equals"; - mods = "Control"; - action = "IncreaseFontSize"; - } - { - key = "Plus"; - mods = "Control"; - action = "IncreaseFontSize"; - } - { - key = "Minus"; - mods = "Control"; - action = "DecreaseFontSize"; - } - # Vi Mode - { - key = "Space"; - mods = "Control"; - action = "ToggleViMode"; - } - { - key = "Space"; - mods = "Control"; - mode = "Vi"; - action = "ScrollToBottom"; - } - { - key = "I"; - mode = "Vi"; - action = "ScrollToBottom"; - } - { - key = "I"; - mode = "Vi"; - action = "ToggleViMode"; - } - { - key = "C"; - mods = "Control"; - mode = "Vi"; - action = "ScrollToBottom"; - } - { - key = "C"; - mods = "Control"; - mode = "Vi"; - action = "ToggleViMode"; - } - { - key = "Escape"; - mode = "Vi"; - action = "ClearSelection"; - } - { - key = "Y"; - mods = "Control"; - mode = "Vi"; - action = "ScrollLineUp"; - } - { - key = "E"; - mods = "Control"; - mode = "Vi"; - action = "ScrollLineDown"; - } - { - key = "G"; - mode = "Vi"; - action = "ScrollToTop"; - } - { - key = "G"; - mods = "Shift"; - mode = "Vi"; - action = "ScrollToBottom"; - } - { - key = "B"; - mods = "Control"; - mode = "Vi"; - action = "ScrollPageUp"; - } - { - key = "F"; - mods = "Control"; - mode = "Vi"; - action = "ScrollPageDown"; - } - { - key = "U"; - mods = "Control"; - mode = "Vi"; - action = "ScrollHalfPageUp"; - } - { - key = "D"; - mods = "Control"; - mode = "Vi"; - action = "ScrollHalfPageDown"; - } - { - key = "Y"; - mode = "Vi"; - action = "Copy"; - } - { - key = "Y"; - mode = "Vi"; - action = "ClearSelection"; - } - { - key = "V"; - mode = "Vi"; - action = "ToggleNormalSelection"; - } - { - key = "V"; - mods = "Shift"; - mode = "Vi"; - action = "ToggleLineSelection"; - } - { - key = "V"; - mods = "Control"; - mode = "Vi"; - action = "ToggleBlockSelection"; - } - { - key = "V"; - mods = "Alt"; - mode = "Vi"; - action = "ToggleSemanticSelection"; - } - { - key = "Return"; - mode = "Vi"; - action = "Open"; - } - { - key = "K"; - mode = "Vi"; - action = "Up"; - } - { - key = "J"; - mode = "Vi"; - action = "Down"; - } - { - key = "H"; - mode = "Vi"; - action = "Left"; - } - { - key = "L"; - mode = "Vi"; - action = "Right"; - } - { - key = "Up"; - mode = "Vi"; - action = "Up"; - } - { - key = "Down"; - mode = "Vi"; - action = "Down"; - } - { - key = "Left"; - mode = "Vi"; - action = "Left"; - } - { - key = "Right"; - mode = "Vi"; - action = "Right"; - } - { - key = "Key0"; - mode = "Vi"; - action = "First"; - } - { - key = "Key4"; - mode = "Vi"; - action = "Last"; - } - { - key = "Key6"; - mods = "Shift"; - mode = "Vi"; - action = "FirstOccupied"; - } - { - key = "H"; - mods = "Shift"; - mode = "Vi"; - action = "High"; - } - { - key = "M"; - mods = "Shift"; - mode = "Vi"; - action = "Middle"; - } - { - key = "L"; - mods = "Shift"; - mode = "Vi"; - action = "Low"; - } - { - key = "B"; - mode = "Vi"; - action = "SemanticLeft"; - } - { - key = "W"; - mode = "Vi"; - action = "SemanticRight"; - } - { - key = "E"; - mode = "Vi"; - action = "SemanticRightEnd"; - } - { - key = "B"; - mods = "Shift"; - mode = "Vi"; - action = "WordLeft"; - } - { - key = "W"; - mods = "Shift"; - mode = "Vi"; - action = "WordRight"; - } - { - key = "E"; - mods = "Shift"; - mode = "Vi"; - action = "WordRightEnd"; - } - { - key = "Key5"; - mods = "Shift"; - mode = "Vi"; - action = "Bracket"; - } - { - key = "Slash"; - mode = "Vi"; - action = "SearchForward"; - } - { - key = "Slash"; - mods = "Shift"; - mode = "Vi"; - action = "SearchBackward"; - } - { - key = "N"; - mode = "Vi"; - action = "SearchNext"; - } - { - key = "N"; - mods = "Shift"; - mode = "Vi"; - action = "SearchPrevious"; - } - ]; - }; - }; - - #debug: - # Display the time it takes to redraw each frame. - #render_timer: false - - # Keep the log file after quitting Alacritty. - #persistent_logging: false - - # Log level - # - # Values for `log_level`: - # - Off - # - Error - # - Warn - # - Info - # - Debug - # - Trace - #log_level: Warn - - # Renderer override. - # - glsl3 - # - gles2 - # - gles2_pure - #renderer: None - - # Print all received window events. - #print_events: false - - # Highlight window damage information. - #highlight_damage: false - }; - }; -} diff --git a/home-manger/cups/default.nix b/home-manger/cups/default.nix deleted file mode 100644 index f86fa806..00000000 --- a/home-manger/cups/default.nix +++ /dev/null @@ -1,3 +0,0 @@ -{config, ...}: { - home-manager.xdg.configFile."cups/lpoptions".text = "Default Brother\n"; -} diff --git a/home-manger/default.nix b/home-manger/default.nix deleted file mode 100644 index ffec4ccc..00000000 --- a/home-manger/default.nix +++ /dev/null @@ -1,29 +0,0 @@ -# vim: ts=2 -{ - config, - pkgs, - home-manager, - ... -}: { - imports = [ - home-manager.nixosModules.home-manger - - ./alacritty - ./cups - ./firefox - ./gammastep - ./git - ./grades - ./gtk - ./keepassxc - ./latexindent - ./less - ./lf - ./mako - ./mpd - ]; - - home-manager.users.soispha = { - home.packages = []; - }; -} diff --git a/home-manger/firefox/chrome/userChrome.css b/home-manger/firefox/chrome/userChrome.css deleted file mode 100644 index 0b3aff77..00000000 --- a/home-manger/firefox/chrome/userChrome.css +++ /dev/null @@ -1,41 +0,0 @@ -/* thickness of tab when you have too many open tabs */ -.tabbrowser-tab:not([pinned="true"]) { - min-width: 10px !important; - min-height: 10px !important; -} - -/* tab height -#TabsToolbar .tabbrowser-tabs { -min-height: 10px !important; -} -*/ - -/* -.tabbrowser-tab {min-width: 016px !important;} -.tabbrowser-tab {clip-width: 016px !important;} -*/ - -/* the + button that opens new tabs */ -#TabsToolbar .tabs-newtab-button { - margin-left: 10px !important; - height: Auto !important; -} - -#main-window[privatebrowsingmode="temporary"] #navigator-toolbox { - background-color: #c40944 !important; -} - -/* close button inside a tab */ -.tab-close-button * { - width: 10px !important; - height: 10px !important; -} - -/* bookmark toolbar */ -#personal-bookmarks .bookmark-item > .toolbarbutton-text { - font-size: 10pt !important; -} -#personal-bookmarks .bookmark-item > .toolbarbutton-icon { - height: 12px !important; - width: 12px !important; -} diff --git a/home-manger/firefox/default.nix b/home-manger/firefox/default.nix deleted file mode 100644 index 5e9b9632..00000000 --- a/home-manger/firefox/default.nix +++ /dev/null @@ -1,220 +0,0 @@ -# vim: ts=2 -{ - config, - pkgs, - lib, - stdenv, - ... -}: let - user_js_override = "./settings/override.js"; - user_js = lib.runCommand "user.js" {} '' - mkdir $out; - ${config.inputs.strip_js_comments}/bin ${config.inputs.user_js} > $out/user.js; - cat ${user_js_override} >> $out/user.js; - sed 's/user_pref(\(.*\)",\(.*\));/\1" = \2;/' $out/user.js > $out/user.nix; - ''; - - # source: https://gitlab.com/rycee/nur-expressions/-/blob/master/pkgs/firefox-addons/default.nix - buildFirefoxXpiAddon = { - pname, - version, - addonId, - url, - sha256, - meta, - ... - }: - builtins.stdenv.mkDerivation { - name = "${pname}-${version}"; - - inherit meta; - - src = builtins.fetchurl {inherit url sha256;}; - - preferLocalBuild = true; - allowSubstitutes = true; - - buildCommand = '' - dst="$out/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}" - mkdir -p "$dst" - install -v -m644 "$src" "$dst/${addonId}.xpi" - ''; - }; - - settings = - pkgs.lib.recursiveUpdate - { - # Allow my custom css - "toolkit.legacyUserProfileCustomizations.stylesheets" = true; - - # might improve performance TODO - "gfx.webrender.all" = true; - - # disable updates (pretty pointless with nix) - "extensions.update.autoUpdateDefault" = false; - "extensions.update.enabled" = false; - "app.update.channel" = "default"; - - "browser.ctrlTab.recentlyUsedOrder" = false; - - "browser.download.useDownloadDir" = true; - "browser.download.dir" = "${config.user.soisha.home}/media/downloads"; - "browser.download.folderList" = 2; # TODO - "browser.download.viewableInternally.typeWasRegistered.svg" = true; - "browser.download.viewableInternally.typeWasRegistered.webp" = true; - "browser.download.viewableInternally.typeWasRegistered.xml" = true; - - # TODO what does this do? - "browser.search.widget.inNavBar" = true; - - "browser.shell.checkDefaultBrowser" = false; - "browser.tabs.loadInBackground" = true; - "browser.urlbar.placeholderName" = "Brave"; - - "general.autoScroll" = true; - - # Set the tabs and bookmarks - "browser.tabs.inTitlebar" = 1; - "browser.toolbars.bookmarks.visibility" = "always"; - - # Theme - "extensions.activeThemeID" = "firefox-alpenglow@mozilla.org"; - "extensions.extensions.activeThemeID" = "firefox-alpenglow@mozilla.org"; - - # highlight all entries when searching - "findbar.highlightAll" = true; - - # TODO - #"extensions.webcompat.enable_picture_in_picture_overrides" = true; - #"extensions.webcompat.enable_shims" = true; - #"extensions.webcompat.perform_injections" = true; - #"extensions.webcompat.perform_ua_overrides" = true; - - # onlykey / copied from a yubikey config - #"security.webauth.u2f" = true; - #"security.webauth.webauthn" = true; - #"security.webauth.webauthn_enable_softtoken" = true; - #"security.webauth.webauthn_enable_usbtoken" = true; - } - builtins.readFile - "${user_js}/user.nix"; -in { - home-manager.users.${config.soisha.user.username} = { - packages = [ - pkgs.firefox-wayland - ]; - sessionVariables = { - # improve touch input & make scrolling smother - MOZ_USE_XINPUT2 = "1"; - # improve wayland support - MOZ_ENABLE_WAYLAND = 1; - XDG_CURRENT_DESKTOP = "river"; - }; - xdg.mimeApps = { - enable = true; - defaultApplications = { - "text/html" = ["firefox.desktop"]; - "x-scheme-handler/http" = ["firefox.desktop"]; - "x-scheme-handler/https" = ["firefox.desktop"]; - "x-scheme-handler/about" = ["firefox.desktop"]; - "x-scheme-handler/unknown" = ["firefox.desktop"]; - }; - }; - programs.firefox = { - enable = true; - package = pkgs.firefox; - extensions = builtins.map buildFirefoxXpiAddon (lib.attrValues (lib.importJSON ./extensions.json)); - profile."default" = { - isDefault = true; - id = 0; - name = "default"; - - userChrome = builtins.readFile "./chrome/userChrome.css"; - - search = { - default = "Brave Search"; - force = true; - - engines = { - "Brave Search" = { - urls = [{template = "https://search.brave.com/search?q={searchTerms}";}]; - iconUpdateURL = "https://cdn.search.brave.com/serp/v1/static/brand/8eabe183f0d1f2cb3e2916b7b20c310efd196d740c8cecd341732fcd396fb665-apple-touch-icon.png"; - updateInterval = 24 * 60 * 60 * 1000; # every day - definedAliases = ["@bs"]; - }; - - "Nix Packages" = { - urls = [ - { - template = "https://search.nixos.org/packages"; - params = [ - { - name = "type"; - value = "packages"; - } - { - name = "query"; - value = "{searchTerms}"; - } - ]; - } - ]; - - icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - definedAliases = ["@np"]; - }; - - "NixOS Wiki" = { - urls = [{template = "https://nixos.wiki/index.php?search={searchTerms}";}]; - iconUpdateURL = "https://nixos.wiki/favicon.png"; - updateInterval = 24 * 60 * 60 * 1000; # every day - definedAliases = ["@nw"]; - }; - "Bing".metaData.hidden = true; - "Google".metaData.hidden = true; - "Amazon.de".metaData.hidden = true; - }; - }; - - bookmarks = [ - { - name = "Rust::std"; - # TODO - url = "file:///home/dt/.local/share/rustup/toolchains/stable-x86_64-unknown-linux-gnu/share/doc/rust/html/std/all.html"; - } - - { - name = "Feed - Piped"; - url = "https://piped.kavin.rocks/feed"; - } - - { - name = "DeepL Translate"; - url = "https://www.deepl.com/translator#en/de/test"; - } - - { - name = "Google Scholar"; - url = "https://scholar.google.com/"; - } - - { - name = "ArchWiki"; - url = "https://wiki.archlinux.org/"; - } - - { - name = "Arch Package "; - url = "https://archlinux.org/packages/"; - } - - { - name = "layout.css.devPixelsPerPx"; - url = "about:config"; - } - ]; - inherit settings; - }; - }; - }; -} diff --git a/home-manger/firefox/extensions.json b/home-manger/firefox/extensions.json deleted file mode 100644 index a7673612..00000000 --- a/home-manger/firefox/extensions.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "darkreader": { - "pname": "darkreader", - "version": "4.9.62", - "addonId": "addon@darkreader.org", - "url": "https://addons.mozilla.org/firefox/downloads/file/4053589/darkreader-4.9.62.xpi", - "sha256": "sha256:e537a2cee45ed7c26f79ecd3ed362620e3f00d24c158532a58e163a63a3d60cc" - }, - "firenvim": { - "pname": "firenvim", - "version": "0.2.14", - "addonId": "firenvim@lacamb.re", - "url": "https://addons.mozilla.org/firefox/downloads/file/4026386/firenvim-0.2.14.xpi", - "sha256": "sha256:a8c495a59e30eaabbb3fcd188db9b5e28b40bffefe41a3f0fa22ecc58c80c2b6" - }, - "keepassxc-browser": { - "pname": "keepassxc-browser", - "version": "1.8.4", - "addonId": "keepassxc-browser@keepassxc.org", - "url": "https://addons.mozilla.org/firefox/downloads/file/4045866/keepassxc_browser-1.8.4.xpi", - "sha256": "sha256:cc39aa058cb8915cfc88424e2e1cebe3ccfc3f95d7bddb2abd0c4905d2b17719" - }, - "simple-tab-groups": { - "pname": "simple-tab-groups", - "version": "4.7.2.1", - "addonId": "simple-tab-groups@drive4ik", - "url": "https://addons.mozilla.org/firefox/downloads/file/3873608/simple_tab_groups-4.7.2.1.xpi", - "sha256": "sha256:75077589098ca62c00b86cf9554c6120bf8dc04c5f916fe26f84915f5147b2a4" - } -} \ No newline at end of file diff --git a/home-manger/firefox/generate-extension.py b/home-manger/firefox/generate-extension.py deleted file mode 100755 index cfb73542..00000000 --- a/home-manger/firefox/generate-extension.py +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env python -# source: https://github.com/etu/nixconfig/blob/ba47d577c8bfb4a1c06927c34ece34118f4a0460/modules/graphical/firefox/generate.py - -from concurrent.futures import ThreadPoolExecutor -import json -import os -import requests - -EXTENSIONS = sorted([ - "darkreader", - "firenvim", - "keepassxc-browser", - "simple-tab-groups", -]) - -def index_ext(ext: str): - print(f"Indexing {ext}...") - - resp = requests.get(f"https://addons.mozilla.org/api/v5/addons/addon/{ext}/").json() - rel = resp["current_version"] - - if not rel["file"]["hash"].startswith("sha256:"): - raise ValueError("Unhandled hash type") - - return { - "pname": ext, - "version": rel["version"], - "addonId": resp["guid"], - "url": rel["file"]["url"], - "sha256": rel["file"]["hash"], - } - -if __name__ == "__main__": - outfile = os.path.dirname(os.path.realpath(__file__)) + "/extensions.json" - - with ThreadPoolExecutor() as e: - extensions = {ext: e.submit(index_ext, ext) for ext in EXTENSIONS} - extensions = {k: v.result() for k, v in extensions.items()} - - with open(outfile, "w") as f: - json.dump(extensions, f, indent=2) diff --git a/home-manger/firefox/settings.nix b/home-manger/firefox/settings.nix deleted file mode 100644 index f38e23b3..00000000 --- a/home-manger/firefox/settings.nix +++ /dev/null @@ -1,660 +0,0 @@ -{config, ...}: { - settings = { - accessibility.typeaheadfind.flashBar = 0; - - app = { - normandy = { - first_run = false; - migrationsApplied = 12; - startupRolloutPrefs.extensions.webcompat.disabled_shims.AdvertisingDotCom = true; - user_id = "9b445ee0-1055-4b05-ad18-cdcfd8d15cdb"; - }; - - update.lastUpdateTime = { - addon-background-update-timer = 1675712908; - browser-cleanup-thumbnails = 1675795148; - recipe-client-addon-run = 1675774559; - region-update-timer = 1675779021; - rs-experiment-loader-timer = 1675777057; - search-engine-update-timer = 1675777177; - services-settings-poll-changes = 1675710065; - telemetry_modules_ping = 1675779141; - xpi-signature-verification = 1675706945; - }; - }; - - browser = { - anchor_color = "#57e389"; - - bookmarks = { - editDialog.confirmationHintShowCount = 3; - restore_default_bookmarks = false; - }; - - contentblocking = { - category = "custom"; - cfr-milestone.milestone-achieved = 10000; - report.hide_vpn_banner = true; - }; - - contextual-services.contextId = "{c840a4ea-6278-46b7-bb56-21d7faab57dd}"; - - discovery.enabled = false; - - display = { - background_color = "#551a8b"; - foreground_color = "#ffbe6f"; - use_system_colors = true; - }; - - download = { - dir = "/home/dt/media/downloads"; - folderList = 2; - lastDir = "/home/dt/media/downloads"; - panel.shown = true; - viewableInternally.typeWasRegistered.avif = true; - viewableInternally.typeWasRegistered.webp = true; - }; - - eme.ui.firstContentShown = true; - - engagement = { - ctrlTab.has-used = true; - downloads-button.has-used = true; - }; - - firefox-view.feature-tour = { - message = "FIREFOX_VIEW_FEATURE_TOUR"; - screen = ""; - complete = true; - }; - - firefox-view.view-count = 1; - - laterrun.bookkeeping = { - profileCreationTime = 1654872928; - sessionCount = 39; - }; - - migration.version = 133; - - newtabpage = { - activity-stream = { - impressionId = "{ade7a2f2-7d8f-49b0-a684-d2bb3bda1e09}"; - improvesearch.topSiteSearchShortcuts.havePinned = "google"; - }; - pinned = "[]"; - storageVersion = 1; - }; - - pageActions.persistedActions = { - ids = ["bookmark"]; - idsInUrlbar = ["bookmark"]; - idsInUrlbarPreProton = []; - version = 1; - }; - - pagethumbnails.storage_version = 3; - - protections_panel.infoMessage.seen = true; - - proton.toolbar.version = 3; - - region.update.updated = 1675779022; - - "rights.3.shown" = true; - - safebrowsing.provider = { - google4.lastupdatetime = "1675794837495"; - google4.nextupdatetime = "1675796650495"; - mozilla.lastupdatetime = "1675795004767"; - mozilla.nextupdatetime = "1675816604767"; - }; - - search = { - region = "DE"; - separatePrivateDefault.urlbarResult.enabled = false; - }; - - sessionstore.upgradeBackup.latestBuildID = "20230130183437"; - - shell.mostRecentDateSetAsDefault = "1675756595"; - - startup = { - couldRestoreSession.count = 1; - homepage_override.buildID = "20230130183437"; - homepage_override.mstone = "109.0.1"; - lastColdStartupCheck = 1675756594; - page = 3; - upgradeDialog.version = 106; - }; - - tabs.inTitlebar = 1; - - toolbars.bookmarks.visibility = "always"; - - uiCustomization.state = { - placements = { - widget-overflow-fixed-list = []; - unified-extensions-area = ["yt_pause_example_com-browser-action" "_762f9885-5a13-4abd-9c77-433dcd38b8fd_-browser-action"]; - - nav-bar = [ - "back-button" - "forward-button" - "stop-reload-button" - "urlbar-container" - "save-to-pocket-button" - "downloads-button" - "fxa-toolbar-menu-button" - "enhancerforyoutube_maximerf_addons_mozilla_org-browser-action" - "plasma-browser-integration_kde_org-browser-action" - "tab-stash_condordes_net-browser-action" - "addon_darkreader_org-browser-action" - "vim-vixen_i-beam_org-browser-action" - "simple-tab-groups_drive4ik-browser-action" - "e2933bff1d77b6ea81b2df1dda992244e7892b6c_temporary-addon-browser-action" - "74a30c85e187d69156225de1c415366fafa84866_temporary-addon-browser-action" - "e6fd60f4f456c06312d75c0eceabef8ee0c28bbb_temporary-addon-browser-action" - "addon_example_com-browser-action" - "pause_example_com-browser-action" - "stackoverflowtweakstools_richard_com-browser-action" - "keepassxc-browser_keepassxc_org-browser-action" - "firenvim_lacamb_re-browser-action" - ]; - - toolbar-menubar = ["menubar-items"]; - - TabsToolbar = ["tabbrowser-tabs" "new-tab-button" "alltabs-button"]; - PersonalToolbar = ["personal-bookmarks"]; - - seen = [ - "save-to-pocket-button" - "enhancerforyoutube_maximerf_addons_mozilla_org-browser-action" - "plasma-browser-integration_kde_org-browser-action" - "developer-button" - "tab-stash_condordes_net-browser-action" - "addon_darkreader_org-browser-action" - "vim-vixen_i-beam_org-browser-action" - "simple-tab-groups_drive4ik-browser-action" - "_762f9885-5a13-4abd-9c77-433dcd38b8fd_-browser-action" - "e2933bff1d77b6ea81b2df1dda992244e7892b6c_temporary-addon-browser-action" - "74a30c85e187d69156225de1c415366fafa84866_temporary-addon-browser-action" - "e6fd60f4f456c06312d75c0eceabef8ee0c28bbb_temporary-addon-browser-action" - "addon_example_com-browser-action" - "pause_example_com-browser-action" - "yt_pause_example_com-browser-action" - "stackoverflowtweakstools_richard_com-browser-action" - "keepassxc-browser_keepassxc_org-browser-action" - "firenvim_lacamb_re-browser-action" - ]; - dirtyAreaCache = ["nav-bar" "toolbar-menubar" "PersonalToolbar" "unified-extensions-area"]; - currentVersion = 18; - newElementCount = 6; - browser = { - urlbar = { - quicksuggest = { - migrationVersion = 2; - scenario = "history"; - }; - tabToSearch.onboard.interactionsLeft = 0; - tipShownCount.searchTip_onboard = 4; - }; - visited_color = "#cdab8f"; - }; - - datareporting.policy = { - dataSubmissionPolicyAcceptedVersion = 2; - dataSubmissionPolicyNotifiedTime = "1655649367480"; - }; - - devtools = { - aboutdebugging = { - collapsibilities.processes = false; - tmpExtDirPath = "/home/dt/repos/javascript/firefox-extension/YouTube-Extension"; - }; - - debugger = { - pending-selected-location = { - sourceId = "source-file=///home/dt/repos/web/i5/test/silas.html"; - line = 0; - column = 0; - sourceActorId = "server0.conn0.windowGlobal423054278666/source25"; - url = "file=///home/dt/repos/web/i5/test/silas.html"; - }; - prefs-schema-version = 11; - }; - everOpened = true; - netmonitor = { - columnsData = [ - { - name = "status"; - minWidth = 30; - width = 6.67; - } - { - name = "method"; - minWidth = 30; - width = 6.67; - } - { - name = "domain"; - minWidth = 30; - width = 13.33; - } - { - name = "file"; - minWidth = 30; - width = 33.32; - } - { - name = "url"; - minWidth = 30; - width = 25; - } - { - name = "initiator"; - minWidth = 30; - width = 13.33; - } - { - name = "type"; - minWidth = 30; - width = 6.67; - } - { - name = "transferred"; - minWidth = 30; - width = 13.33; - } - { - name = "contentSize"; - minWidth = 30; - width = 6.67; - } - { - name = "waterfall"; - minWidth = 150; - width = 11.11; - } - ]; - customRequest = { - "method" = "GET"; - "url" = ""; - "urlQueryParams" = []; - "headers" = []; - "postBody" = ""; - }; - msg.visibleColumns = ["data" "time"]; - panes-search-height = 1175; - panes-search-width = 466; - }; - performance.recording = { - entries = 134217728; - features = ["screenshots" "js" "cpu"]; - threads = ["GeckoMain" "Compositor" "Renderer" "DOM Worker"]; - }; - - selfxss.count = 5; - - toolbox = { - alwaysOnTop = false; - footer.height = 692; - host = "right"; - previousHost = "bottom"; - selectedTool = "webconsole"; - sidebar.width = 699; - splitconsoleEnabled = true; - }; - - toolsidebar-height.inspector = 350; - "toolsidebar-width.inspector" = 244; # TODO - toolsidebar-width.inspector.splitsidebar = 0; - - webconsole.filter = { - css = true; - filter = { - net = true; - netxhr = true; - }; - - input = { - editor = true; - editorOnboarding = false; - }; - - persistlog = true; - timestampMessages = true; - }; - }; - distribution = { - archlinux.bookmarksProcessed = true; - iniFile.exists = { - appversion = "109.0.1"; - value = true; - }; - }; - - doh-rollout = { - balrog-migration-done = true; - doneFirstRun = true; - home-region = "DE"; - }; - - dom = { - forms.autocomplete.formautofill = true; - push.userAgentID = "5e34b02066224519abd755189f802422"; - security.https_only_mode_ever_enabled = true; - }; - - extensions = { - activeThemeID = "default-theme@mozilla.org"; - blocklist.pingCountVersion = -1; - databaseSchema = 35; - formautofill.creditCards.used = 2; - getAddons = { - cache.lastUpdate = 1675712909; - databaseSchema = 6; - }; - - lastAppBuildId = "20230130183437"; - lastAppVersion = "109.0.1"; - - lastPlatformVersion = "109.0.1"; - - pendingOperations = false; - pictureinpicture.enable_picture_in_picture_overrides = true; - systemAddonSet = { - "schema" = 1; - "addons" = {}; - }; - ui = { - dictionary.hidden = true; - extension.hidden = false; - lastCategory = "addons://list/extension"; - locale.hidden = true; - sitepermission.hidden = true; - theme.hidden = false; - }; - - webcompat = { - enable_shims = true; - perform_injections = true; - perform_ua_overrides = true; - }; - - webextensions = { - ExtensionStorageIDB.migrated = { - "addon@darkreader.org" = true; - "enhancerforyoutube@maximerf.addons.mozilla.org" = true; - "firenvim@lacamb.re" = true; - "keepassxc-browser@keepassxc.org" = true; - "screenshots@mozilla.org" = true; - "simple-tab-groups@drive4ik" = true; - "{762f9885-5a13-4abd-9c77-433dcd38b8fd}" = true; - }; - uuids = { - "doh-rollout@mozilla.org" = "3830b9af-a7ab-45ae-a10a-df08c432e9f7"; - "formautofill@mozilla.org" = "e05754ff-1fe6-4e78-84dc-f5cc845da180"; - "pictureinpicture@mozilla.org" = "d7135e8a-368e-4f92-bd09-e19c0975de7f"; - "screenshots@mozilla.org" = "6a611696-f2f7-41c4-bb4e-a56eda2447a5"; - "webcompat-reporter@mozilla.org" = "99972218-65f7-4a9a-9f1d-8dcd1f86a563"; - "webcompat@mozilla.org" = "71ce01a8-6fa2-4b21-ba57-59b36478daf6"; - "default-theme@mozilla.org" = "f8e9414d-e977-4d2a-8941-93bf72212b01"; - "addons-search-detection@mozilla.com" = "344d2821-32ec-418f-8665-32c5ae14c40b"; - "google@search.mozilla.org" = "caa826ac-7699-4cdc-9a01-3b35145dbb92"; - "wikipedia@search.mozilla.org" = "ee7a4ba4-10d2-440b-a259-33fc62084480"; - "bing@search.mozilla.org" = "bb80bdc4-bd41-47a8-b9d5-10d4a57f2b2d"; - "ddg@search.mozilla.org" = "2ad38783-b68d-41f2-a76d-c4e800f65d64"; - "amazon@search.mozilla.org" = "aac3e95f-8267-4182-b8a2-2b949160adb7"; - "enhancerforyoutube@maximerf.addons.mozilla.org" = "1ecb30aa-dd3a-4e1c-b405-7400176b683a"; - "@contain-facebook" = "7e386381-dd25-43f7-9fcc-c3f541f2a458"; - "addon@darkreader.org" = "9b7b4403-7e99-4138-a9a9-114b72299253"; - "simple-tab-groups@drive4ik" = "3f29df14-5127-4de4-863c-17846549e474"; - "{762f9885-5a13-4abd-9c77-433dcd38b8fd}" = "3f954cd9-0f14-4595-ba83-4dc0f318e002"; - "e2933bff1d77b6ea81b2df1dda992244e7892b6c@temporary-addon" = "b6ad60ec-a560-427d-aaac-c2c568d69495"; - "pause@example.com" = "87db7ee4-2820-4a56-bb94-9d837886e029"; - "yt_pause@example.com" = "ba2218e1-792e-47a5-99ae-942fc46441fd"; - "keepassxc-browser@keepassxc.org" = "00b8fb40-3ba7-4a33-b086-cb71c5bbe952"; - "firenvim@lacamb.re" = "cf26e07b-4e07-4a42-978f-30f92409ae88"; - }; - }; - }; - - findbar.highlightAll = true; - - fission.experiment.max-origins = { - last-disqualified = 1675596365; - last-qualified = 1675793855; - qualified = false; - }; - - gecko.handlerService.defaultHandlersVersion = 1; - - gfx.blacklist = { - layers.opengl.failureid = "FEATURE_FAILURE_SOFTWARE_GL"; - - "vaapi" = 4; - "vaapi.failureid" = "FEATURE_FAILURE_VAAPI_TEST_FAILED"; - }; - - idle.lastDailyNotification = 1675756850; - - intl.regional_prefs.use_os_locales = true; - - media = { - eme.enabled = true; - - gmp-gmpopenh264 = { - abi = "x86_64-gcc3"; - lastDownload = 1668329402; - lastDownloadFailReason = "Error: Failed downloading via ServiceRequest, status: 0, reason: error"; - lastDownloadFailed = 1666889531; - lastInstallStart = 1668329400; - lastUpdate = 1668329402; - version = "1.8.1.2"; - }; - - gmp-manager = { - buildID = "20230130183437"; - lastCheck = 1675756691; - lastEmptyCheck = 1675756691; - }; - - gmp-widevinecdm = { - abi = "x86_64-gcc3"; - lastDownload = 1674828538; - lastInstallStart = 1674828533; - lastUpdate = 1674828538; - version = "4.10.2557.0"; - }; - - gmp.storage.version.observed = 1; - - videocontrols.picture-in-picture.video-toggle.enabled = false; - }; - - network = { - cookie.cookieBehavior = 1; - http.referer.disallowCrossSiteRelaxingDefault.top_navigation = true; - }; - - pdfjs = { - enabledCache.state = true; - migrationVersion = 2; - }; - - permissions.default = { - camera = 2; - desktop-notification = 2; - geo = 2; - microphone = 2; - xr = 2; - }; - - places.database.lastMaintenance = 1675756852; - - pref.privacy.disable_button = { - tracking_protection_exceptions = false; - view_passwords = false; - }; - - print = { - more-settings.open = true; - print = { - printer_Brother.print_in_color = false; - - printer_Brother_DCP_9022CDW = { - print_duplex = 0; - print_footercenter = ""; - print_footerleft = ""; - print_footerright = ""; - print_headercenter = ""; - print_headerleft = ""; - print_headerright = ""; - print_in_color = false; - }; - }; - - print_printer = "Brother_DCP_9022CDW"; - }; - - privacy = { - annotate_channels.strict_list.enabled = true; - donottrackheader.enabled = true; - partition.network_state.ocsp_cache = true; - - purge_trackers = { - date_in_cookie_database = "0"; - last_purge = "1675756851136"; - }; - - "query_stripping.enabled" = true; # TODO - query_stripping.enabled.pbmode = true; - - restrict3rdpartystorage.rollout.enabledByDefault = true; - - sanitize.pending = [ - { - "id" = "newtab-container"; - "itemsToClear" = []; - "options" = {}; - } - ]; - - trackingprotection = { - enabled = true; - socialtracking.enabled = true; - }; - - userContext = { - enabled = true; - extension = "simple-tab-groups@drive4ik"; - ui.enabled = true; - }; - }; - - security = { - remote_settings = { - crlite_filters.checked = 1656529337; - intermediates.checked = 1656529337; - }; - - sandbox.content.tempDirSuffix = "86b82f75-b18b-4db2-a563-ba4380a07a97"; - }; - - services = { - blocklist = { - addons-mlbf.checked = 1656684436; - gfx.checked = 1656684436; - }; - - settings = { - blocklists = { - addons-bloomfilters.last_check = 1675773838; - gfx.last_check = 1675772639; - }; - - clock_skew_seconds = 0; - last_etag = 1675795222827; - last_update_seconds = 1675795598; - - main = { - addons-manager-settings.last_check = 1675772639; - anti-tracking-url-decoration.last_check = 1675772639; - cfr.last_check = 1675772639; - cookie-banner-rules-list.last_check = 1675772639; - devtools-compatibility-browsers.last_check = 1675772639; - devtools-devices.last_check = 1675772639; - doh-config.last_check = 1675772639; - doh-providers.last_check = 1675772639; - fxmonitor-breaches.last_check = 1675772639; - hijack-blocklists.last_check = 1675772639; - language-dictionaries.last_check = 1675772639; - message-groups.last_check = 1675772639; - ms-images.last_check = 1675772639; - nimbus-desktop-experiments.last_check = 1675793197; - normandy-recipes-capabilities.last_check = 1675772639; - partitioning-exempt-urls.last_check = 1675772639; - password-recipes.last_check = 1675772639; - password-rules.last_check = 1675772639; - personality-provider-models.last_check = 1675772639; - personality-provider-recipe.last_check = 1675772639; - pioneer-study-addons-v1.last_check = 1675772639; - public-suffix-list.last_check = 1675772639; - query-stripping.last_check = 1675772639; - search-config.last_check = 1675772639; - search-default-override-allowlist.last_check = 1675772639; - search-telemetry-v2.last_check = 1675772639; - sites-classification.last_check = 1675772639; - tippytop.last_check = 1675772639; - top-sites.last_check = 1675772639; - url-classifier-skip-urls.last_check = 1675772639; - websites-with-shared-credential-backends.last_check = 1675772639; - whats-new-panel.last_check = 1675772639; - }; - - security-state = { - cert-revocations.last_check = 1675772639; - intermediates.last_check = 1675772639; - onecrl.last_check = 1675772639; - }; - security.onecrl.checked = 1656529337; - }; - - sync = { - clients.lastSync = "0"; - declinedEngines = ""; - globalScore = 0; - nextSync = 0; - tabs.lastSync = "0"; - }; - }; - - signon.rememberSignons = false; - - storage.vacuum.last = { - index = 1; - places.sqlite = 1673364894; - }; - - svg.context-properties.content.enabled = true; - - toolkit = { - legacyUserProfileCustomizations.stylesheets = true; - - startup.last_success = 1675756592; - - telemetry = { - cachedClientID = "7d88e3fb-f77d-4d7e-8aa5-623d7349a4dc"; - pioneer-new-studies-available = true; - reportingpolicy.firstRun = false; - previousBuildID = "20230130183437"; - }; - }; - - trailhead.firstrun.didSeeAboutWelcome = true; - }; - }; - }; - }; -} diff --git a/home-manger/firefox/settings/override.js b/home-manger/firefox/settings/override.js deleted file mode 100644 index 1f92735b..00000000 --- a/home-manger/firefox/settings/override.js +++ /dev/null @@ -1,137 +0,0 @@ -/* - 0100: STARTUP - 0200: GEOLOCATION / LANGUAGE / LOCALE - 0300: QUIETER FOX - 0400: SAFE BROWSING - 0600: BLOCK IMPLICIT OUTBOUND - 0700: DNS / DoH / PROXY / SOCKS / IPv6 - 0800: LOCATION BAR / SEARCH BAR / SUGGESTIONS / HISTORY / FORMS - 0900: PASSWORDS - 1000: DISK AVOIDANCE - 1200: HTTPS (SSL/TLS / OCSP / CERTS / HPKP) - 1400: FONTS - 1600: HEADERS / REFERERS - 1700: CONTAINERS - 2000: PLUGINS / MEDIA / WEBRTC - 2400: DOM (DOCUMENT OBJECT MODEL) - 2600: MISCELLANEOUS - 2700: ETP (ENHANCED TRACKING PROTECTION) - 2800: SHUTDOWN & SANITIZING - 4500: RFP (RESIST FINGERPRINTING) - 5000: OPTIONAL OPSEC - 5500: OPTIONAL HARDENING - 6000: DON'T TOUCH - 7000: DON'T BOTHER - 8000: DON'T BOTHER: FINGERPRINTING - 9000: NON-PROJECT RELATED - 9999: DEPRECATED / REMOVED / LEGACY / RENAMED -*/ - - -// restore session -user_pref("browser.startup.page", 3); // 0102 - -user_pref("browser.startup.homepage", "file:///home/dt/home.html"); // 0103 -user_pref("browser.newtabpage.enabled", true); // 0104 - -// disable the geoservice, TODO don't know if I want this -//user_pref("geo.provider.use_geoclue", false); // 0202 - -// TODO is this something useful? -user_pref("datareporting.policy.dataSubmissionEnabled", true); // 0330 - -// enable health reports -user_pref("datareporting.healthreport.uploadEnabled", true); // 0331 - -// Do I want to opt-out? -user_pref("toolkit.telemetry.coverage.opt-out", false); // 0333 - -// enables studies -user_pref("app.shield.optoutstudies.enabled", true); // 0340 - -// I guess that browsing protection is useful -user_pref("browser.safebrowsing.downloads.remote.enabled", true); // 0403 - -// TODO does this (-> set to false) make things slower? -user_pref("network.prefetch-next", true); // 0601 - -// enable ipv6 because the rest of the system uses it -user_pref("network.dns.disableIPv6", true); // 0701 - -// TRR only -user_pref("network.trr.mode", 3); // 0710 - -// I trust my search engine -user_pref("keyword.enabled", true); // 801 -user_pref("browser.search.suggest.enabled", true); // 0804 -user_pref("browser.urlbar.suggest.searches", true); // 0804 - -// prefetch urls, if the get auto completed -user_pref("browser.urlbar.speculativeConnect.enabled", true); // 0805 - -// TODO I might want to enable this -//user_pref("browser.urlbar.suggest.quicksuggest.nonsponsored", false); // 0807 - -// TODO enable form and search history? -//user_pref("browser.formfill.enable", false); // 0810 - -// disk cache should help performance -user_pref("browser.cache.disk.enable", true); // 1001 - -// store extra session data (form content, cookies and POST data) 0: everywhere -user_pref("browser.sessionstore.privacy_level", 0); // 1003 - -// Disable unsafe passive content (images) on https sites -user_pref("security.mixed_content.block_display_content", true); // 1241 - -// Disable the eme banner -user_pref("browser.eme.ui.enabled", false); // 2022 - -// Don't delete my precious temp files -user_pref("browser.helperApps.deleteTempFileOnExit", false); // 2603 - -// Download to the download dir -user_pref("browser.download.useDownloadDir", true); // 2651 - -// Open the download panel -user_pref("browser.download.alwaysOpenPanel", true); // 2652 - -// Block after custom ruleset -user_pref("browser.contentblocking.category", "custom"); // 2701 - -// set the custome settings // 7016 -user_pref("network.cookie.cookieBehavior", 1); -user_pref("network.http.referer.disallowCrossSiteRelaxingDefault", true); -user_pref("network.http.referer.disallowCrossSiteRelaxingDefault.top_navigation", true); -user_pref("privacy.partition.network_state.ocsp_cache", true); -user_pref("privacy.query_stripping.enabled", true); -user_pref("privacy.trackingprotection.enabled", true); -user_pref("privacy.trackingprotection.socialtracking.enabled", true); -user_pref("privacy.trackingprotection.cryptomining.enabled", true); -user_pref("privacy.trackingprotection.fingerprinting.enabled", true); - - -// I might want to change that, when it hinders session restore -//user_pref("privacy.partition.always_partition_third_party_non_cookie_storage.exempt_sessionstorage", false); // 2720 - -// I like my history very much! -user_pref("privacy.sanitize.sanitizeOnShutdown", false); // 2810 - -// The downsides (light theme + potential breakages): -//user_pref("privacy.resistFingerprinting", true); // 4501 -user_pref("privacy.resistFingerprinting.letterboxing", false); // 4504 - -// I would like to keep my gl, even in the web -user_pref("webgl.disabled", false); // 4520 - -// I like my service workers and am using a service using them. -user_pref("dom.serviceWorkers.enabled", true); // 7017 - -// I've got a password manager already -user_pref("signon.rememberSignons", false); // 5003 - -// Do not track header -user_pref("privacy.donottrackheader.enabled", true); // 7015 - -// TODO no idea what this does, enabling it -user_pref("browser.urlbar.showSearchTerms.enabled", true); // 9004 diff --git a/home-manger/firefox/unzip_mozlz4.py b/home-manger/firefox/unzip_mozlz4.py deleted file mode 100755 index 311fd214..00000000 --- a/home-manger/firefox/unzip_mozlz4.py +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/python -# source: https://unix.stackexchange.com/a/497861 -# Command-line tool to decompress mozLz4 files used for example by Firefox to store various kinds of session backup information. -# Works in both Python 2.7.15 and 3.6.7, as of version 2.1.6 of the LZ4 Python bindings at pypi.org/project/lz4. -# To use in another script, simply cut and paste the import statement and the mozlz4_to_text() function (lines 8 to 17). - -import lz4.block # pip install lz4 --user - - -def mozlz4_to_text(filepath): - # Given the path to a "mozlz4", "jsonlz4", "baklz4" etc. file, - # return the uncompressed text. - bytestream = open(filepath, "rb") - bytestream.read(8) # skip past the b"mozLz40\0" header - valid_bytes = bytestream.read() - text = lz4.block.decompress(valid_bytes) - return text - - -def main(args): - # Given command-line arguments of an input filepath for a ".mozlz4" file - # and optionally an output filepath, write the decompressed text to the - # output filepath. - # Default output filepath is the input filepath minus the last three characters - # (e.g. "foo.jsonlz4" becomes "foo.json") - filepath_in = args[0] - if len(args) < 2: - filepath_out = filepath_in[:-3] - else: - filepath_out = args[1] - text = mozlz4_to_text(filepath_in) - with open(filepath_out, "wb") as outfile: - outfile.write(text) - print("Wrote decompressed text to {}".format(filepath_out)) - - -if __name__ == "__main__": - import sys - args = sys.argv[1:] - if args and not args[0] in ("--help", "-h"): - main(args) - else: - print("Usage: mozlz4.py ") diff --git a/home-manger/gammastep/default.nix b/home-manger/gammastep/default.nix deleted file mode 100644 index 75c5630f..00000000 --- a/home-manger/gammastep/default.nix +++ /dev/null @@ -1,20 +0,0 @@ -{config, ...}: { - home-manager.services.gammastep = { - enable = true; - settings = { - general = { - temp-day = 1300; - temp-night = 1300; - gamma = "0.8:0.8:0.8"; - fade = 0; - adjustment-method = "wayland"; - location-provider = "manual"; - }; - - manual = { - lat = 48.1; - lon = 11.6; - }; - }; - }; -} diff --git a/home-manger/git/default.nix b/home-manger/git/default.nix deleted file mode 100644 index 179c449b..00000000 --- a/home-manger/git/default.nix +++ /dev/null @@ -1,141 +0,0 @@ -{ - config, - pkgs, - ... -}: let - gitTemplateFile = - pkgs.writeText "git_template.git" - '' - # Title: Summary, imperative, start upper case, don't end with a period - # If applied, this commit will - - # Body: Explain *what* and *why* (not *how*). - - - # BREAKING CHANGE: - # Fixes: # - # Refs: # - # Co-authored-by: - - - - # Convention Commits (https://www.conventionalcommits.org/en/v1.0.0/): - # feat: [Features] -> MINOR version bump - # A new feature - # - # fix: [Bug Fixes] -> PATCH version bump - # A bug fix - # - # append '!' after the type/scope: [Breaking Change] -> MAJOR version bump - # A breaking API change - # - # docs: [Documentation] - # Documentation only changes - # - # style: [Styles] - # Changes that do not affect the meaning of the code - # (white-space, formatting, missing semi-colons, etc) - # - # refactor: [Code Refactoring] - # A code change that neither fixes a bug nor adds a feature - # - # perf: [Performance Improvements] -> PATCH version bump - # A code change that improves performance - # - # test: [Tests] - # Adding missing tests or correcting existing tests - # - # build: [Builds] -> PATCH version bump - # Changes that affect the build system or external dependencies - # (example scopes: gulp, broccoli, npm) - # - # ci: [Continuous Integrations] - # Changes to our CI configuration files and scripts - # (example scopes: Travis, Circle, BrowserStack, SauceLabs) - # - # chore: [Chores] - # Other changes that don't modify src or test files - # - # reverts: [Reverts] - # Reverts a previous commit - - # How to Write a Git Commit Message: - # [https://chris.beams.io/posts/git-commit/] -> https://cbea.ms/git-commit/ - # - # 1. Separate subject from body with a blank line - # 2. Limit the subject line to 50 characters - # 3. Capitalize the subject line - # 4. Do not end the subject line with a period - # 5. Use the imperative mood in the subject line - # 6. Wrap the body at 72 characters - # 7. Use the body to explain *what* and *why* vs. *how* - ''; - - gitConfig = { - init = { - defaultBranch = "prime"; - }; - credential = { - helper = "cache --timeout 43200"; - }; - user = { - email = "ene@sils.li"; - name = "ene"; - }; - help = { - autocorrect = 5; - }; - commit = { - template = "${gitTemplateFile}"; - }; - }; -in { - home-manager.programs.git = { - enable = true; - #package = pkgs.gitAndTools.gitFull; # TODO for git send-email support - aliases = { - st = "status"; - - ## Logging: - ls = "log --max-count=10 --color --format=format:'%C(bold red)%h%C(reset) %C(dim bold blue)%s%C(reset) %C(dim white)[%aN]' "; - - # https://stackoverflow.com/a/61487052 - lg = "lg1"; - lg1 = "lg1-specific --all"; - lg2 = "lg2-specific --all"; - lg3 = "lg3-specific --all"; - - lg1-specific = "log --graph --abbrev-commit --decorate \ - --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(auto)%d%C(reset)'"; - - lg2-specific = "log --graph --abbrev-commit --decorate \ - --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(auto)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)'"; - - lg3-specific = "log --graph --abbrev-commit --decorate \ - --format=format:'%C(bold blue)%h%C(reset)\ - - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)\ - %C(bold cyan)(committed: %cD)%C(reset) %C(auto)%d%C(reset)%n\ - '' %C(white)%s%C(reset)%n'' \ - %C(dim white)- %an <%ae> %C(reset) %C(dim white)(committer: %cn <%ce>)%C(reset)'"; - }; - extraConfig = gitConfig; - delta = { - enable = true; - options = { - decorations = { - commit-decoration-style = "bold yellow box ul"; - file-decoration-style = "none"; - file-style = "bold yellow ul"; - }; - features = "decorations"; - whitespace-error-style = "22 reverse"; - }; - }; - signing = { - key = null; #let gpg2 decide, based on the author - signByDefault = true; - }; - }; -} -# vim: ts=2 - diff --git a/home-manger/grades/config.yaml b/home-manger/grades/config.yaml deleted file mode 100644 index ebbc61f8..00000000 --- a/home-manger/grades/config.yaml +++ /dev/null @@ -1,59 +0,0 @@ ---- -# The unit of your grades. -# This can also be specified -# on a per grade basis on the command line -unit: Punkte - -# List of the possible grade groups -# -# name: -# This is the name used below -# -# weight: -# This is the weight applied to all grades form the group -# when calculation the average (see https://en.wikipedia.org//wiki/Weighted_arithmetic_mean for a explanation). -grade_groups: - - name: major - weight: '2' - - name: minor - weight: '1' - -# List of the types of grades. -# -# name: -# This is the name used on the command line. -# NB: The name is case sensitive. -# -# group: -# This is used when calculating the average, to group multiple types together. -# You might want to use separate types to keep grades ordered, -# but calculate their average as one. -# The value is one of the names you declared in the grade_group section. -grade_types: - - name: graded-homework - group: minor - - name: exam - group: major - - name: oral-mark - group: minor - -# List of the types of Classes -# -# name: -# The name used below -class_types: - - name: subsidiary-subject - - name: intensified-course - -# List of classes -# -# name: -# The name used on the cli -# -# class_type: -# The name of the class type you declared above -classes: - - name: Math - class_type: intensified-course2 - - name: English - class_type: subsidiary-subject diff --git a/home-manger/grades/default.nix b/home-manger/grades/default.nix deleted file mode 100644 index 8cca9640..00000000 --- a/home-manger/grades/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{config, ...}: { - home-manager.xdg.configFile."grades/config.yaml" = { - enable = true; - target = "grades/config.yaml"; - source = "./config.yaml"; - }; -} diff --git a/home-manger/gtk/default.nix b/home-manger/gtk/default.nix deleted file mode 100644 index d72986d5..00000000 --- a/home-manger/gtk/default.nix +++ /dev/null @@ -1,58 +0,0 @@ -{ - config, - pkgs, - ... -}: { - home-manager.gkt = { - enable = true; - theme = { - package = pkgs.nordic; - name = "Nordic"; - }; - cursorTheme = { - package = pkgs.nordzy-cursor-theme; - name = "Nordzy-cursors"; - }; - iconTheme = { - package = pkgs.nordzy-icon-theme; - name = "Nordzy-icon"; - }; - font = { - name = "Noto Sans"; - size = 10; - }; - gtk2 = { - configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc"; - # extraConfig = '' - # gtk-enable-animations=1 - # gtk-primary-button-warps-slider=0 - # gtk-toolbar-style=3 - # gtk-menu-images=1 - # gtk-button-images=1 - # - # ''; - }; - gtk3 = { - # extraConfig = '' - # gtk-button-images=true - # gtk-decoration-layout=icon:minimize,maximize,close - # gtk-enable-animations=true - # gtk-menu-images=true - # gtk-primary-button-warps-slider=false - # gtk-toolbar-style=3 - # #gtk-modules=window-decorations-gtk-module:colorreload-gtk-module - # ''; - extraCss = ""; - }; - gtk4 = { - # extraConfig = '' - # gtk-application-prefer-dark-theme=true - # gtk-decoration-layout=icon:minimize,maximize,close - # gtk-enable-animations=true - # gtk-primary-button-warps-slider=false - # ''; - }; - }; -} -# vim: ts=2 - diff --git a/home-manger/keepassxc/default.nix b/home-manger/keepassxc/default.nix deleted file mode 100644 index dfe89e35..00000000 --- a/home-manger/keepassxc/default.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ - config, - pkgs, - ... -}: { - home-manager.xdg.configFile."keepassxc/keepassxc.ini" = { - target = "keepassxc/keepassxc.ini"; - source = "./keepasxc.ini"; - }; -} -# vim: ts=2 - diff --git a/home-manger/keepassxc/keepassxc.ini b/home-manger/keepassxc/keepassxc.ini deleted file mode 100644 index ee10d691..00000000 --- a/home-manger/keepassxc/keepassxc.ini +++ /dev/null @@ -1,58 +0,0 @@ -[General] -AutoSaveAfterEveryChange=true -BackupBeforeSave=true -BackupFilePathPattern=/home/dt/.local/share/keepassxc/{DB_FILENAME}.old.kdbx -ConfigVersion=2 -HideWindowOnCopy=false - -[Browser] -CustomProxyLocation= -Enabled=true - -[FdoSecrets] -Enabled=true - -[GUI] -AdvancedSettings=true -ApplicationTheme=dark -CompactMode=false -HidePasswords=true -ShowExpiredEntriesOnDatabaseUnlockOffsetDays=1 -TrayIconAppearance=monochrome-light - -[KeeShare] -Active="\n" -Own="MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC70HR8Lq7Sgg9cjJQ6qWnPywUl48IDhI93CYhg7VC7sEsMjNCyUqUpYpkO40lg3slmkWgB8XXa7MUa4DDZo2V4qXz+E5WfZLnr77B64n2WqTAsx7HqQjRw1SOLBceXxU3Zh7486fdekeg/mgJQPcU+snh1JeMqRqHGvtVo4hGM4TOwWjbQ8gRZmqPBELCLry2Dj4m2/swFZo3yARwnSpMBO5IyKq9aAZctKxQG4EeFJcm6MiZ2UkrDUe9RI8x9LwhIbDZ8G2WEy82dESaj4KOSRiz1XCiQ54wqE/MYDWzBUXA8+Q+vyuKXKUKU2RY5ScXCaLHUzBwcU7tX8HeThs5NAgMBAAECggEAIoMF4KroY5TUM06+zz/BypX1IncFeAWEIlzdU2hQYUjeJZZ7pAUFRgNQ+lggK/2MVz1pdg/zdvDysENZnqiElSVZ60tYf3NwKa+AB7i2WLjKujPQ2Onk/oXf8+QyPsyaB1rHBaT9mIJpwcQwYCPVqrV7ZpV5dpOHl0CKcS03ieIoa5UOGB8bx35xkDtSW27tyyfdtAdkycni22MdHbgVYozUkpVnwtxGqg0zBxTQWxzhD+qVNxGBhT0HZNLz7qQOGghoDsDXkYWvbcJmnOLA9FvH7ihdDw5LjsWQf+rUwCxCKX4JLpSAhkGcEIz1yvlmJR1kWD0NnJDkKvGZxnpXsQKBgQDjp9fgxMx8k9apFzSaIaA77D9aJBGR9QHuewhd4EJR7tCqyjV9CZ+V86T8pqDTtCAEyvmO7VPiHuw2ZzgrzZLr2Suy2fur53AdWDk7PYrWjUtYolyVdsTWHdGoyPksSZM/1biCVW4eY986R9wHnn88m1X4Rz52BC0m22cNrVUbnQKBgQDTMruJXWegrytWdJcx8VoD81WA0/pqbTB9qMoaoR4i/VYK1BGyFnnwuMpoAAX72yhMbJRSLdIO5eQXNHleMLEKEkrWkQIkwYGyvGkTEM7bDWoAIdLA8MV6ad/1G9txT/QtH9PlQYpK65RB1L6Nabgeavwultb5izkuRzIb/mS2cQKBgQDXD10hieg/G44i6LgZjwCG+zQR3Jb4kkMD3hhWTp94NSnM3f9PosKubp+CyYqO08+Xl4PPoKWorFurPTFUN/y+bscYS1Kz34wLPKe8LfQ1oP73uVHLJIroVv0T/N9fFhZTrHuELF49uU1NCktyqyk5wOijBfKcnG9nEMc2pXMMBQKBgQCMsCn/aopinu3mrMofSeCl6w4VQKB7DvuTacIgFR4nPs13byfOk2xtsBudRg62ZJqmtlnjmIRqyje0QY9r8FGvHNpfrr9XztPgReRVAAhcIcZwChgD0SAr2KWI+SKojBNjj+Uuvgcqu13KsLazKy6sjKYrPu4708OmkWTPAxsB8QKBgB7rvH8tRZQqUGYVW0+Q89jmUNK/MFGiIUMLBA9d45sEG6daDdDMXPV/M/uvwVyr3iUPIZpKTtM1kjz60P2zQKXIlGwkfdXiNg+fq9cfY0NE0tyckZubi8/P8+Uw6AkU70i7zwVWRm8/r3QliThjLLq1GiKrkvaXTG7ATAOpPYdUdtMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC70HR8Lq7Sgg9cjJQ6qWnPywUl48IDhI93CYhg7VC7sEsMjNCyUqUpYpkO40lg3slmkWgB8XXa7MUa4DDZo2V4qXz+E5WfZLnr77B64n2WqTAsx7HqQjRw1SOLBceXxU3Zh7486fdekeg/mgJQPcU+snh1JeMqRqHGvtVo4hGM4TOwWjbQ8gRZmqPBELCLry2Dj4m2/swFZo3yARwnSpMBO5IyKq9aAZctKxQG4EeFJcm6MiZ2UkrDUe9RI8x9LwhIbDZ8G2WEy82dESaj4KOSRiz1XCiQ54wqE/MYDWzBUXA8+Q+vyuKXKUKU2RY5ScXCaLHUzBwcU7tX8HeThs5NAgMBAAECggEAIoMF4KroY5TUM06+zz/BypX1IncFeAWEIlzdU2hQYUjeJZZ7pAUFRgNQ+lggK/2MVz1pdg/zdvDysENZnqiElSVZ60tYf3NwKa+AB7i2WLjKujPQ2Onk/oXf8+QyPsyaB1rHBaT9mIJpwcQwYCPVqrV7ZpV5dpOHl0CKcS03ieIoa5UOGB8bx35xkDtSW27tyyfdtAdkycni22MdHbgVYozUkpVnwtxGqg0zBxTQWxzhD+qVNxGBhT0HZNLz7qQOGghoDsDXkYWvbcJmnOLA9FvH7ihdDw5LjsWQf+rUwCxCKX4JLpSAhkGcEIz1yvlmJR1kWD0NnJDkKvGZxnpXsQKBgQDjp9fgxMx8k9apFzSaIaA77D9aJBGR9QHuewhd4EJR7tCqyjV9CZ+V86T8pqDTtCAEyvmO7VPiHuw2ZzgrzZLr2Suy2fur53AdWDk7PYrWjUtYolyVdsTWHdGoyPksSZM/1biCVW4eY986R9wHnn88m1X4Rz52BC0m22cNrVUbnQKBgQDTMruJXWegrytWdJcx8VoD81WA0/pqbTB9qMoaoR4i/VYK1BGyFnnwuMpoAAX72yhMbJRSLdIO5eQXNHleMLEKEkrWkQIkwYGyvGkTEM7bDWoAIdLA8MV6ad/1G9txT/QtH9PlQYpK65RB1L6Nabgeavwultb5izkuRzIb/mS2cQKBgQDXD10hieg/G44i6LgZjwCG+zQR3Jb4kkMD3hhWTp94NSnM3f9PosKubp+CyYqO08+Xl4PPoKWorFurPTFUN/y+bscYS1Kz34wLPKe8LfQ1oP73uVHLJIroVv0T/N9fFhZTrHuELF49uU1NCktyqyk5wOijBfKcnG9nEMc2pXMMBQKBgQCMsCn/aopinu3mrMofSeCl6w4VQKB7DvuTacIgFR4nPs13byfOk2xtsBudRg62ZJqmtlnjmIRqyje0QY9r8FGvHNpfrr9XztPgReRVAAhcIcZwChgD0SAr2KWI+SKojBNjj+Uuvgcqu13KsLazKy6sjKYrPu4708OmkWTPAxsB8QKBgB7rvH8tRZQqUGYVW0+Q89jmUNK/MFGiIUMLBA9d45sEG6daDdDMXPV/M/uvwVyr3iUPIZpKTtM1kjz60P2zQKXIlGwkfdXiNg+fq9cfY0NE0tyckZubi8/P8+Uw6AkU70i7zwVWRm8/r3QliThjLLq1GiKrkvaXTG7ATAOpPYdU\n" -QuietSuccess=true - -[PasswordGenerator] -AdditionalChars= -AdvancedMode=true -Braces=true -Dashes=true -EASCII=true -ExcludedChars= -Length=128 -Logograms=true -LowerCase=true -Math=true -Numbers=true -Punctuation=true -Quotes=true -SpecialChars=true -Type=0 -UpperCase=true -WordCount=4 -WordSeparator="," - -[SSHAgent] -Enabled=true - -[Security] -HidePasswordPreviewPanel=true -IconDownloadFallback=true -LockDatabaseIdle=false -LockDatabaseIdleSeconds=960 -PasswordEmptyPlaceholder=true -PasswordsHidden=true -PasswordsRepeatVisible=true diff --git a/home-manger/latexindent/default.nix b/home-manger/latexindent/default.nix deleted file mode 100644 index 657382ca..00000000 --- a/home-manger/latexindent/default.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ - config, - pkgs, - ... -}: { - home-manager.xdg.configFile."latexindent/indentconfig.yaml" = { - target = "latexindent/indentconfig.yaml"; - source = "./indentconfig.yaml"; - }; - home-manager.xdg.configFile."latexindent/mysettings.yaml" = { - target = "latexindent/mysettings.yaml"; - source = "./mysettings.yaml"; - }; -} -# vim: ts=2 - diff --git a/home-manger/latexindent/indentconfig.yaml b/home-manger/latexindent/indentconfig.yaml deleted file mode 100644 index d67351f3..00000000 --- a/home-manger/latexindent/indentconfig.yaml +++ /dev/null @@ -1,2 +0,0 @@ -paths: -- /home/dt/.config/latexindent/mysettings.yaml diff --git a/home-manger/latexindent/mysettings.yaml b/home-manger/latexindent/mysettings.yaml deleted file mode 100644 index 9a0f8b2f..00000000 --- a/home-manger/latexindent/mysettings.yaml +++ /dev/null @@ -1,672 +0,0 @@ -# defaultSettings.yaml for latexindent.pl, version 3.19.1, 2022-12-04 -# a script that aims to -# beautify .tex, .sty, .cls files -# -# (or latexindent.exe if you're on Windows) -# -#--------------------------------------------------------------------------------------- -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# See http://www.gnu.org/licenses/. -# -# Chris Hughes, 2017 -# -# For all communication, please visit: https://github.com/cmhughes/latexindent.pl -# -#--------------------------------------------------------------------------------------- -# You should feel encouraged to change anything you like in these settings, but -# it would probably be better to have your own user settings -# files somewhere else - remember that this file may be overwritten -# when you update your tex distribution. Please see the manual linked from: -# -# https://github.com/cmhughes/latexindent.pl -# -# for details of how to create and configure your own settings files. -# -# Please read the manual (linked from above) first to understand what each switch does. -# -#--------------------------------------------------------------------------------------- - -# latexindent can be called to act on a file without using the file's extension, -# e.g, simply -# latexindent myfile -# in which case the choice of file extension is chosen -# according to the choices made in fileExtensionPreference -# Other file extensions can be added. -fileExtensionPreference: - .tex: 1 - .sty: 2 - .cls: 3 - .bib: 4 - -# default file extension of backup file (if -w switch is active) -# for example, if your .tex file is called -# myfile.tex -# and you specify the backupExtension as BACKUP.bak then your -# backup file will be -# myfileBACKUP.bak -backupExtension: .bak - -# only one backup per file: -# - if onlyOneBackUp is 0 then, as a safety measure, -# the number on the extension increments by 1 each time: -# -# myfile.bak0, myfile.bak1, myfile.bak2 -# - if you set onlyOnebackUp to 1, then the backup file will -# be overwritten each time (not recommended until you trust the script) -onlyOneBackUp: 0 - -# some users may want a finite number of backup files, -# say at most 3; in which case, they can change this maxNumberOfBackUps. -# -# If maxNumberOfBackUps is set to 0 (or less) then infinitely -# many backups are possible, unless onlyOneBackUp is switched on -maxNumberOfBackUps: 0 - -# some users may wish to cycle through back up files. -# -# for example, with maxNumberOfBackUps: 4, they may -# wish to delete the oldest back up file, and keep only the most recent. -# -# copy myfile.bak1 to myfile.bak0 -# copy myfile.bak2 to myfile.bak1 -# copy myfile.bak3 to myfile.bak2 -# copy myfile.bak4 to myfile.bak3 -# -# the back up will be written to myfile.bak4 -cycleThroughBackUps: 0 - -# preferences for information displayed in the log file -logFilePreferences: - showEveryYamlRead: 1 - showAmalgamatedSettings: 0 - showDecorationStartCodeBlockTrace: 0 - showDecorationFinishCodeBlockTrace: 0 - endLogFileWith: '--------------' - showGitHubInfoFooter: 1 - Dumper: - Terse: 1 - Indent: 1 - Useqq: 1 - Deparse: 1 - Quotekeys: 0 - Sortkeys: 1 - Pair: " => " - -# verbatim environments specified -# in this field will not be changed at all! -verbatimEnvironments: - verbatim: 1 - lstlisting: 1 - minted: 1 - -# verbatim commands such as \verb! body !, \lstinline$something else$ -verbatimCommands: - verb: 1 - lstinline: 1 - -# no indent blocks (not necessarily verbatim -# environments) which are marked as %\begin{noindent} -# or anything else that you detail in the following -noIndentBlock: - noindent: 1 - cmhtest: 1 - -# \begin{document} and \end{document} are treated differently -# by latexindent within filecontents environments -fileContentsEnvironments: - filecontents: 1 - filecontents*: 1 - -# indent preamble -indentPreamble: 1 - -# assume no preamble in cls, sty, by default -lookForPreamble: - .tex: 1 - .sty: 0 - .cls: 0 - .bib: 0 - -# some preambles can contain \begin and \end statements -# that are not in their 'standard environment block', for example, -# consider the following key = values: -# preheadhook={\begin{mdframed}[style=myframedstyle]}, -# postfoothook=\end{mdframed}, -preambleCommandsBeforeEnvironments: 0 - -# default value of indentation -defaultIndent: " " - -# remove trailing whitespace from all lines -removeTrailingWhitespace: - beforeProcessing: 0 - afterProcessing: 1 - -# name of code blocks that should have their body aligned at ampersand delimiters -lookForAlignDelims: - tabular: - delims: 1 - alignDoubleBackSlash: 1 - spacesBeforeDoubleBackSlash: 1 - multiColumnGrouping: 0 - alignRowsWithoutMaxDelims: 1 - spacesBeforeAmpersand: 1 - spacesAfterAmpersand: 1 - justification: left - alignFinalDoubleBackSlash: 0 - dontMeasure: 0 - delimiterRegEx: '(?]*?>)' - keyEqualsValuesBracesBrackets: - name: '[a-zA-Z@\*0-9_\/.:\#-]+[a-zA-Z@\*0-9_\/.\h\{\}:\#-]*?' - follow: '(?:(?<]+?' - follow: '\h|\R|\{|\[|\$|\)|\(' - UnNamedGroupingBracesBrackets: - follow: '\{|\[|,|&|\)|\(|\$' - arguments: - before: '(?:#\d\h*;?,?\/?)+|\<.*?\>' - between: '_|\^|\*' - trailingComments: - notPreceededBy: '(? $archivers; - -readp "File Name: " name - - -case $(awk '{for (i=1; i<=NF; i++) print $i}' $archivers | fzf) in - "tar+zip") - tar -czf "$name".tar.gz "$name" - ;; - "tar+xz") - tar -cf "$name".tar $fx - xz -z -9 -e -T0 "$name".tar - ;; - "7z") - 7z a "$name".7z $fx - ;; - "zip") - zip -r "$name".zip $fx - ;; -esac - - - - -if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manger/lf/cmds/broot_jump.sh b/home-manger/lf/cmds/broot_jump.sh deleted file mode 100644 index 188c9508..00000000 --- a/home-manger/lf/cmds/broot_jump.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -# shellcheck disable=SC2086 -# shellcheck source=/dev/null -. ~/.local/lib/shell/lib - -f=$(mktemp) -res="$(broot --outcmd $f && cat $f | sed 's/cd //')" -rm -f "$f" -if [ -f "$res" ]; then - cmd="select" -elif [ -d "$res" ]; then - cmd="cd" -fi -lf -remote "send $id $cmd \"$res\"" - - - - -if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manger/lf/cmds/chmod.sh b/home-manger/lf/cmds/chmod.sh deleted file mode 100644 index f6a87336..00000000 --- a/home-manger/lf/cmds/chmod.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -# shellcheck disable=SC2086 -# shellcheck source=/dev/null -. ~/.local/lib/shell/lib - - -readp "Mode Bits: " ans - -for file in $fx -do - chmod "$ans" "$file" -done - -lf -remote 'send reload' - - -if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manger/lf/cmds/clear_trash.sh b/home-manger/lf/cmds/clear_trash.sh deleted file mode 100644 index c02321f2..00000000 --- a/home-manger/lf/cmds/clear_trash.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -# shellcheck disable=SC2086 -# shellcheck source=/dev/null -. ~/.local/lib/shell/lib - - -trash-empty - - -if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manger/lf/cmds/dl_file.sh b/home-manger/lf/cmds/dl_file.sh deleted file mode 100644 index 9cb9023c..00000000 --- a/home-manger/lf/cmds/dl_file.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -# shellcheck disable=SC2086 -# shellcheck source=/dev/null -. ~/.local/lib/shell/lib - -# Provides the ability to download a file by dropping it into a window - -url=$(dragon-drop -t -x) - -if [ -n "$url" ]; then - printf "File Name: " - name="" - while [ -z $name ] || [ -e $name ] - do - read -r name - if [ -e "$name" ]; then - printf "File already exists, overwrite (y|n): " - read -r ans - - if [ "$ans" = "y" ]; then - break - else - printf "File Name: " - fi - fi - done - - # Download the file with curl - [ -n "$name" ] && curl -o "$name" "$url" || exit 1 -else - exit 1 -fi - - - -if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manger/lf/cmds/dragon.sh b/home-manger/lf/cmds/dragon.sh deleted file mode 100644 index 36e94706..00000000 --- a/home-manger/lf/cmds/dragon.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -# shellcheck disable=SC2086 -# shellcheck source=/dev/null -. ~/.local/lib/shell/lib - -dragon-drop -a -x "$fx" - - - - -if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manger/lf/cmds/dragon_individual.sh b/home-manger/lf/cmds/dragon_individual.sh deleted file mode 100644 index abcadb13..00000000 --- a/home-manger/lf/cmds/dragon_individual.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -# shellcheck disable=SC2086 -# shellcheck source=/dev/null -. ~/.local/lib/shell/lib - -dragon-drop "$fx" - - - -if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manger/lf/cmds/dragon_stay.sh b/home-manger/lf/cmds/dragon_stay.sh deleted file mode 100644 index 60195d09..00000000 --- a/home-manger/lf/cmds/dragon_stay.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -# shellcheck disable=SC2086 -# shellcheck source=/dev/null -. ~/.local/lib/shell/lib - -dragon-drop -a "$fx" - - - - -if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manger/lf/cmds/fzf_jump.sh b/home-manger/lf/cmds/fzf_jump.sh deleted file mode 100644 index 688efdb9..00000000 --- a/home-manger/lf/cmds/fzf_jump.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -# shellcheck disable=SC2086 -# shellcheck source=/dev/null -. ~/.local/lib/shell/lib - -res="$(find . -maxdepth 3 | fzf --reverse --header='Jump to location')" -if [ -f "$res" ]; then - cmd="select" -elif [ -d "$res" ]; then - cmd="cd" -fi -lf -remote "send $id $cmd \"$res\"" - - - - -if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manger/lf/cmds/help.sh b/home-manger/lf/cmds/help.sh deleted file mode 100644 index 8fedd0ea..00000000 --- a/home-manger/lf/cmds/help.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -# shellcheck disable=SC2086 -# shellcheck source=/dev/null -. ~/.local/lib/shell/lib - - -cat ~/.config/lf/lfrc - - -if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manger/lf/cmds/mk_dir.sh b/home-manger/lf/cmds/mk_dir.sh deleted file mode 100644 index bfa0627d..00000000 --- a/home-manger/lf/cmds/mk_dir.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -# shellcheck disable=SC2086 -# shellcheck source=/dev/null -. ~/.local/lib/shell/lib - - -readp "Directory Name: " ans -mkdir $ans - - - -if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manger/lf/cmds/mk_file.sh b/home-manger/lf/cmds/mk_file.sh deleted file mode 100644 index 044016a6..00000000 --- a/home-manger/lf/cmds/mk_file.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -# shellcheck disable=SC2086 -# shellcheck source=/dev/null -. ~/.local/lib/shell/lib - - -readp "File Name: " name -$EDITOR "$name" - - -if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manger/lf/cmds/mk_ln.sh b/home-manger/lf/cmds/mk_ln.sh deleted file mode 100644 index 71a70a36..00000000 --- a/home-manger/lf/cmds/mk_ln.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh -# shellcheck disable=SC2086 -# shellcheck source=/dev/null -. ~/.local/lib/shell/lib - -while IFS= read -r i;do - set -- "$@" "$i" -done < "$(tmp "cat ~/.local/share/lf/files")" - -mode="$1" -shift - -if [ "$#" -lt 1 ]; then - msg "no files to link" - exit 0 -fi - - -case "$mode" in - copy) - while [ "$#" -gt 0 ]; do - file=$1 - ans="$(basename "$file")" - - while ls -a "$(pwd)" | grep --word-regexp "$ans" > /dev/null;do - printf "\"%s\" already exists, new name for link: " "$ans" - read -r ans - done - - ln -s "$file" "$(pwd)/$ans" - - - shift - done - ;; -esac -rm ~/.local/share/lf/files -# lf -remote "send clear" - - - - -if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manger/lf/cmds/mk_scr.sh b/home-manger/lf/cmds/mk_scr.sh deleted file mode 100644 index b6c17458..00000000 --- a/home-manger/lf/cmds/mk_scr.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh -# shellcheck disable=SC2086 -# shellcheck source=/dev/null -. ~/.local/lib/shell/lib - -star=$(mktmp) -cat << EOF > $star -#!/bin/sh -# shellcheck disable=SC2086 -# shellcheck source=/dev/null -. ~/.local/lib/shell/lib - - - - - -if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi -EOF - -readp "Script Name: " script_name -scr="$(pwd)"/"$script_name" - -[ -e $scr ] && die "$script_name exitst, exiting.." - -cat "$star" > $scr -chmod +x $scr -if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi - -$VISUAL $scr diff --git a/home-manger/lf/cmds/open.sh b/home-manger/lf/cmds/open.sh deleted file mode 100644 index 8376be21..00000000 --- a/home-manger/lf/cmds/open.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -# shellcheck disable=SC2086 -# shellcheck source=/dev/null -. ~/.local/lib/shell/lib - - -case $(file --mime-type "$f" -bL) in - text/*|application/json) $EDITOR "$f";; - image/*) $IVIEWER "$f";; - *) xdg-open "$f" ;; -esac - - - - -if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manger/lf/cmds/open_config.sh b/home-manger/lf/cmds/open_config.sh deleted file mode 100644 index 93c174d7..00000000 --- a/home-manger/lf/cmds/open_config.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -# shellcheck disable=SC2086 -# shellcheck source=/dev/null -. ~/.local/lib/shell/lib - -$EDITOR "$(bookmenu -b ~/.config/bookmenu/configs -f fzf -o)" - - - -if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manger/lf/cmds/restore_trash.sh b/home-manger/lf/cmds/restore_trash.sh deleted file mode 100644 index 432e9e9b..00000000 --- a/home-manger/lf/cmds/restore_trash.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -# shellcheck disable=SC2086 -# shellcheck source=/dev/null -. ~/.local/lib/shell/lib - - -trash-restore - - -if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manger/lf/cmds/set_wall_paper.sh b/home-manger/lf/cmds/set_wall_paper.sh deleted file mode 100644 index 4599de2a..00000000 --- a/home-manger/lf/cmds/set_wall_paper.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -# shellcheck disable=SC2086 -# shellcheck source=/dev/null -. ~/.local/lib/shell/lib - - -die "No yet implemented" -#sed -i "s,export AWMWALLPAPER='.*',export AWMWALLPAPER='${f}'," ${ZDOTDIR}/.zshenv -#swaybg -i "$f" & -#feh --bg-max --no-fehbg "$f" - - - - -if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manger/lf/cmds/stripspace.sh b/home-manger/lf/cmds/stripspace.sh deleted file mode 100644 index c7f68767..00000000 --- a/home-manger/lf/cmds/stripspace.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -# shellcheck disable=SC2086 -# shellcheck source=/dev/null -. ~/.local/lib/shell/lib - - -stripspace "$f" - - -if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manger/lf/cmds/sudo_mk_file.sh b/home-manger/lf/cmds/sudo_mk_file.sh deleted file mode 100644 index 1f06a92f..00000000 --- a/home-manger/lf/cmds/sudo_mk_file.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -# shellcheck disable=SC2086 -# shellcheck source=/dev/null -. ~/.local/lib/shell/lib - - -readp "File Name: " ans -sudo $EDITOR "$ans" - - - - -if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manger/lf/cmds/trash.sh b/home-manger/lf/cmds/trash.sh deleted file mode 100644 index 4598b4fd..00000000 --- a/home-manger/lf/cmds/trash.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh -# shellcheck disable=SC2086 -# shellcheck source=/dev/null -. ~/.local/lib/shell/lib - -files=$(printf "$fx" | tr '\n' ';') - -while [ "$files" ]; do - # extract the substring from start of string up to delimiter. - # this is the first "element" of the string. - file=${files%%;*} - - trash-put "$(basename "$file")" - # if there's only one element left, set `files` to an empty string. - # this causes us to exit this `while` loop. - # else, we delete the first "element" of the string from files, and move onto the next. - if [ "$files" = "$file" ]; then - files='' - else - files="${files#*;}" - fi -done - - - - -if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manger/lf/cmds/unarchive.sh b/home-manger/lf/cmds/unarchive.sh deleted file mode 100644 index 47a713fa..00000000 --- a/home-manger/lf/cmds/unarchive.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh -# shellcheck disable=SC2086 -# shellcheck source=/dev/null -. ~/.local/lib/shell/lib - - -# extract the current file with the right command -# (xkcd link: https://xkcd.com/1168/) -set -f -case "$f" in - *.tar.bz|*.tar.bz2|*.tbz|*.tbz2) tar xjvf $f;; - *.tar.gz|*.tgz) tar xzvf $f;; - *.tar.xz|*.txz) tar xJvf $f;; - *.zip) unzip $f;; - *.rar) unrar x $f;; - *.7z) 7z x $f;; - *) warning "Unsupported format" ;; -esac - - - -if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manger/lf/colors b/home-manger/lf/colors deleted file mode 100644 index c4b6417b..00000000 --- a/home-manger/lf/colors +++ /dev/null @@ -1,196 +0,0 @@ -# vim:ft=dircolors -# (This is not a dircolors file but it helps to highlight colors and comments) - -# default values from dircolors -# (entries with a leading # are not implemented in lf) -# #no 00 # NORMAL -# fi 00 # FILE -# #rs 0 # RESET -# di 01;34 # DIR -# ln 01;36 # LINK -# #mh 00 # MULTIHARDLINK -# pi 40;33 # FIFO -# so 01;35 # SOCK -# #do 01;35 # DOOR -# bd 40;33;01 # BLK -# cd 40;33;01 # CHR -# or 40;31;01 # ORPHAN -# #mi 00 # MISSING -# su 37;41 # SETUID -# sg 30;43 # SETGID -# #ca 30;41 # CAPABILITY -# tw 30;42 # STICKY_OTHER_WRITABLE -# ow 34;42 # OTHER_WRITABLE -# st 37;44 # STICKY -# ex 01;32 # EXEC - -# default values from lf (with matching order) -# ln 01;36 # LINK -# or 31;01 # ORPHAN -# tw 01;34 # STICKY_OTHER_WRITABLE -# ow 01;34 # OTHER_WRITABLE -# st 01;34 # STICKY -# di 01;34 # DIR -# pi 33 # FIFO -# so 01;35 # SOCK -# bd 33;01 # BLK -# cd 33;01 # CHR -# su 01;32 # SETUID -# sg 01;32 # SETGID -# ex 01;32 # EXEC -# fi 00 # FILE - - -# file types (with matching order) -ln 01;33 # LINK -#ln 01;34 # LINK -or 01;35;46 # ORPHAN -tw 35 # STICKY_OTHER_WRITABLE -ow 35 # OTHER_WRITABLE -st 01;36 # STICKY -di 01;36 # DIR -pi 33 # FIFO -so 01;35 # SOCK -bd 33;01 # BLK -cd 33;01 # CHR -su 01;32 # SETUID -sg 01;32 # SETGID -ex 01;31;44 # EXEC -fi 00 # FILE - -# links -# ~/.librewolf 01;34 -~/.cups 01;34 -~/.mozilla 01;34 -#~/.pki 01;34 -~/.ssh 01;34 -#~/.lesskey 01;34 -#~/.pulse-cookie 01;34 - -~/.steampid 01;34 -~/.steam 01;34 -~/.steampath 01;34 - -# nix -~/.nix-profile 01;34 -~/.nix-defexpr 01;34 - -# can now be removed -~/.indentconfig.yaml 01;34 - -# archives or compressed (dircolors defaults) -*.tar 01;31 -*.tgz 01;31 -*.arc 01;31 -*.arj 01;31 -*.taz 01;31 -*.lha 01;31 -*.lz4 01;31 -*.lzh 01;31 -*.lzma 01;31 -*.tlz 01;31 -*.txz 01;31 -*.tzo 01;31 -*.t7z 01;31 -*.zip 01;31 -*.z 01;31 -*.dz 01;31 -*.gz 01;31 -*.lrz 01;31 -*.lz 01;31 -*.lzo 01;31 -*.xz 01;31 -*.zst 01;31 -*.tzst 01;31 -*.bz2 01;31 -*.bz 01;31 -*.tbz 01;31 -*.tbz2 01;31 -*.tz 01;31 -*.deb 01;31 -*.rpm 01;31 -*.jar 01;31 -*.war 01;31 -*.ear 01;31 -*.sar 01;31 -*.rar 01;31 -*.alz 01;31 -*.ace 01;31 -*.zoo 01;31 -*.cpio 01;31 -*.7z 01;31 -*.rz 01;31 -*.cab 01;31 -*.wim 01;31 -*.swm 01;31 -*.dwm 01;31 -*.esd 01;31 - -# image formats (dircolors defaults) -*.jpg 01;35 -*.jpeg 01;35 -*.mjpg 01;35 -*.mjpeg 01;35 -*.gif 01;35 -*.bmp 01;35 -*.pbm 01;35 -*.pgm 01;35 -*.ppm 01;35 -*.tga 01;35 -*.xbm 01;35 -*.xpm 01;35 -*.tif 01;35 -*.tiff 01;35 -*.png 01;35 -*.svg 01;35 -*.svgz 01;35 -*.mng 01;35 -*.pcx 01;35 -*.mov 01;35 -*.mpg 01;35 -*.mpeg 01;35 -*.m2v 01;35 -*.mkv 01;35 -*.webm 01;35 -*.ogm 01;35 -*.mp4 01;35 -*.m4v 01;35 -*.mp4v 01;35 -*.vob 01;35 -*.qt 01;35 -*.nuv 01;35 -*.wmv 01;35 -*.asf 01;35 -*.rm 01;35 -*.rmvb 01;35 -*.flc 01;35 -*.avi 01;35 -*.fli 01;35 -*.flv 01;35 -*.gl 01;35 -*.dl 01;35 -*.xcf 01;35 -*.xwd 01;35 -*.yuv 01;35 -*.cgm 01;35 -*.emf 01;35 -*.ogv 01;35 -*.ogx 01;35 - -# audio formats (dircolors defaults) -*.aac 00;36 -*.au 00;36 -*.flac 00;36 -*.m4a 00;36 -*.mid 00;36 -*.midi 00;36 -*.mka 00;36 -*.mp3 00;36 -*.mpc 00;36 -*.ogg 00;36 -*.ra 00;36 -*.wav 00;36 -*.oga 00;36 -*.opus 00;36 -*.spx 00;36 -*.xspf 00;36 diff --git a/home-manger/lf/default.nix b/home-manger/lf/default.nix deleted file mode 100644 index fd8c4b39..00000000 --- a/home-manger/lf/default.nix +++ /dev/null @@ -1,200 +0,0 @@ -{ - config, - pkgs, - ... -}: let - shell = file: - "\${{" + builtins.readFile "${file}" + "}}"; # closes the lf tui - pipe = file: - "%{{" + builtins.readFile "${file}" + "}}"; # runs the command in the ui,term bar - async = file: - "&{{" + builtins.readFile "${file}" + "}}"; # runs the command in the background - wait = file: - "!{{" + builtins.readFile "${file}" + "}}"; # adds a prompt after the command has run -in { - home-manager.xdg.configFile."lf/icons" = { - target = "lf/icons"; - source = "./icons"; - }; - home-manager.xdg.configFile."lf/colors" = { - target = "lf/colors"; - source = "./colors"; - }; - - home-manager.programs.lf = { - enable = true; - - commands = { - help = shell "./cmds/help.sh"; - open = shell "./cmds/open.sh"; - mk_dir = pipe "./cmds/mk_dir.sh"; - mk_scr = shell "./cmds/mk_scr.sh"; - mk_file = shell "./cmds/mk_file.sh"; - chmod = pipe "./cmds/chmod.sh"; - mk_ln = shell "./cmds/mk_ln.sh"; # TODO could be pipe, right? - sudo_mk_file = shell "./cmds/sudo_mk_file.sh"; - set_wall_paper = pipe "./cmds/set_wall_paper.sh"; - fzf_jump = shell "./cmds/fzf_jump.sh"; - broot_jump = shell "./cmds/broot_jump.sh"; - open_config = shell "./cmds/open_config.sh"; - - dragon = pipe "./cmds/dragon.sh"; - dragon_stay = pipe "./cmds/dragon_stay.sh"; - dragon_individual = pipe "./cmds/dragon_individual.sh"; - dl_file = pipe "./cmds/dl_file.sh"; - - unarchive = pipe "./cmds/unarchive.sh"; - archive = pipe "./cmds/archive.sh"; - - trash = pipe "./cmds/trash.sh"; - clear_trash = pipe "./cmds/clear_trash.sh"; - restore_trash = shell "./cmds/restore_trash.sh"; - - stripspace = pipe "./cmds/stripspace.sh"; - }; - keybindings = { - # Remove some defaults - m = null; - "'" = null; - #" = null; # TODO - d = null; - c = null; - e = null; - j = null; - k = null; - l = null; - ";" = null; - - # File Openers - ee = "\$\$EDITOR \"$f\""; - u = "%\$IVIEWER \"$f\""; - cc = "\$sudo -e \"$f\""; - - # Archive Mappings - au = "unarchive"; - a = "archive"; - - # Trash Mappings - dd = "trash"; - jc = "clear_trash"; - jr = "restore_trash"; - - # Broot Mapping - f = "broot_jump"; - - # Dragon Mapping - dr = "dragon"; - ds = "dragon-stay"; - di = "dragon-individual"; - #dm = "mvdragon"; - #dc = "cpdragon"; - dl = "dlfile"; - - ss = "stripspace"; - - # Vim keys - h = "updir"; - t = "down"; - n = "up"; - s = "open"; - - # Basic Functions - bn = "help"; - kk = "mklkn"; - "." = "set hidden!"; - DD = "delete"; - p = "paste"; - x = "cut"; - y = "copy"; - "" = "open"; - mf = "mkfile"; - mr = "sudomkfile"; - md = "mkdir"; - ms = "mkscr"; - ch = "chmod"; - bg = "setwallpaper"; - o = "open_config"; - br = "\$vimv \$fx"; # TODO what is this command? - r = "rename"; - H = "top"; - L = "bottom"; - R = "reload"; - C = "clear"; - U = "unselect"; - - # Movement - gjr = "cd ~/.local/share/Trash/files"; - gus = "cd /run/dt"; - - "gr." = "cd /home/dt/repos"; - grr = "cd /home/dt/repos/rust"; - grp = "cd /home/dt/repos/python"; - grc = "cd /home/dt/repos/c"; - gra = "cd /home/dt/repos/auto_hot_key"; - grt = "cd /home/dt/repos/tex"; - grs = "cd /home/dt/repos/shell"; - - grch = "cd /home/dt/repos/chroot"; - grpe = "cd /home/dt/repos/perl"; - grja = "cd /home/dt/repos/java"; - grjs = "cd /home/dt/repos/java_script"; - # ------------- - "gm." = "cd /home/dt/media"; - gmpi = "cd /home/dt/media/pictures"; - gmdo = "cd /home/dt/media/downloads"; - gmpl = "cd /home/dt/media/playlist"; - gmis = "cd /home/dt/media/isos"; - # ------------- - "gs." = "cd /home/dt/school"; - gsgs = "cd /home/dt/school/geschichte"; - gsch = "cd /home/dt/school/chemie"; - gsen = "cd /home/dt/school/english"; - gsgo = "cd /home/dt/school/geographie"; - gsin = "cd /home/dt/school/infomatik"; - gsso = "cd /home/dt/school/sozialkunde"; - gskr = "cd /home/dt/school/katholische_religion"; - gsmu = "cd /home/dt/school/musik"; - gsla = "cd /home/dt/school/latein"; - gsde = "cd /home/dt/school/deutsch"; - gsma = "cd /home/dt/school/mathematik"; - gspr = "cd /home/dt/school/praktikum"; - gsbi = "cd /home/dt/school/biologie"; - gssp = "cd /home/dt/school/sport"; - gsphy = "cd /home/dt/school/physik"; - gsphi = "cd /home/dt/school/philosophie"; - - gc = "cd ~/.config"; - gl = "cd ~/.local"; - gE = "cd /etc"; - - "gU." = "cd /usr"; - gUs = " cd /usr/share"; - - gt = "cd /tmp"; - }; - previewer = { - keybinding = "i"; - source = "ctpv"; - }; - settings = { - cleaner = "ctpvclear"; - autoquit = true; # quit the server, if no clients are left - dircounts = true; # count things in directories TODO this has performance impact - dirpreviews = true; # preview for directories - drawbox = true; - errorfmt = "\\033[1;91m==> ERROR:\\033[0m\\033[1;93m%s\\033[0m"; - hidden = true; # show hidden files - icons = true; - ifs = "\n"; # internal field separator for shell commands - info = ["size"]; # show the size of a directory - shell = "sh"; - shellopts = ["-e" "-u"]; # e: exit on error; u: error for unset variables - }; - extraConfig = '' - &ctpv -s $id - &ctpvquit $id - ''; - }; -} -# vim: ts=2 - diff --git a/home-manger/lf/icons b/home-manger/lf/icons deleted file mode 100644 index 68d53e34..00000000 --- a/home-manger/lf/icons +++ /dev/null @@ -1,357 +0,0 @@ -# vim:ft=conf - -# These examples require Nerd Fonts or a compatible font to be used. -# See https://www.nerdfonts.com for more information. - -# default values from lf (with matching order) -# ln l # LINK -# or l # ORPHAN -# tw t # STICKY_OTHER_WRITABLE -# ow d # OTHER_WRITABLE -# st t # STICKY -# di d # DIR -# pi p # FIFO -# so s # SOCK -# bd b # BLK -# cd c # CHR -# su u # SETUID -# sg g # SETGID -# ex x # EXEC -# fi - # FILE - -# file types (with matching order) -ln  # LINK -or  # ORPHAN -tw t # STICKY_OTHER_WRITABLE -ow  # OTHER_WRITABLE -st t # STICKY -di  # DIR -pi p # FIFO -so s # SOCK -bd b # BLK -cd c # CHR -su u # SETUID -sg g # SETGID -ex  # EXEC -fi  # FILE - -# file extensions (vim-devicons) -*.styl  -*.sass  -*.scss  -*.htm  -*.html  -*.slim  -*.haml  -*.ejs  -*.css  -*.less  -*.md  -*.mdx  -*.markdown  -*.rmd  -*.json  -*.webmanifest  -*.js  -*.mjs  -*.jsx  -*.rb  -*.gemspec  -*.rake  -*.php  -*.py  -*.pyc  -*.pyo  -*.pyd  -*.coffee  -*.mustache  -*.hbs  -*.conf  -*.ini  -*.yml  -*.yaml  -*.toml  -*.bat  -*.mk  -*.jpg  -*.jpeg  -*.bmp  -*.png  -*.webp  -*.gif  -*.ico  -*.twig  -*.cpp  -*.c++  -*.cxx  -*.cc  -*.cp  -*.c  -*.cs  -*.h  -*.hh  -*.hpp  -*.hxx  -*.hs  -*.lhs  -*.nix  -*.lua  -*.java  -*.sh  -*.fish  -*.bash  -*.zsh  -*.ksh  -*.csh  -*.awk  -*.ps1  -*.ml λ -*.mli λ -*.diff  -*.db  -*.sql  -*.dump  -*.clj  -*.cljc  -*.cljs  -*.edn  -*.scala  -*.go  -*.dart  -*.xul  -*.sln  -*.suo  -*.pl  -*.pm  -*.t  -*.rss  -'*.f#'  -*.fsscript  -*.fsx  -*.fs  -*.fsi  -*.rs  -*.rlib  -*.d  -*.erl  -*.hrl  -*.ex  -*.exs  -*.eex  -*.leex  -*.heex  -*.vim  -*.ai  -*.psd  -*.psb  -*.ts  -*.tsx  -*.jl  -*.pp  -*.vue ﵂ -*.elm  -*.swift  -*.xcplayground  -*.tex ﭨ -*.r ﳒ -*.rproj 鉶 -*.sol ﲹ -*.pem  - -# file names (vim-devicons) (case-insensitive not supported in lf) -*gruntfile.coffee  -*gruntfile.js  -*gruntfile.ls  -*gulpfile.coffee  -*gulpfile.js  -*gulpfile.ls  -*mix.lock  -*dropbox  -*.ds_store  -*.gitconfig  -*.gitignore  -*.gitattributes  -*.gitlab-ci.yml  -*.bashrc  -*.zshrc  -*.zshenv  -*.zprofile  -*.vimrc  -*.gvimrc  -*_vimrc  -*_gvimrc  -*.bashprofile  -*favicon.ico  -*license  -*node_modules  -*react.jsx  -*procfile  -*dockerfile  -*docker-compose.yml  -*rakefile  -*config.ru  -*gemfile  -*makefile  -*cmakelists.txt  -*robots.txt ﮧ - -# file names (case-sensitive adaptations) -*Gruntfile.coffee  -*Gruntfile.js  -*Gruntfile.ls  -*Gulpfile.coffee  -*Gulpfile.js  -*Gulpfile.ls  -*Dropbox  -*.DS_Store  -*LICENSE  -*React.jsx  -*Procfile  -*Dockerfile  -*Docker-compose.yml  -*Rakefile  -*Gemfile  -*Makefile  -*CMakeLists.txt  - -# file patterns (vim-devicons) (patterns not supported in lf) -# .*jquery.*\.js$  -# .*angular.*\.js$  -# .*backbone.*\.js$  -# .*require.*\.js$  -# .*materialize.*\.js$  -# .*materialize.*\.css$  -# .*mootools.*\.js$  -# .*vimrc.*  -# Vagrantfile$  - -# file patterns (file name adaptations) -*jquery.min.js  -*angular.min.js  -*backbone.min.js  -*require.min.js  -*materialize.min.js  -*materialize.min.css  -*mootools.min.js  -*vimrc  -Vagrantfile  - -# archives or compressed (extensions from dircolors defaults) -*.tar  -*.tgz  -*.arc  -*.arj  -*.taz  -*.lha  -*.lz4  -*.lzh  -*.lzma  -*.tlz  -*.txz  -*.tzo  -*.t7z  -*.zip  -*.z  -*.dz  -*.gz  -*.lrz  -*.lz  -*.lzo  -*.xz  -*.zst  -*.tzst  -*.bz2  -*.bz  -*.tbz  -*.tbz2  -*.tz  -*.deb  -*.rpm  -*.jar  -*.war  -*.ear  -*.sar  -*.rar  -*.alz  -*.ace  -*.zoo  -*.cpio  -*.7z  -*.rz  -*.cab  -*.wim  -*.swm  -*.dwm  -*.esd  - -# image formats (extensions from dircolors defaults) -*.jpg  -*.jpeg  -*.mjpg  -*.mjpeg  -*.gif  -*.bmp  -*.pbm  -*.pgm  -*.ppm  -*.tga  -*.xbm  -*.xpm  -*.tif  -*.tiff  -*.png  -*.svg  -*.svgz  -*.mng  -*.pcx  -*.mov  -*.mpg  -*.mpeg  -*.m2v  -*.mkv  -*.webm  -*.ogm  -*.mp4  -*.m4v  -*.mp4v  -*.vob  -*.qt  -*.nuv  -*.wmv  -*.asf  -*.rm  -*.rmvb  -*.flc  -*.avi  -*.fli  -*.flv  -*.gl  -*.dl  -*.xcf  -*.xwd  -*.yuv  -*.cgm  -*.emf  -*.ogv  -*.ogx  - -# audio formats (extensions from dircolors defaults) -*.aac  -*.au  -*.flac  -*.m4a  -*.mid  -*.midi  -*.mka  -*.mp3  -*.mpc  -*.ogg  -*.ra  -*.wav  -*.oga  -*.opus  -*.spx  -*.xspf  - -# other formats -*.pdf  diff --git a/home-manger/mako/default.nix b/home-manger/mako/default.nix deleted file mode 100644 index 30a11930..00000000 --- a/home-manger/mako/default.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ - config, - pkgs, - ... -}: { - home-manager.programs.mako = { - enable = true; - backgroudColor = "#2e3440"; - borderColor = "#88c0d0"; - borderRadius = 25; - borderSize = 2; - defaultTimeout = 5000; - font = "Source Code Pro 10"; - width = 500; - height = 500; - icons = true; - ignore-timeout = true; - layer = "overlay"; - markup = true; # TODO - maxIconSize = 64; - sort = "-time"; - extraConfig = '' - [urgency=low] - border-color=#cccccc - - [urgency=normal] - border-color=#d08770 - - [urgency=high] - border-size=3 - border-color=#bf616a - default-timeout=0 - - [urgency=critical] - border-size=4 - border-color=#bf616a - default-timeout=0 - - [category=mpd] - default-timeout=2000 - group-by=category - ''; - }; -} -# vim: ts=2 - diff --git a/home-manger/mpd/default.nix b/home-manger/mpd/default.nix deleted file mode 100644 index 02b94d0e..00000000 --- a/home-manger/mpd/default.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ - config, - pkgs, - ... -}: let - dataDir = "$XDG_DATA_HOME/mpd"; -in { - home-manager.services.mpd = { - enable = true; - inherit dataDir; - musicDirectory = "~/media/music"; - network = { - listenAddress = "${dataDir}/socket"; - }; - extraConfig = '' - metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc,comment" - auto_update "yes" - - #database { - # plugin "simple" - # path "~/.local/share/mpd/db - # cache_directory "~/.local/share/mpd/cache" - #} - - filesystem_charset "UTF-8" - ''; - }; -} -# vim: ts=2 - diff --git a/home-manger/mpd/mpdconf.example b/home-manger/mpd/mpdconf.example deleted file mode 100644 index eaa5e641..00000000 --- a/home-manger/mpd/mpdconf.example +++ /dev/null @@ -1,418 +0,0 @@ -# An example configuration file for MPD. -# Read the user manual for documentation: http://www.musicpd.org/doc/user/ - - -# Files and directories ####################################################### -# -# This setting controls the top directory which MPD will search to discover the -# available audio files and add them to the daemon's online database. This -# setting defaults to the XDG directory, otherwise the music directory will be -# be disabled and audio files will only be accepted over ipc socket (using -# file:// protocol) or streaming files over an accepted protocol. -# -#music_directory "~/music" -# -# This setting sets the MPD internal playlist directory. The purpose of this -# directory is storage for playlists created by MPD. The server will use -# playlist files not created by the server but only if they are in the MPD -# format. This setting defaults to playlist saving being disabled. -# -#playlist_directory "~/.mpd/playlists" -# -# This setting sets the location of the MPD database. This file is used to -# load the database at server start up and store the database while the -# server is not up. This setting defaults to disabled which will allow -# MPD to accept files over ipc socket (using file:// protocol) or streaming -# files over an accepted protocol. -# -#db_file "~/.mpd/database" - -# These settings are the locations for the daemon log files for the daemon. -# -# The special value "syslog" makes MPD use the local syslog daemon. This -# setting defaults to logging to syslog. -# -# If you use systemd, do not configure a log_file. With systemd, MPD -# defaults to the systemd journal, which is fine. -# -#log_file "~/.mpd/log" - -# This setting sets the location of the file which stores the process ID -# for use of mpd --kill and some init scripts. This setting is disabled by -# default and the pid file will not be stored. -# -# If you use systemd, do not configure a pid_file. -# -#pid_file "~/.mpd/pid" - -# This setting sets the location of the file which contains information about -# most variables to get MPD back into the same general shape it was in before -# it was brought down. This setting is disabled by default and the server -# state will be reset on server start up. -# -#state_file "~/.mpd/state" -# -# The location of the sticker database. This is a database which -# manages dynamic information attached to songs. -# -#sticker_file "~/.mpd/sticker.sql" -# -############################################################################### - - -# General music daemon options ################################################ -# -# This setting specifies the user that MPD will run as. MPD should never run as -# root and you may use this setting to make MPD change its user ID after -# initialization. This setting is disabled by default and MPD is run as the -# current user. -# -#user "nobody" -# -# This setting specifies the group that MPD will run as. If not specified -# primary group of user specified with "user" setting will be used (if set). -# This is useful if MPD needs to be a member of group such as "audio" to -# have permission to use sound card. -# -#group "nogroup" -# -# This setting sets the address for the daemon to listen on. Careful attention -# should be paid if this is assigned to anything other than the default, any. -# This setting can deny access to control of the daemon. Not effective if -# systemd socket activation is in use. -# -# For network -#bind_to_address "any" -# -# And for Unix Socket -#bind_to_address "~/.mpd/socket" -# -# This setting is the TCP port that is desired for the daemon to get assigned -# to. -# -#port "6600" -# -# Suppress all messages below the given threshold. Use "verbose" for -# troubleshooting. Available setting arguments are "notice", "info", "verbose", -# "warning" and "error". -# -#log_level "notice" -# -# Setting "restore_paused" to "yes" puts MPD into pause mode instead -# of starting playback after startup. -# -#restore_paused "no" -# -# This setting enables MPD to create playlists in a format usable by other -# music players. -# -#save_absolute_paths_in_playlists "no" -# -# This setting defines a list of tag types that will be extracted during the -# audio file discovery process. The complete list of possible values can be -# found in the user manual. -#metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc" -# -# This example just enables the "comment" tag without disabling all -# the other supported tags: -#metadata_to_use "+comment" -# -# This setting enables automatic update of MPD's database when files in -# music_directory are changed. -# -#auto_update "yes" -# -# Limit the depth of the directories being watched, 0 means only watch -# the music directory itself. There is no limit by default. -# -#auto_update_depth "3" -# -############################################################################### - - -# Symbolic link behavior ###################################################### -# -# If this setting is set to "yes", MPD will discover audio files by following -# symbolic links outside of the configured music_directory. -# -#follow_outside_symlinks "yes" -# -# If this setting is set to "yes", MPD will discover audio files by following -# symbolic links inside of the configured music_directory. -# -#follow_inside_symlinks "yes" -# -############################################################################### - - -# Zeroconf / Avahi Service Discovery ########################################## -# -# If this setting is set to "yes", service information will be published with -# Zeroconf / Avahi. -# -#zeroconf_enabled "yes" -# -# The argument to this setting will be the Zeroconf / Avahi unique name for -# this MPD server on the network. %h will be replaced with the hostname. -# -#zeroconf_name "Music Player @ %h" -# -############################################################################### - - -# Permissions ################################################################# -# -# If this setting is set, MPD will require password authorization. The password -# setting can be specified multiple times for different password profiles. -# -#password "password@read,add,control,admin" -# -# This setting specifies the permissions a user has who has not yet logged in. -# -#default_permissions "read,add,control,admin" -# -############################################################################### - - -# Database ####################################################################### -# -# An example of a database section instead of the old 'db_file' setting. -# It enables mounting other storages into the music directory. -# -#database { -# plugin "simple" -# path "~/.local/share/mpd/db -# cache_directory "~/.local/share/mpd/cache" -#} -# -# An example of database config for a satellite setup -# -#music_directory "nfs://fileserver.local/srv/mp3" -#database { -# plugin "proxy" -# host "other.mpd.host" -# port "6600" -#} - -# Input ####################################################################### -# -input { - plugin "curl" -# proxy "proxy.isp.com:8080" -# proxy_user "user" -# proxy_password "password" -} - -# -############################################################################### - -# Audio Output ################################################################ -# -# MPD supports various audio output types, as well as playing through multiple -# audio outputs at the same time, through multiple audio_output settings -# blocks. Setting this block is optional, though the server will only attempt -# autodetection for one sound card. -# -# An example of an ALSA output: -# -#audio_output { -# type "alsa" -# name "My ALSA Device" -## device "hw:0,0" # optional -## mixer_type "hardware" # optional -## mixer_device "default" # optional -## mixer_control "PCM" # optional -## mixer_index "0" # optional -#} -# -# An example of an OSS output: -# -#audio_output { -# type "oss" -# name "My OSS Device" -## device "/dev/dsp" # optional -## mixer_type "hardware" # optional -## mixer_device "/dev/mixer" # optional -## mixer_control "PCM" # optional -#} -# -# An example of a shout output (for streaming to Icecast): -# -#audio_output { -# type "shout" -# encoder "vorbis" # optional -# name "My Shout Stream" -# host "localhost" -# port "8000" -# mount "/mpd.ogg" -# password "hackme" -# quality "5.0" -# bitrate "128" -# format "44100:16:1" -## protocol "icecast2" # optional -## user "source" # optional -## description "My Stream Description" # optional -## url "http://example.com" # optional -## genre "jazz" # optional -## public "no" # optional -## timeout "2" # optional -## mixer_type "software" # optional -#} -# -# An example of a recorder output: -# -#audio_output { -# type "recorder" -# name "My recorder" -# encoder "vorbis" # optional, vorbis or lame -# path "/var/lib/mpd/recorder/mpd.ogg" -## quality "5.0" # do not define if bitrate is defined -# bitrate "128" # do not define if quality is defined -# format "44100:16:1" -#} -# -# An example of a httpd output (built-in HTTP streaming server): -# -#audio_output { -# type "httpd" -# name "My HTTP Stream" -# encoder "vorbis" # optional, vorbis or lame -# port "8000" -# bind_to_address "0.0.0.0" # optional, IPv4 or IPv6 -## quality "5.0" # do not define if bitrate is defined -# bitrate "128" # do not define if quality is defined -# format "44100:16:1" -# max_clients "0" # optional 0=no limit -#} -# -# An example of a pulseaudio output (streaming to a remote pulseaudio server) -# -#audio_output { -# type "pulse" -# name "My Pulse Output" -## server "remote_server" # optional -## sink "remote_server_sink" # optional -## media_role "media_role" #optional -#} -# -# An example of a winmm output (Windows multimedia API). -# -#audio_output { -# type "winmm" -# name "My WinMM output" -## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional -# or -## device "0" # optional -## mixer_type "hardware" # optional -#} -# -# An example of a wasapi output (Windows multimedia API). -# -#audio_output { -# type "wasapi" -# name "My WASAPI output" -## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional -# or -## device "0" # optional -## Exclusive mode blocks all other audio source, and get best audio quality without resampling. -## exclusive "no" # optional -## Enumerate all devices in log. -## enumerate "no" # optional -#} -# -# An example of an openal output. -# -#audio_output { -# type "openal" -# name "My OpenAL output" -## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional -#} -# -# An example of an sndio output. -# -#audio_output { -# type "sndio" -# name "sndio output" -# mixer_type "hardware" -#} -# -# An example of an OS X output: -# -#audio_output { -# type "osx" -# name "My OS X Device" -## device "Built-in Output" # optional -## channel_map "-1,-1,0,1" # optional -#} -# -## Example "pipe" output: -# -#audio_output { -# type "pipe" -# name "my pipe" -# command "aplay -f cd 2>/dev/null" -## Or if you're want to use AudioCompress -# command "AudioCompress -m | aplay -f cd 2>/dev/null" -## Or to send raw PCM stream through PCM: -# command "nc example.org 8765" -# format "44100:16:2" -#} -# -## An example of a null output (for no audio output): -# -#audio_output { -# type "null" -# name "My Null Output" -# mixer_type "none" # optional -#} -# -############################################################################### - - -# Normalization automatic volume adjustments ################################## -# -# This setting specifies the type of ReplayGain to use. This setting can have -# the argument "off", "album", "track" or "auto". "auto" is a special mode that -# chooses between "track" and "album" depending on the current state of -# random playback. If random playback is enabled then "track" mode is used. -# See for -# more details about ReplayGain. -# This setting is off by default. -# -#replaygain "album" -# -# This setting sets the pre-amp used for files that have ReplayGain tags. By -# default this setting is disabled. -# -#replaygain_preamp "0" -# -# This setting sets the pre-amp used for files that do NOT have ReplayGain tags. -# By default this setting is disabled. -# -#replaygain_missing_preamp "0" -# -# This setting enables or disables ReplayGain limiting. -# MPD calculates actual amplification based on the ReplayGain tags -# and replaygain_preamp / replaygain_missing_preamp setting. -# If replaygain_limit is enabled MPD will never amplify audio signal -# above its original level. If replaygain_limit is disabled such amplification -# might occur. By default this setting is enabled. -# -#replaygain_limit "yes" -# -# This setting enables on-the-fly normalization volume adjustment. This will -# result in the volume of all playing audio to be adjusted so the output has -# equal "loudness". This setting is disabled by default. -# -#volume_normalization "no" -# -############################################################################### - -# Character Encoding ########################################################## -# -# If file or directory names do not display correctly for your locale then you -# may need to modify this setting. -# -#filesystem_charset "UTF-8" -# -############################################################################### diff --git a/home-manger/mpd/test.TODO b/home-manger/mpd/test.TODO deleted file mode 100644 index 6225d8fd..00000000 --- a/home-manger/mpd/test.TODO +++ /dev/null @@ -1 +0,0 @@ -# TODO this still needs some client -- cgit 1.4.1