From 32d4278611a8e9a88ca54a27a072985087015039 Mon Sep 17 00:00:00 2001 From: ene Date: Fri, 17 Feb 2023 16:51:44 +0100 Subject: Feat(home-manager): Move configs in their own directory --- home-manager/alacritty/default.nix | 583 ------------------ home-manager/config/alacritty/default.nix | 583 ++++++++++++++++++ home-manager/config/cups/default.nix | 3 + home-manager/config/default.nix | 28 + home-manager/config/firefox/chrome/userChrome.css | 41 ++ home-manager/config/firefox/default.nix | 232 +++++++ .../config/firefox/scripts/unzip_mozlz4.py | 43 ++ .../config/firefox/scripts/update_extensions | 20 + home-manager/config/firefox/settings.nix | 660 ++++++++++++++++++++ .../config/firefox/settings/extensions.json | 37 ++ home-manager/config/firefox/settings/override.js | 137 +++++ home-manager/config/gammastep/default.nix | 20 + home-manager/config/git/default.nix | 141 +++++ home-manager/config/grades/config.yaml | 59 ++ home-manager/config/grades/default.nix | 3 + home-manager/config/gtk/default.nix | 60 ++ home-manager/config/keepassxc/default.nix | 9 + home-manager/config/keepassxc/keepassxc.ini | 58 ++ home-manager/config/latexindent/default.nix | 10 + home-manager/config/latexindent/indentconfig.yaml | 2 + home-manager/config/latexindent/mysettings.yaml | 672 +++++++++++++++++++++ home-manager/config/less/default.nix | 17 + home-manager/config/lf/cmds/archive.sh | 40 ++ home-manager/config/lf/cmds/broot_jump.sh | 19 + home-manager/config/lf/cmds/chmod.sh | 17 + home-manager/config/lf/cmds/clear_trash.sh | 10 + home-manager/config/lf/cmds/dl_file.sh | 36 ++ home-manager/config/lf/cmds/dragon.sh | 11 + home-manager/config/lf/cmds/dragon_individual.sh | 10 + home-manager/config/lf/cmds/dragon_stay.sh | 11 + home-manager/config/lf/cmds/fzf_jump.sh | 17 + home-manager/config/lf/cmds/help.sh | 10 + home-manager/config/lf/cmds/mk_dir.sh | 12 + home-manager/config/lf/cmds/mk_file.sh | 11 + home-manager/config/lf/cmds/mk_ln.sh | 43 ++ home-manager/config/lf/cmds/mk_scr.sh | 29 + home-manager/config/lf/cmds/open.sh | 16 + home-manager/config/lf/cmds/open_config.sh | 10 + home-manager/config/lf/cmds/restore_trash.sh | 10 + home-manager/config/lf/cmds/set_wall_paper.sh | 15 + home-manager/config/lf/cmds/stripspace.sh | 10 + home-manager/config/lf/cmds/sudo_mk_file.sh | 13 + home-manager/config/lf/cmds/trash.sh | 27 + home-manager/config/lf/cmds/unarchive.sh | 22 + home-manager/config/lf/colors | 196 ++++++ home-manager/config/lf/default.nix | 202 +++++++ home-manager/config/lf/icons | 357 +++++++++++ home-manager/config/mako/default.nix | 46 ++ home-manager/config/mpd/default.nix | 30 + home-manager/config/mpd/mpdconf.example | 418 +++++++++++++ home-manager/config/mpd/test.TODO | 1 + home-manager/config/neovim/default.nix | 10 + home-manager/config/npm/.npmrc | 6 + home-manager/config/npm/default.nix | 9 + home-manager/config/python/default.nix | 9 + home-manager/config/python/pythonrc | 11 + home-manager/config/rclone/default.nix | 9 + home-manager/config/rclone/rclone.conf | 10 + home-manager/config/river/default.nix | 10 + home-manager/config/river/init | 84 +++ home-manager/config/river/res/keys.ron | 57 ++ home-manager/config/river/res/safe_init | 160 +++++ home-manager/config/ssh/default.nix | 16 + home-manager/config/swayidle/config | 5 + home-manager/config/swayidle/default.nix | 29 + home-manager/config/swaylock/default.nix | 14 + home-manager/config/yambar/config/config.yml | 238 ++++++++ .../config/yambar/config/config.yml.diffrent | 56 ++ home-manager/config/yambar/config/laptop.yml | 117 ++++ home-manager/config/yambar/default.nix | 10 + home-manager/config/yambar/scripts/amixer-monitor | 24 + home-manager/config/yambar/scripts/cpu | 126 ++++ home-manager/config/yambar/scripts/dfspace | 23 + home-manager/config/yambar/scripts/grades-average | 12 + home-manager/config/yambar/scripts/meminfo | 37 ++ home-manager/config/yambar/scripts/nmclitest | 23 + home-manager/config/yambar/scripts/pingtest | 28 + home-manager/config/yambar/scripts/yambar-tray | 27 + .../config/yambar/scripts/yambar-tray-width | 28 + home-manager/config/zsh/config/custom_cursor.sh | 40 ++ home-manager/config/zsh/config/zsh-init.sh | 38 ++ home-manager/config/zsh/config/zsh-prompt.sh | 63 ++ home-manager/config/zsh/default.nix | 148 +++++ home-manager/cups/default.nix | 3 - home-manager/default.nix | 28 +- home-manager/firefox/chrome/userChrome.css | 41 -- home-manager/firefox/default.nix | 232 ------- home-manager/firefox/scripts/unzip_mozlz4.py | 43 -- home-manager/firefox/scripts/update_extensions | 20 - home-manager/firefox/settings.nix | 660 -------------------- home-manager/firefox/settings/extensions.json | 37 -- home-manager/firefox/settings/override.js | 137 ----- home-manager/gammastep/default.nix | 20 - home-manager/git/default.nix | 141 ----- home-manager/grades/config.yaml | 59 -- home-manager/grades/default.nix | 3 - home-manager/gtk/default.nix | 60 -- home-manager/keepassxc/default.nix | 9 - home-manager/keepassxc/keepassxc.ini | 58 -- home-manager/latexindent/default.nix | 10 - 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 | 202 ------- 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-manager/neovim/default.nix | 10 - home-manager/npm/.npmrc | 6 - home-manager/npm/default.nix | 9 - home-manager/python/default.nix | 9 - home-manager/python/pythonrc | 11 - home-manager/rclone/default.nix | 9 - home-manager/rclone/rclone.conf | 10 - home-manager/river/default.nix | 10 - home-manager/river/init | 84 --- home-manager/river/res/keys.ron | 57 -- home-manager/river/res/safe_init | 160 ----- home-manager/ssh/default.nix | 16 - home-manager/swayidle/config | 5 - home-manager/swayidle/default.nix | 29 - home-manager/swaylock/default.nix | 14 - home-manager/yambar/config/config.yml | 238 -------- home-manager/yambar/config/config.yml.diffrent | 56 -- home-manager/yambar/config/laptop.yml | 117 ---- home-manager/yambar/default.nix | 10 - home-manager/yambar/scripts/amixer-monitor | 24 - home-manager/yambar/scripts/cpu | 126 ---- home-manager/yambar/scripts/dfspace | 23 - home-manager/yambar/scripts/grades-average | 12 - home-manager/yambar/scripts/meminfo | 37 -- home-manager/yambar/scripts/nmclitest | 23 - home-manager/yambar/scripts/pingtest | 28 - home-manager/yambar/scripts/yambar-tray | 27 - home-manager/yambar/scripts/yambar-tray-width | 28 - home-manager/zsh/config/custom_cursor.sh | 40 -- home-manager/zsh/config/zsh-init.sh | 38 -- home-manager/zsh/config/zsh-prompt.sh | 63 -- home-manager/zsh/default.nix | 148 ----- 164 files changed, 5963 insertions(+), 5959 deletions(-) delete mode 100644 home-manager/alacritty/default.nix create mode 100644 home-manager/config/alacritty/default.nix create mode 100644 home-manager/config/cups/default.nix create mode 100644 home-manager/config/default.nix create mode 100644 home-manager/config/firefox/chrome/userChrome.css create mode 100644 home-manager/config/firefox/default.nix create mode 100755 home-manager/config/firefox/scripts/unzip_mozlz4.py create mode 100755 home-manager/config/firefox/scripts/update_extensions create mode 100644 home-manager/config/firefox/settings.nix create mode 100644 home-manager/config/firefox/settings/extensions.json create mode 100644 home-manager/config/firefox/settings/override.js create mode 100644 home-manager/config/gammastep/default.nix create mode 100644 home-manager/config/git/default.nix create mode 100644 home-manager/config/grades/config.yaml create mode 100644 home-manager/config/grades/default.nix create mode 100644 home-manager/config/gtk/default.nix create mode 100644 home-manager/config/keepassxc/default.nix create mode 100644 home-manager/config/keepassxc/keepassxc.ini create mode 100644 home-manager/config/latexindent/default.nix create mode 100644 home-manager/config/latexindent/indentconfig.yaml create mode 100644 home-manager/config/latexindent/mysettings.yaml create mode 100644 home-manager/config/less/default.nix create mode 100644 home-manager/config/lf/cmds/archive.sh create mode 100644 home-manager/config/lf/cmds/broot_jump.sh create mode 100644 home-manager/config/lf/cmds/chmod.sh create mode 100644 home-manager/config/lf/cmds/clear_trash.sh create mode 100644 home-manager/config/lf/cmds/dl_file.sh create mode 100644 home-manager/config/lf/cmds/dragon.sh create mode 100644 home-manager/config/lf/cmds/dragon_individual.sh create mode 100644 home-manager/config/lf/cmds/dragon_stay.sh create mode 100644 home-manager/config/lf/cmds/fzf_jump.sh create mode 100644 home-manager/config/lf/cmds/help.sh create mode 100644 home-manager/config/lf/cmds/mk_dir.sh create mode 100644 home-manager/config/lf/cmds/mk_file.sh create mode 100644 home-manager/config/lf/cmds/mk_ln.sh create mode 100644 home-manager/config/lf/cmds/mk_scr.sh create mode 100644 home-manager/config/lf/cmds/open.sh create mode 100644 home-manager/config/lf/cmds/open_config.sh create mode 100644 home-manager/config/lf/cmds/restore_trash.sh create mode 100644 home-manager/config/lf/cmds/set_wall_paper.sh create mode 100644 home-manager/config/lf/cmds/stripspace.sh create mode 100644 home-manager/config/lf/cmds/sudo_mk_file.sh create mode 100644 home-manager/config/lf/cmds/trash.sh create mode 100644 home-manager/config/lf/cmds/unarchive.sh create mode 100644 home-manager/config/lf/colors create mode 100644 home-manager/config/lf/default.nix create mode 100644 home-manager/config/lf/icons create mode 100644 home-manager/config/mako/default.nix create mode 100644 home-manager/config/mpd/default.nix create mode 100644 home-manager/config/mpd/mpdconf.example create mode 100644 home-manager/config/mpd/test.TODO create mode 100644 home-manager/config/neovim/default.nix create mode 100644 home-manager/config/npm/.npmrc create mode 100644 home-manager/config/npm/default.nix create mode 100644 home-manager/config/python/default.nix create mode 100644 home-manager/config/python/pythonrc create mode 100644 home-manager/config/rclone/default.nix create mode 100644 home-manager/config/rclone/rclone.conf create mode 100644 home-manager/config/river/default.nix create mode 100755 home-manager/config/river/init create mode 100644 home-manager/config/river/res/keys.ron create mode 100755 home-manager/config/river/res/safe_init create mode 100644 home-manager/config/ssh/default.nix create mode 100644 home-manager/config/swayidle/config create mode 100644 home-manager/config/swayidle/default.nix create mode 100644 home-manager/config/swaylock/default.nix create mode 100644 home-manager/config/yambar/config/config.yml create mode 100644 home-manager/config/yambar/config/config.yml.diffrent create mode 100644 home-manager/config/yambar/config/laptop.yml create mode 100644 home-manager/config/yambar/default.nix create mode 100755 home-manager/config/yambar/scripts/amixer-monitor create mode 100755 home-manager/config/yambar/scripts/cpu create mode 100755 home-manager/config/yambar/scripts/dfspace create mode 100755 home-manager/config/yambar/scripts/grades-average create mode 100755 home-manager/config/yambar/scripts/meminfo create mode 100755 home-manager/config/yambar/scripts/nmclitest create mode 100755 home-manager/config/yambar/scripts/pingtest create mode 100755 home-manager/config/yambar/scripts/yambar-tray create mode 100755 home-manager/config/yambar/scripts/yambar-tray-width create mode 100644 home-manager/config/zsh/config/custom_cursor.sh create mode 100644 home-manager/config/zsh/config/zsh-init.sh create mode 100644 home-manager/config/zsh/config/zsh-prompt.sh create mode 100644 home-manager/config/zsh/default.nix delete mode 100644 home-manager/cups/default.nix delete mode 100644 home-manager/firefox/chrome/userChrome.css delete mode 100644 home-manager/firefox/default.nix delete mode 100755 home-manager/firefox/scripts/unzip_mozlz4.py delete mode 100755 home-manager/firefox/scripts/update_extensions delete mode 100644 home-manager/firefox/settings.nix delete mode 100644 home-manager/firefox/settings/extensions.json delete mode 100644 home-manager/firefox/settings/override.js delete mode 100644 home-manager/gammastep/default.nix delete mode 100644 home-manager/git/default.nix delete mode 100644 home-manager/grades/config.yaml delete mode 100644 home-manager/grades/default.nix delete mode 100644 home-manager/gtk/default.nix delete mode 100644 home-manager/keepassxc/default.nix delete mode 100644 home-manager/keepassxc/keepassxc.ini delete mode 100644 home-manager/latexindent/default.nix delete mode 100644 home-manager/latexindent/indentconfig.yaml delete mode 100644 home-manager/latexindent/mysettings.yaml delete mode 100644 home-manager/less/default.nix delete mode 100644 home-manager/lf/cmds/archive.sh delete mode 100644 home-manager/lf/cmds/broot_jump.sh delete mode 100644 home-manager/lf/cmds/chmod.sh delete mode 100644 home-manager/lf/cmds/clear_trash.sh delete mode 100644 home-manager/lf/cmds/dl_file.sh delete mode 100644 home-manager/lf/cmds/dragon.sh delete mode 100644 home-manager/lf/cmds/dragon_individual.sh delete mode 100644 home-manager/lf/cmds/dragon_stay.sh delete mode 100644 home-manager/lf/cmds/fzf_jump.sh delete mode 100644 home-manager/lf/cmds/help.sh delete mode 100644 home-manager/lf/cmds/mk_dir.sh delete mode 100644 home-manager/lf/cmds/mk_file.sh delete mode 100644 home-manager/lf/cmds/mk_ln.sh delete mode 100644 home-manager/lf/cmds/mk_scr.sh delete mode 100644 home-manager/lf/cmds/open.sh delete mode 100644 home-manager/lf/cmds/open_config.sh delete mode 100644 home-manager/lf/cmds/restore_trash.sh delete mode 100644 home-manager/lf/cmds/set_wall_paper.sh delete mode 100644 home-manager/lf/cmds/stripspace.sh delete mode 100644 home-manager/lf/cmds/sudo_mk_file.sh delete mode 100644 home-manager/lf/cmds/trash.sh delete mode 100644 home-manager/lf/cmds/unarchive.sh delete mode 100644 home-manager/lf/colors delete mode 100644 home-manager/lf/default.nix delete mode 100644 home-manager/lf/icons delete mode 100644 home-manager/mako/default.nix delete mode 100644 home-manager/mpd/default.nix delete mode 100644 home-manager/mpd/mpdconf.example delete mode 100644 home-manager/mpd/test.TODO delete mode 100644 home-manager/neovim/default.nix delete mode 100644 home-manager/npm/.npmrc delete mode 100644 home-manager/npm/default.nix delete mode 100644 home-manager/python/default.nix delete mode 100644 home-manager/python/pythonrc delete mode 100644 home-manager/rclone/default.nix delete mode 100644 home-manager/rclone/rclone.conf delete mode 100644 home-manager/river/default.nix delete mode 100755 home-manager/river/init delete mode 100644 home-manager/river/res/keys.ron delete mode 100755 home-manager/river/res/safe_init delete mode 100644 home-manager/ssh/default.nix delete mode 100644 home-manager/swayidle/config delete mode 100644 home-manager/swayidle/default.nix delete mode 100644 home-manager/swaylock/default.nix delete mode 100644 home-manager/yambar/config/config.yml delete mode 100644 home-manager/yambar/config/config.yml.diffrent delete mode 100644 home-manager/yambar/config/laptop.yml delete mode 100644 home-manager/yambar/default.nix delete mode 100755 home-manager/yambar/scripts/amixer-monitor delete mode 100755 home-manager/yambar/scripts/cpu delete mode 100755 home-manager/yambar/scripts/dfspace delete mode 100755 home-manager/yambar/scripts/grades-average delete mode 100755 home-manager/yambar/scripts/meminfo delete mode 100755 home-manager/yambar/scripts/nmclitest delete mode 100755 home-manager/yambar/scripts/pingtest delete mode 100755 home-manager/yambar/scripts/yambar-tray delete mode 100755 home-manager/yambar/scripts/yambar-tray-width delete mode 100644 home-manager/zsh/config/custom_cursor.sh delete mode 100644 home-manager/zsh/config/zsh-init.sh delete mode 100644 home-manager/zsh/config/zsh-prompt.sh delete mode 100644 home-manager/zsh/default.nix diff --git a/home-manager/alacritty/default.nix b/home-manager/alacritty/default.nix deleted file mode 100644 index 2a18b0d9..00000000 --- a/home-manager/alacritty/default.nix +++ /dev/null @@ -1,583 +0,0 @@ -{config, ...}: { -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/config/alacritty/default.nix b/home-manager/config/alacritty/default.nix new file mode 100644 index 00000000..2a18b0d9 --- /dev/null +++ b/home-manager/config/alacritty/default.nix @@ -0,0 +1,583 @@ +{config, ...}: { +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/config/cups/default.nix b/home-manager/config/cups/default.nix new file mode 100644 index 00000000..4fef0a9c --- /dev/null +++ b/home-manager/config/cups/default.nix @@ -0,0 +1,3 @@ +{config, ...}: { +xdg.configFile."cups/lpoptions".text = "Default Brother\n"; +} diff --git a/home-manager/config/default.nix b/home-manager/config/default.nix new file mode 100644 index 00000000..d056d81e --- /dev/null +++ b/home-manager/config/default.nix @@ -0,0 +1,28 @@ +# vim: ts=2 +{_}: { + imports = [ + ./alacritty + ./cups + ./firefox + ./gammastep + ./git + ./grades + ./gtk + ./keepassxc + ./latexindent + ./less + ./lf + ./mako + ./mpd + ./neovim + ./npm + ./python + ./rclone + ./river + ./ssh + ./swayidle + ./swaylock + ./yambar + ./zsh + ]; +} diff --git a/home-manager/config/firefox/chrome/userChrome.css b/home-manager/config/firefox/chrome/userChrome.css new file mode 100644 index 00000000..0b3aff77 --- /dev/null +++ b/home-manager/config/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/config/firefox/default.nix b/home-manager/config/firefox/default.nix new file mode 100644 index 00000000..88fad227 --- /dev/null +++ b/home-manager/config/firefox/default.nix @@ -0,0 +1,232 @@ +# vim: ts=2 +{ + config, + pkgs, + lib, + stdenv, + strip_js_comments, + generate_extensions, + user_js, + system, + ... +}: let + userChrome = builtins.readFile ./chrome/userChrome.css; + + user_js_override = pkgs.writeText "user.override.js" (builtins.readFile ./settings/override.js); + user_js_nix = pkgs.runCommand "user.js" {} '' + mkdir $out; + cat "${user_js}/user.js" > $out/user.js; + cat "${user_js_override}" >> $out/user.js; + + "${strip_js_comments.app.${system}.default.program}" $out/user.js > $out/user_clean.js; + # echo "{" > $out/user.nix.tmp + # sed 's/user_pref(\(.*\)",\(.*\));/\1" = \2;/' $out/user_clean.js >> $out/user.nix.tmp; + # echo "}" >> $out/user.nix.tmp + # awk '!/"_user.js.parrot"/' $out/user.nix.tmp >> $out/user.nix; # delete duplicate keys + ''; + + extensions = builtins.map buildFirefoxXpiAddon ( + lib.attrValues ( + lib.importJSON ./settings/extensions.json + ) + ); + + # source: https://gitlab.com/rycee/nur-expressions/-/blob/master/pkgs/firefox-addons/default.nix + buildFirefoxXpiAddon = { + pname, + version, + addonId, + url, + sha256, +#meta, + ... + }: + pkgs.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 = { + # 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.home.homeDirectory}/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; + }; +in { + home.packages = [ + pkgs.firefox-wayland + ]; + home.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; + profiles."default" = { + inherit extensions; + isDefault = true; + id = 0; + name = "default"; + + inherit userChrome; + + 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; + extraConfig = builtins.readFile "${user_js_nix}/user.js"; + }; + }; +} diff --git a/home-manager/config/firefox/scripts/unzip_mozlz4.py b/home-manager/config/firefox/scripts/unzip_mozlz4.py new file mode 100755 index 00000000..311fd214 --- /dev/null +++ b/home-manager/config/firefox/scripts/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/config/firefox/scripts/update_extensions b/home-manager/config/firefox/scripts/update_extensions new file mode 100755 index 00000000..97f7c0ba --- /dev/null +++ b/home-manager/config/firefox/scripts/update_extensions @@ -0,0 +1,20 @@ +#!/bin/sh +# shellcheck disable=SC2086 +# shellcheck source=/dev/null +. ~/.local/lib/shell/lib + +tmp=$(mktmp) +cat << EOF > $tmp + darkreader + firenvim + keepassxc-browser + simple-tab-groups + ublock-origin +EOF + + +nix shell git+https://codeberg.org/ene/generate_moz_extension.git -c generate_extensions $(cat $tmp) > "$(dirname $0)"/../settings/extensions.json + + + +if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manager/config/firefox/settings.nix b/home-manager/config/firefox/settings.nix new file mode 100644 index 00000000..f38e23b3 --- /dev/null +++ b/home-manager/config/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/config/firefox/settings/extensions.json b/home-manager/config/firefox/settings/extensions.json new file mode 100644 index 00000000..057810bc --- /dev/null +++ b/home-manager/config/firefox/settings/extensions.json @@ -0,0 +1,37 @@ +{ + "darkreader": { + "addonId": "addon@darkreader.org", + "pname": "darkreader", + "sha256": "sha256:e537a2cee45ed7c26f79ecd3ed362620e3f00d24c158532a58e163a63a3d60cc", + "url": "https://addons.mozilla.org/firefox/downloads/file/4053589/darkreader-4.9.62.xpi", + "version": "4.9.62" + }, + "firenvim": { + "addonId": "firenvim@lacamb.re", + "pname": "firenvim", + "sha256": "sha256:a8c495a59e30eaabbb3fcd188db9b5e28b40bffefe41a3f0fa22ecc58c80c2b6", + "url": "https://addons.mozilla.org/firefox/downloads/file/4026386/firenvim-0.2.14.xpi", + "version": "0.2.14" + }, + "keepassxc-browser": { + "addonId": "keepassxc-browser@keepassxc.org", + "pname": "keepassxc-browser", + "sha256": "sha256:cc39aa058cb8915cfc88424e2e1cebe3ccfc3f95d7bddb2abd0c4905d2b17719", + "url": "https://addons.mozilla.org/firefox/downloads/file/4045866/keepassxc_browser-1.8.4.xpi", + "version": "1.8.4" + }, + "simple-tab-groups": { + "addonId": "simple-tab-groups@drive4ik", + "pname": "simple-tab-groups", + "sha256": "sha256:75077589098ca62c00b86cf9554c6120bf8dc04c5f916fe26f84915f5147b2a4", + "url": "https://addons.mozilla.org/firefox/downloads/file/3873608/simple_tab_groups-4.7.2.1.xpi", + "version": "4.7.2.1" + }, + "ublock-origin": { + "addonId": "uBlock0@raymondhill.net", + "pname": "ublock-origin", + "sha256": "sha256:6bf8af5266353fab5eabdc7476de026e01edfb7901b0430c5e539f6791f1edc8", + "url": "https://addons.mozilla.org/firefox/downloads/file/4047353/ublock_origin-1.46.0.xpi", + "version": "1.46.0" + } +} diff --git a/home-manager/config/firefox/settings/override.js b/home-manager/config/firefox/settings/override.js new file mode 100644 index 00000000..ca03e8ed --- /dev/null +++ b/home-manager/config/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", false); // 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/config/gammastep/default.nix b/home-manager/config/gammastep/default.nix new file mode 100644 index 00000000..79b027cd --- /dev/null +++ b/home-manager/config/gammastep/default.nix @@ -0,0 +1,20 @@ +{config, lib, ...}: { + services.gammastep = { + enable = true; + settings = { + general = { + temp-day = lib.mkForce 1300; + temp-night = lib.mkForce 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/config/git/default.nix b/home-manager/config/git/default.nix new file mode 100644 index 00000000..667bb206 --- /dev/null +++ b/home-manager/config/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 { + 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/config/grades/config.yaml b/home-manager/config/grades/config.yaml new file mode 100644 index 00000000..ebbc61f8 --- /dev/null +++ b/home-manager/config/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/config/grades/default.nix b/home-manager/config/grades/default.nix new file mode 100644 index 00000000..22c5a6d4 --- /dev/null +++ b/home-manager/config/grades/default.nix @@ -0,0 +1,3 @@ +{config, ...}: { + xdg.configFile."grades/config.yaml".source = ./config.yaml; +} diff --git a/home-manager/config/gtk/default.nix b/home-manager/config/gtk/default.nix new file mode 100644 index 00000000..a3f197d2 --- /dev/null +++ b/home-manager/config/gtk/default.nix @@ -0,0 +1,60 @@ +{ + config, + lib, + pkgs, + stdenv, + ... +}: { + gtk = { + 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/config/keepassxc/default.nix b/home-manager/config/keepassxc/default.nix new file mode 100644 index 00000000..152611c1 --- /dev/null +++ b/home-manager/config/keepassxc/default.nix @@ -0,0 +1,9 @@ +{ + config, + pkgs, + ... +}: { + xdg.configFile."keepassxc/keepassxc.ini".source = ./keepassxc.ini; +} +# vim: ts=2 + diff --git a/home-manager/config/keepassxc/keepassxc.ini b/home-manager/config/keepassxc/keepassxc.ini new file mode 100644 index 00000000..ee10d691 --- /dev/null +++ b/home-manager/config/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/config/latexindent/default.nix b/home-manager/config/latexindent/default.nix new file mode 100644 index 00000000..10bae481 --- /dev/null +++ b/home-manager/config/latexindent/default.nix @@ -0,0 +1,10 @@ +{ + config, + pkgs, + ... +}: { + xdg.configFile."latexindent/indentconfig.yaml".source = ./indentconfig.yaml; + xdg.configFile."latexindent/mysettings.yaml".source = ./mysettings.yaml; +} +# vim: ts=2 + diff --git a/home-manager/config/latexindent/indentconfig.yaml b/home-manager/config/latexindent/indentconfig.yaml new file mode 100644 index 00000000..d67351f3 --- /dev/null +++ b/home-manager/config/latexindent/indentconfig.yaml @@ -0,0 +1,2 @@ +paths: +- /home/dt/.config/latexindent/mysettings.yaml diff --git a/home-manager/config/latexindent/mysettings.yaml b/home-manager/config/latexindent/mysettings.yaml new file mode 100644 index 00000000..9a0f8b2f --- /dev/null +++ b/home-manager/config/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/config/lf/cmds/broot_jump.sh b/home-manager/config/lf/cmds/broot_jump.sh new file mode 100644 index 00000000..188c9508 --- /dev/null +++ b/home-manager/config/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/config/lf/cmds/chmod.sh b/home-manager/config/lf/cmds/chmod.sh new file mode 100644 index 00000000..f6a87336 --- /dev/null +++ b/home-manager/config/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/config/lf/cmds/clear_trash.sh b/home-manager/config/lf/cmds/clear_trash.sh new file mode 100644 index 00000000..c02321f2 --- /dev/null +++ b/home-manager/config/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/config/lf/cmds/dl_file.sh b/home-manager/config/lf/cmds/dl_file.sh new file mode 100644 index 00000000..9cb9023c --- /dev/null +++ b/home-manager/config/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/config/lf/cmds/dragon.sh b/home-manager/config/lf/cmds/dragon.sh new file mode 100644 index 00000000..36e94706 --- /dev/null +++ b/home-manager/config/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/config/lf/cmds/dragon_individual.sh b/home-manager/config/lf/cmds/dragon_individual.sh new file mode 100644 index 00000000..abcadb13 --- /dev/null +++ b/home-manager/config/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/config/lf/cmds/dragon_stay.sh b/home-manager/config/lf/cmds/dragon_stay.sh new file mode 100644 index 00000000..60195d09 --- /dev/null +++ b/home-manager/config/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/config/lf/cmds/fzf_jump.sh b/home-manager/config/lf/cmds/fzf_jump.sh new file mode 100644 index 00000000..688efdb9 --- /dev/null +++ b/home-manager/config/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/config/lf/cmds/help.sh b/home-manager/config/lf/cmds/help.sh new file mode 100644 index 00000000..8fedd0ea --- /dev/null +++ b/home-manager/config/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/config/lf/cmds/mk_dir.sh b/home-manager/config/lf/cmds/mk_dir.sh new file mode 100644 index 00000000..bfa0627d --- /dev/null +++ b/home-manager/config/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/config/lf/cmds/mk_file.sh b/home-manager/config/lf/cmds/mk_file.sh new file mode 100644 index 00000000..044016a6 --- /dev/null +++ b/home-manager/config/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/config/lf/cmds/mk_ln.sh b/home-manager/config/lf/cmds/mk_ln.sh new file mode 100644 index 00000000..71a70a36 --- /dev/null +++ b/home-manager/config/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/config/lf/cmds/mk_scr.sh b/home-manager/config/lf/cmds/mk_scr.sh new file mode 100644 index 00000000..b6c17458 --- /dev/null +++ b/home-manager/config/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/config/lf/cmds/open.sh b/home-manager/config/lf/cmds/open.sh new file mode 100644 index 00000000..8376be21 --- /dev/null +++ b/home-manager/config/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/config/lf/cmds/open_config.sh b/home-manager/config/lf/cmds/open_config.sh new file mode 100644 index 00000000..93c174d7 --- /dev/null +++ b/home-manager/config/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/config/lf/cmds/restore_trash.sh b/home-manager/config/lf/cmds/restore_trash.sh new file mode 100644 index 00000000..432e9e9b --- /dev/null +++ b/home-manager/config/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/config/lf/cmds/set_wall_paper.sh b/home-manager/config/lf/cmds/set_wall_paper.sh new file mode 100644 index 00000000..4599de2a --- /dev/null +++ b/home-manager/config/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/config/lf/cmds/stripspace.sh b/home-manager/config/lf/cmds/stripspace.sh new file mode 100644 index 00000000..c7f68767 --- /dev/null +++ b/home-manager/config/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/config/lf/cmds/sudo_mk_file.sh b/home-manager/config/lf/cmds/sudo_mk_file.sh new file mode 100644 index 00000000..1f06a92f --- /dev/null +++ b/home-manager/config/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/config/lf/cmds/trash.sh b/home-manager/config/lf/cmds/trash.sh new file mode 100644 index 00000000..4598b4fd --- /dev/null +++ b/home-manager/config/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/config/lf/cmds/unarchive.sh b/home-manager/config/lf/cmds/unarchive.sh new file mode 100644 index 00000000..47a713fa --- /dev/null +++ b/home-manager/config/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/config/lf/colors b/home-manager/config/lf/colors new file mode 100644 index 00000000..c4b6417b --- /dev/null +++ b/home-manager/config/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/config/lf/default.nix b/home-manager/config/lf/default.nix new file mode 100644 index 00000000..e27b040c --- /dev/null +++ b/home-manager/config/lf/default.nix @@ -0,0 +1,202 @@ +{ + 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 { + xdg.configFile."lf/icons".source = ./icons; + xdg.configFile."lf/colors".source = ./colors; + + 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"; + }; +# TODO add ctpv, if it gets merged +# previewer = { +# keybinding = "i"; +# source = pkgs.ctpv; +# }; + settings = { + # TODO this needs to be added to nixos: + #autoquit = true; # quit the server, if no clients are left + #dirpreviews = true; # preview for directories + + dircounts = true; # count things in directories TODO this has performance impact + 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 + }; + # TODO remove auto quit, if it has been added + # TODO add ctpv, if it gets merged + extraConfig = '' + &ctpv -s $id + &ctpvquit $id + set cleaner = {pkgs.ctpv} + + set autoquit = true + set dirpreviews = true + ''; + }; +} +# vim: ts=2 + diff --git a/home-manager/config/lf/icons b/home-manager/config/lf/icons new file mode 100644 index 00000000..68d53e34 --- /dev/null +++ b/home-manager/config/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/config/mako/default.nix b/home-manager/config/mako/default.nix new file mode 100644 index 00000000..9b9e01a0 --- /dev/null +++ b/home-manager/config/mako/default.nix @@ -0,0 +1,46 @@ +{ + config, + pkgs, + ... +}: { + programs.mako = { + enable = true; + backgroundColor = "#2e3440"; + borderColor = "#88c0d0"; + borderRadius = 25; + borderSize = 2; + defaultTimeout = 5000; + font = "Source Code Pro 10"; + width = 500; + height = 500; + icons = true; + ignoreTimeout = 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/config/mpd/default.nix b/home-manager/config/mpd/default.nix new file mode 100644 index 00000000..ea535415 --- /dev/null +++ b/home-manager/config/mpd/default.nix @@ -0,0 +1,30 @@ +{ + config, + pkgs, + ... +}: let + dataDir = "${config.xdg.dataHome}/mpd"; +in { +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/config/mpd/mpdconf.example b/home-manager/config/mpd/mpdconf.example new file mode 100644 index 00000000..eaa5e641 --- /dev/null +++ b/home-manager/config/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/config/mpd/test.TODO b/home-manager/config/mpd/test.TODO new file mode 100644 index 00000000..6225d8fd --- /dev/null +++ b/home-manager/config/mpd/test.TODO @@ -0,0 +1 @@ +# TODO this still needs some client diff --git a/home-manager/config/neovim/default.nix b/home-manager/config/neovim/default.nix new file mode 100644 index 00000000..8074f19d --- /dev/null +++ b/home-manager/config/neovim/default.nix @@ -0,0 +1,10 @@ +{ + config, + pkgs, + neovim_config, + ... +}: { + xdg.configFile."neovim".source = neovim_config; +} +# vim: ts=2 + diff --git a/home-manager/config/npm/.npmrc b/home-manager/config/npm/.npmrc new file mode 100644 index 00000000..d0d846bd --- /dev/null +++ b/home-manager/config/npm/.npmrc @@ -0,0 +1,6 @@ +scripts-prepend-node-path=true +node_gyp= +prefix=${XDG_DATA_HOME}/npm +cache=${XDG_CACHE_HOME}/npm +tmp=${XDG_RUNTIME_DIR}/npm +init-module=${XDG_CONFIG_HOME}/npm/config/npm-init.js diff --git a/home-manager/config/npm/default.nix b/home-manager/config/npm/default.nix new file mode 100644 index 00000000..d12ce73b --- /dev/null +++ b/home-manager/config/npm/default.nix @@ -0,0 +1,9 @@ +{ + config, + pkgs, + ... +}: { + xdg.configFile."npm/.npmrc".source = ./.npmrc; +} +# vim: ts=2 + diff --git a/home-manager/config/python/default.nix b/home-manager/config/python/default.nix new file mode 100644 index 00000000..4fd01a0a --- /dev/null +++ b/home-manager/config/python/default.nix @@ -0,0 +1,9 @@ +{ + config, + pkgs, + ... +}: { + xdg.configFile."python/pythonrc".source = ./pythonrc; +} +# vim: ts=2 + diff --git a/home-manager/config/python/pythonrc b/home-manager/config/python/pythonrc new file mode 100644 index 00000000..38c48e0f --- /dev/null +++ b/home-manager/config/python/pythonrc @@ -0,0 +1,11 @@ +import os +import atexit +import readline + +history = os.path.join(os.environ['XDG_CACHE_HOME'], 'python_history') +readline.read_history_file(history) + +def write_history(): + readline.write_history_file(history) + +atexit.register(write_history) diff --git a/home-manager/config/rclone/default.nix b/home-manager/config/rclone/default.nix new file mode 100644 index 00000000..1939a0b5 --- /dev/null +++ b/home-manager/config/rclone/default.nix @@ -0,0 +1,9 @@ +{ + config, + pkgs, + ... +}: { + xdg.configFile."rclone/rclone.conf".source = ./rclone.conf; +} +# vim: ts=2 + diff --git a/home-manager/config/rclone/rclone.conf b/home-manager/config/rclone/rclone.conf new file mode 100644 index 00000000..9e1c4f08 --- /dev/null +++ b/home-manager/config/rclone/rclone.conf @@ -0,0 +1,10 @@ +[vhack1] +type = sftp +host = server1.vhack.eu +user = soispha +key_use_agent = true +known_hosts_file = ~/.local/share/ssh/known_hosts +shell_type = unix +md5sum_command = md5sum +sha1sum_command = sha1sum + diff --git a/home-manager/config/river/default.nix b/home-manager/config/river/default.nix new file mode 100644 index 00000000..d0de7f13 --- /dev/null +++ b/home-manager/config/river/default.nix @@ -0,0 +1,10 @@ +{ + config, + pkgs, + ... +}: { + xdg.configFile."river/init".source = ./init; + xdg.configFile."river/res".source = ./res; +} +# vim: ts=2 + diff --git a/home-manager/config/river/init b/home-manager/config/river/init new file mode 100755 index 00000000..4c49489a --- /dev/null +++ b/home-manager/config/river/init @@ -0,0 +1,84 @@ +#!/bin/sh +# shellcheck disable=SC2086 +# shellcheck source=/dev/null +. ~/.local/lib/shell/lib + +err_fail() { + "$@" + if [ $? -ne 0 ] ;then + printf "%s\n" "$@" >> ~/river_log + exec ~/.config/river/res/safe_init + fi +} +rm ~/river_log +exec 1>>"$HOME/river_log" +exec 2>>"$HOME"/river_log + +#Setup of environment variables {{{ +err_fail msg "Starting environment variables set" +err_fail riverctl spawn "exec dbus-update-activation-environment SEATD_SOCK DISPLAY WAYLAND_DISPLAY DESKTOP_SESSION=river XDG_CURRENT_DESKTOP=river" +err_fail export XDG_CURRENT_DESKTOP=river +#}}} + +# Setup of mappings {{{ +err_fail msg "Started river_init_lesser" +err_fail river_init_lesser ~/.config/river/res/keys.ron +# }}} + +# Setup of Rules {{{ +err_fail msg "Starting Rules set" +err_fail riverctl float-filter-add app-id float +err_fail riverctl float-filter-add app-id mpv +err_fail riverctl float-filter-add app-id ModernGL +err_fail riverctl float-filter-add title "Manim Slides" + +err_fail riverctl csd-filter-add app-id firefox +# }}} + +# Set riverctl settings {{{ +err_fail msg "Starting Riverctl settings" +# background +err_fail riverctl background-color 0x002b36 +err_fail riverctl border-color-focused 0x93a1a1 +err_fail riverctl border-color-unfocused 0x586e75 + +# keyboard repeat rate +err_fail riverctl set-repeat 50 300 + +# Cursor +err_fail riverctl focus-follows-cursor always +#riverctl hide-cursor timeout 2000 +err_fail riverctl hide-cursor when-typing enabled +err_fail riverctl set-cursor-warp on-output-change + +err_fail riverctl input pointer-1133-49970-Logitech_Gaming_Mouse_G502 pointer-accel 0 +err_fail riverctl input pointer-1133-49970-Logitech_Gaming_Mouse_G502 accel-profile none + +# remove GTK buttons in titlebar +err_fail gsettings set org.gnome.desktop.wm.preferences button-layout "" +# }}} + +# Setup of general apps {{{ +err_fail msg "Starting apps" +err_fail gammastep & + +err_fail wlr-randr --output DP-2 --pos 2560,0 +err_fail wlr-randr --output DP-1 --scale 1.5 --pos 0,0 + +err_fail yambar & + +err_fail mako & +err_fail swaybg -i "$AWMWALLPAPER" & +err_fail swayidle & +alacritty & +# }}} + + + +# Setup of layout [acts as exec!] {{{ +err_fail riverctl default-layout rivertile +err_fail rivertile -main-ratio 0.5 -view-padding 1 -outer-padding 0 + +#riverctl default-layout luatile +#river-luatile +# }}} diff --git a/home-manager/config/river/res/keys.ron b/home-manager/config/river/res/keys.ron new file mode 100644 index 00000000..a4ad6988 --- /dev/null +++ b/home-manager/config/river/res/keys.ron @@ -0,0 +1,57 @@ +#![enable(implicit_some)] +RiverctlCommandArray( + commands: [ + // Focus change + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "T", mods: "Super", command: "focus-view", command_args: "next",), + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "N", mods: "Super", command: "focus-view", command_args: "previous",), + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "T", mods: "Super+Control", command: "focus-output", command_args: "next",), + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "N", mods: "Super+Control", command: "focus-output", command_args: "previous",), + + // Standard program + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "Return", mods: "Super", command: "spawn", command_args: "alacritty",), + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "q", mods: "Super+Shift", command: "exit", command_args: None,), + + // Screenshot + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "Print", mods: "None", command: "spawn", command_args: "~/repos/shell/scripts/screen_shot",), + + // Audio + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "XF86AudioRaiseVolume", mods: "None", command: "spawn", command_args: "pactl set-sink-volume 1 +5%",), + RiverctlCommand( map_mode: Map, mode: ["normal", "locked"], key: "XF86AudioLowerVolume", mods: "None", command: "spawn", command_args: "~/.local/bin/ytcs",), + RiverctlCommand( map_mode: Map, mode: ["normal", "locked"], key: "XF86AudioMute", mods: "None", command: "spawn", command_args: "~/repos/shell/scripts/mocs",), + + // Launcher + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "R", mods: "Super", command: "spawn", command_args: "bemenu-run",), + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "F1", mods: "Super", command: "spawn", command_args: "firefox",), + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "F2", mods: "Super", command: "spawn", command_args: "keepassxc",), + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "F3", mods: "Super", command: "spawn", command_args: "nheko",), + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "F4", mods: "Super", command: "spawn", command_args: "steam",), + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "L", mods: "Super", command: "spawn", command_args: "swaylock -f",), + + // Client + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "f", mods: "Super", command: "toggle-fullscreen", command_args: None,), + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "c", mods: "Super+Shift", command: "close", command_args: None,), + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "space", mods: "Super+Control", command: "toggle-float", command_args: None,), + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "Return", mods: "Super+Control", command: "zoom", command_args: None,), + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "o", mods: "Super", command: "send-to-output", command_args: "next",), + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "T", mods: "Super+Shift", command: "swap", command_args: "next",), + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "N", mods: "Super+Shift", command: "swap", command_args: "previous",), + + // Toggle all tags + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "0", mods: "Super", command: "set-focused-tags", command_args: "4294967295"), + RiverctlCommand( map_mode: Map, mode: ["normal"], key: "0", mods: "Super+Shift", command: "set-view-tags", command_args: "4294967295"), + + // Mouse + RiverctlCommand( map_mode: MapMouse, mode: ["normal"], key: "BTN_LEFT", mods: "Super", command: "move-view", command_args: None,), + RiverctlCommand( map_mode: MapMouse, mode: ["normal"], key: "BTN_RIGHT", mods: "Super", command: "resize-view", command_args: None,), + + ], + // Set these mappings for the tags 0-8 with key [1-9] + tags_number: 9, + tag_commands: [ + RiverctlTagCommand( map_mode: Map, mode: ["normal"], mods: "Super", command: "set-focused-tags",), + RiverctlTagCommand( map_mode: Map, mode: ["normal"], mods: "Super+Shift", command: "set-view-tags",), + RiverctlTagCommand( map_mode: Map, mode: ["normal"], mods: "Super+Control", command: "toggle-focused-tags",), + RiverctlTagCommand( map_mode: Map, mode: ["normal"], mods: "Super+Shift+Control", command: "toggle-view-tags",), + ], +) + diff --git a/home-manager/config/river/res/safe_init b/home-manager/config/river/res/safe_init new file mode 100755 index 00000000..8e80026a --- /dev/null +++ b/home-manager/config/river/res/safe_init @@ -0,0 +1,160 @@ +#!/bin/sh + +# This is the example configuration file for river. +# +# If you wish to edit this, you will probably want to copy it to +# $XDG_CONFIG_HOME/river/init or $HOME/.config/river/init first. +# +# See the river(1), riverctl(1), and rivertile(1) man pages for complete +# documentation. + +# Note: the "Super" modifier is also known as Logo, GUI, Windows, Mod4, etc. + +# Super+Shift+Return to start an instance of foot (https://codeberg.org/dnkl/foot) +riverctl map normal Super Return spawn alacritty + +# Super+Q to close the focused view +riverctl map normal Super Q close + +# Super+Shift+E to exit river +riverctl map normal Super+Shift Q exit + +# Super+J and Super+K to focus the next/previous view in the layout stack +riverctl map normal Super J focus-view next +riverctl map normal Super K focus-view previous + +# Super+Shift+J and Super+Shift+K to swap the focused view with the next/previous +# view in the layout stack +riverctl map normal Super+Shift J swap next +riverctl map normal Super+Shift K swap previous + +# Super+Period and Super+Comma to focus the next/previous output +riverctl map normal Super Period focus-output next +riverctl map normal Super Comma focus-output previous + +# Super+Shift+{Period,Comma} to send the focused view to the next/previous output +riverctl map normal Super+Shift Period send-to-output next +riverctl map normal Super+Shift Comma send-to-output previous + +# Super+Return to bump the focused view to the top of the layout stack +riverctl map normal Super Return zoom + +# Super+H and Super+L to decrease/increase the main ratio of rivertile(1) +riverctl map normal Super H send-layout-cmd rivertile "main-ratio -0.05" +riverctl map normal Super L send-layout-cmd rivertile "main-ratio +0.05" + +# Super+Shift+H and Super+Shift+L to increment/decrement the main count of rivertile(1) +riverctl map normal Super+Shift H send-layout-cmd rivertile "main-count +1" +riverctl map normal Super+Shift L send-layout-cmd rivertile "main-count -1" + +# Super+Alt+{H,J,K,L} to move views +riverctl map normal Super+Alt H move left 100 +riverctl map normal Super+Alt J move down 100 +riverctl map normal Super+Alt K move up 100 +riverctl map normal Super+Alt L move right 100 + +# Super+Alt+Control+{H,J,K,L} to snap views to screen edges +riverctl map normal Super+Alt+Control H snap left +riverctl map normal Super+Alt+Control J snap down +riverctl map normal Super+Alt+Control K snap up +riverctl map normal Super+Alt+Control L snap right + +# Super+Alt+Shift+{H,J,K,L} to resize views +riverctl map normal Super+Alt+Shift H resize horizontal -100 +riverctl map normal Super+Alt+Shift J resize vertical 100 +riverctl map normal Super+Alt+Shift K resize vertical -100 +riverctl map normal Super+Alt+Shift L resize horizontal 100 + +# Super + Left Mouse Button to move views +riverctl map-pointer normal Super BTN_LEFT move-view + +# Super + Right Mouse Button to resize views +riverctl map-pointer normal Super BTN_RIGHT resize-view + +for i in $(seq 1 9) +do + tags=$((1 << ($i - 1))) + + # Super+[1-9] to focus tag [0-8] + riverctl map normal Super $i set-focused-tags $tags + + # Super+Shift+[1-9] to tag focused view with tag [0-8] + riverctl map normal Super+Shift $i set-view-tags $tags + + # Super+Ctrl+[1-9] to toggle focus of tag [0-8] + riverctl map normal Super+Control $i toggle-focused-tags $tags + + # Super+Shift+Ctrl+[1-9] to toggle tag [0-8] of focused view + riverctl map normal Super+Shift+Control $i toggle-view-tags $tags +done + +# Super+0 to focus all tags +# Super+Shift+0 to tag focused view with all tags +all_tags=$(((1 << 32) - 1)) +riverctl map normal Super 0 set-focused-tags $all_tags +riverctl map normal Super+Shift 0 set-view-tags $all_tags + +# Super+Space to toggle float +riverctl map normal Super Space toggle-float + +# Super+F to toggle fullscreen +riverctl map normal Super F toggle-fullscreen + +# Super+{Up,Right,Down,Left} to change layout orientation +riverctl map normal Super Up send-layout-cmd rivertile "main-location top" +riverctl map normal Super Right send-layout-cmd rivertile "main-location right" +riverctl map normal Super Down send-layout-cmd rivertile "main-location bottom" +riverctl map normal Super Left send-layout-cmd rivertile "main-location left" + +# Declare a passthrough mode. This mode has only a single mapping to return to +# normal mode. This makes it useful for testing a nested wayland compositor +riverctl declare-mode passthrough + +# Super+F11 to enter passthrough mode +riverctl map normal Super F11 enter-mode passthrough + +# Super+F11 to return to normal mode +riverctl map passthrough Super F11 enter-mode normal + +# Various media key mapping examples for both normal and locked mode which do +# not have a modifier +for mode in normal locked +do + # Eject the optical drive (well if you still have one that is) + riverctl map $mode None XF86Eject spawn 'eject -T' + + # Control pulse audio volume with pamixer (https://github.com/cdemoulins/pamixer) + riverctl map $mode None XF86AudioRaiseVolume spawn 'pamixer -i 5' + riverctl map $mode None XF86AudioLowerVolume spawn 'pamixer -d 5' + riverctl map $mode None XF86AudioMute spawn 'pamixer --toggle-mute' + + # Control MPRIS aware media players with playerctl (https://github.com/altdesktop/playerctl) + riverctl map $mode None XF86AudioMedia spawn 'playerctl play-pause' + riverctl map $mode None XF86AudioPlay spawn 'playerctl play-pause' + riverctl map $mode None XF86AudioPrev spawn 'playerctl previous' + riverctl map $mode None XF86AudioNext spawn 'playerctl next' + + # Control screen backlight brightness with light (https://github.com/haikarainen/light) + riverctl map $mode None XF86MonBrightnessUp spawn 'light -A 5' + riverctl map $mode None XF86MonBrightnessDown spawn 'light -U 5' +done + +# Set background and border color +riverctl background-color 0x002b36 +riverctl border-color-focused 0x93a1a1 +riverctl border-color-unfocused 0x586e75 + +# Set keyboard repeat rate +riverctl set-repeat 50 300 + +# Make certain views start floating +riverctl float-filter-add app-id float +riverctl float-filter-add title "popup title with spaces" + +# Set app-ids and titles of views which should use client side decorations +riverctl csd-filter-add app-id "gedit" + +# Set the default layout generator to be rivertile and start it. +# River will send the process group of the init executable SIGTERM on exit. +riverctl default-layout rivertile +rivertile -view-padding 6 -outer-padding 6 diff --git a/home-manager/config/ssh/default.nix b/home-manager/config/ssh/default.nix new file mode 100644 index 00000000..506c36be --- /dev/null +++ b/home-manager/config/ssh/default.nix @@ -0,0 +1,16 @@ +{ + config, + pkgs, + ... +}: { + programs.ssh = { + enable = true; + compression = true; + hashKnownHosts = true; + serverAliveInterval = 240; + userKnownHostsFile = "${config.xdg.dataHome}/ssh/know_hosts"; + + }; +} +# vim: ts=2 + diff --git a/home-manager/config/swayidle/config b/home-manager/config/swayidle/config new file mode 100644 index 00000000..d49aaa56 --- /dev/null +++ b/home-manager/config/swayidle/config @@ -0,0 +1,5 @@ +timeout 180 'swaylock -f -c 000000' + +timeout 360 'systemctl suspend-then-hibernate' + +before-sleep 'swaylock -f -c 000000' diff --git a/home-manager/config/swayidle/default.nix b/home-manager/config/swayidle/default.nix new file mode 100644 index 00000000..d9f001d5 --- /dev/null +++ b/home-manager/config/swayidle/default.nix @@ -0,0 +1,29 @@ +{ + config, + pkgs, + ... +}: { + services.swayidle = { + enable = true; + events = [ + { + event = "before-sleep"; + command = "${pkgs.swaylock}/bin/swaylock -f "; + } + ]; + timeouts = [ + { + timeout = 180; + command = "${pkgs.swaylock}/bin/swaylock -fFu "; + } + { + timeout = 360; + # TODO systemctl is installed? + command = "systemctl suspend-then-hibernate"; + } + ]; + # systemdTarget = ""; # TODO this might be usefull + }; +} +# vim: ts=2 + diff --git a/home-manager/config/swaylock/default.nix b/home-manager/config/swaylock/default.nix new file mode 100644 index 00000000..dd614a61 --- /dev/null +++ b/home-manager/config/swaylock/default.nix @@ -0,0 +1,14 @@ +{ + config, + pkgs, + ... +}: { + programs.swaylock = { + settings = { + image = "$AWMWALLPAPER"; + color = "000000"; + }; + }; +} +# vim: ts=2 + diff --git a/home-manager/config/yambar/config/config.yml b/home-manager/config/yambar/config/config.yml new file mode 100644 index 00000000..173e93a4 --- /dev/null +++ b/home-manager/config/yambar/config/config.yml @@ -0,0 +1,238 @@ +--- +# Config file for yambar +# Note that this may be version-dependent, this file is written for v1.8.0 + + +# Font anchors +font-main: &fontmain Source Code Pro:pixelsize=26 +font-aws: &awesome Font Awesome 5 Free:style=solid:pixelsize=23 + +# Color anchors +fg-none: &fgnone 00000000 +fg-1: &fg1 c6ceefff +fg-blue: &fgblue 99d1dbff +fg-sapphire: &fgsapp 74c7ecdd +fg-green: &fggreen a6e3a1dd +fg-peach: &fgpeach fab387dd +fg-mauve: &fgmauve cba6f7dd +fg-teal: &fgteal 94e2d5dd +fg-lavendar: &fglav b4befedd +fg-focus: &fgfocus e78284ff +bg-1: &bg1 303446ff +bg-tag: &bgtag 585b70ff +bg-tag2: &bgtag2 45475aff +bg-urgent: &bgurgent e78284ff + +# Background blocks +background-block: &bgcblock {background: {color: *bg1 }} +background-block-urgent: &bgcurg {background: {color: *bgurgent }} + +# Underlines +underline-focused: &line {underline: { size: 3, color: *fgfocus}} +underline-urgent: &lineurgent {underline: { size: 3, color: *fgblue}} +underline-utils: &lineutil {underline: { size: 3, color: *fgpeach}} +underline-resources: &linemem {underline: { size: 3, color: *fggreen}} +underline-battery: &linebat {underline: { size: 3, color: *fgsapp}} +underline-clock: &lineclock {underline: { size: 3, color: *fgteal}} +underline-weather: &linewea {underline: { size: 3, color: *fglav}} +underline-title: &linetitle {underline: { size: 3, color: *bgtag}} + +# Combined decorations +combination-utils: &combutil {stack: [ <<: *bgcblock, <<: *lineutil]} +combination-resources: &combmem {stack: [ <<: *bgcblock, <<: *linemem]} +combination-battery: &combbat {stack: [ <<: *bgcblock, <<: *linebat]} +combination-clock: &combclock {stack: [ <<: *bgcblock, <<: *lineclock]} +combination-weather: &combwea {stack: [ <<: *bgcblock, <<: *linewea]} + + +### Main + +bar: + location: top + height: 45 + layer: bottom + spacing: 0 + margin: 10 + border: {margin: 0, top-margin: 10} + foreground: *fg1 + background: *fgnone + font: *fontmain + + ### Left, river tags + left: + - river: + anchors: + - id: &name { text: "{id}" } + - string: &focus { stack: [ {background: {color: *bg1}} ] } + - string: &normal { string: { <<: *name, margin: 10 } } + - string: + &occupied { string: { <<: *name, deco: {background: {color: *bgtag2}}, margin: 10 } } + - string: &urgent { string: { <<: *name, deco: {stack: [background: {color: *bgurgent}, <<: *lineurgent]}, margin: 10 } } + - string: &focused { string: { <<: *name, deco: {stack: [background: {color: *bgtag}, <<: *line]}, margin: 10 } } + - string: &unfocused { string: { <<: *name, deco: {background: {color: *bgtag2}}, margin: 10 } } + - base: &river_base + tag: state + default: *normal + values: + focused: *focused + unfocused: *unfocused + urgent: *urgent + invisible: + map: + tag: occupied + values: + true: *occupied + false: *normal + content: + map: + on-click: + left: sh -c "riverctl set-focused-tags $((1 << ({id} - 1)))" + right: sh -c "riverctl toggle-focused-tags $((1 << ({id} -1)))" + middle: sh -c "riverctl toggle-view-tags $((1 << ({id} -1)))" + tag: id + values: + 1: { map: { <<: *river_base } } + 2: { map: { <<: *river_base } } + 3: { map: { <<: *river_base } } + 4: { map: { <<: *river_base } } + 5: { map: { <<: *river_base } } + 6: { map: { <<: *river_base } } + 7: { map: { <<: *river_base } } + 8: { map: { <<: *river_base } } + 9: { map: { <<: *river_base } } + title: + map: + tag: title + default: + { + string: + { + text: "{title}", + left-margin: 12, + right-margin: 12, + #max: 35, + deco: *linetitle + }, + } + values: { "": { string: { text: "" } } } + + ### Center, clock & weather gadget + center: + - clock: + time-format: "%H:%M:%S %Z" + date-format: "%d/%m/%y (%a)" + foreground: *fgblue + content: + string: + text: " {date} {time} " + deco: *combclock + + ### Right, system tray + right: + - network: + name: wlp5s0 + poll-interval: 10 + content: + map: + on-click: /bin/sh -c "nmtui" + tag: carrier + values: + false: {empty: {}} + true: + string: {text: "  {ssid} ", deco: *combutil} + - network: + name: enp4s0 + content: + map: + on-click: /bin/sh -c "nmtui" + tag: carrier + values: + false: + string: {text: "  Eth failed ", deco: *combutil} + true: {empty: {}} + + - script: # Sound volume + path: /home/dt/.config/yambar/scripts/amixer-monitor + content: + map: + on-click: /bin/sh -c "pavucontrol" + tag: muted + values: + true: + string: + text: " ﱝ " + deco: *bgcurg + false: + string: {text: "  {volume}% ", deco: *combutil} + - script: # Grade average + path: /home/dt/.config/yambar/scripts/grades-average + poll-interval: 10 + content: + string: + text: "  {grade} " + deco: *combmem + #- backlight: + # name: intel_backlight + # content: + # - string: {text: "  {percent}% ", deco: *combutil} + - script: # CPU + path: /home/dt/.config/yambar/scripts/cpu + content: + string: + text: "  {cpu}% " + deco: *combmem + - script: # Memory info + path: /home/dt/.config/yambar/scripts/meminfo + content: + map: + tag: swapstate + values: + true: + string: + text: "  {memperc}%({swapperc}%) " + deco: *combmem + false: + string: + text: "  {memperc}% " + deco: *combmem + - script: # Disk space + path: /home/dt/.config/yambar/scripts/dfspace + content: + string: + text: "  {diskspace}({diskperc})" + deco: *combmem + #- battery: + # name: BAT0 + # poll-interval: 30 + # content: + # list: + # items: + # - ramp: + # tag: capacity + # items: + # - string: + # text: "  {capacity}%({estimate}) " + # deco: *bgcurg + # - string: + # text: "  {capacity}%({estimate}) " + # deco: {stack: [ <<: *bgcblock, <<: *linebat]} + # - string: + # text: "  {capacity}%({estimate}) " + # deco: {stack: [ <<: *bgcblock, <<: *linebat]} + # - string: + # text: "  {capacity}%({estimate}) " + # deco: {stack: [ <<: *bgcblock, <<: *linebat]} + # - string: + # text: "  {capacity}%({estimate}) " + # deco: {stack: [ <<: *bgcblock, <<: *linebat]} + #- script: # tray + # path: /home/dt/.config/yambar/scripts/yambar-tray + # content: + # empty: {} + #- script: + # path: /home/dt/.config/yambar/scripts/yambar-tray-width + # poll-interval: 10 + # content: + # string: + # text: "{padding}" + # deco: *combmem diff --git a/home-manager/config/yambar/config/config.yml.diffrent b/home-manager/config/yambar/config/config.yml.diffrent new file mode 100644 index 00000000..462a329b --- /dev/null +++ b/home-manager/config/yambar/config/config.yml.diffrent @@ -0,0 +1,56 @@ +hack: &hack Hack Nerd Font:pixelsize=13 +bg_default: &bg_default {stack: [{background: {color: 81A1C1ff}}, {underline: {size: 4, color: D8DEE9ff}}]} +bar: + height: 40 + location: top + font: JuliaMono:pixelsize=10 + spacing: 2 + margin: 0 + layer: bottom + foreground: eeeeeeff + background: 2E3440dd + + left: + - river: + anchors: + - base: &river_base + left-margin: 10 + right-margin: 13 + default: {string: {text: , font: *hack}} + conditions: + id == 1: {string: {text: ﳐ, font: *hack}} + id == 2: {string: {text: , font: *hack}} + id == 3: {string: {text: , font: *hack}} + id == 4: {string: {text: , font: *hack}} + id == 5: {string: {text: , font: *hack}} + id == 10: {string: {text: "scratchpad", font: *hack}} + id == 11: {string: {text: "work", font: *hack}} + + content: + map: + on-click: + left: sh -c "riverctl set-focused-tags $((1 << ({id} - 1)))" + right: sh -c "riverctl toggle-focused-tags $((1 << ({id} -1)))" + middle: sh -c "riverctl toggle-view-tags $((1 << ({id} -1)))" + conditions: + state == urgent: + map: + <<: *river_base + deco: {background: {color: D08770ff}} + state == focused: + map: + <<: *river_base + deco: *bg_default + state == visible: + map: + conditions: + ~occupied: {map: {<<: *river_base}} + occupied: {map: {<<: *river_base, deco: *bg_default}} + state == unfocused: + map: + <<: *river_base + state == invisible: + map: + conditions: + ~occupied: {empty: {}} + occupied: {map: {<<: *river_base, deco: {underline: {size: 3, color: ea6962ff}}}} diff --git a/home-manager/config/yambar/config/laptop.yml b/home-manager/config/yambar/config/laptop.yml new file mode 100644 index 00000000..c3bfe6ab --- /dev/null +++ b/home-manager/config/yambar/config/laptop.yml @@ -0,0 +1,117 @@ +# Config file for yambar +# Note that this may be version-dependent, this file is written for v1.8.0 + + +# Font anchors +font-main: &fontmain DejavuSansMono:pixelsize=22 +font-aws: &awesome Font Awesome 5 Free:style=solid:pixelsize=20 + +# Color anchors +fg-none: &fgnone 00000000 +fg-1: &fg1 c6ceefff +fg-blue: &fgblue 99d1dbff +fg-sapphire: &fgsapp 74c7ecdd +fg-green: &fggreen a6e3a1dd +fg-peach: &fgpeach fab387dd +fg-mauve: &fgmauve cba6f7dd +fg-teal: &fgteal 94e2d5dd +fg-lavendar: &fglav b4befedd +fg-focus: &fgfocus e78284ff +bg-1: &bg1 303446ff +bg-tag: &bgtag 585b70ff +bg-tag2: &bgtag2 45475aff +bg-urgent: &bgurgent e78284ff + +# Background blocks +background-block: &bgcblock {background: {color: *bg1 }} +background-block-urgent: &bgcurg {background: {color: *bgurgent }} + +# Underlines +underline-focused: &line {underline: { size: 3, color: *fgfocus}} +underline-urgent: &lineurgent {underline: { size: 3, color: *fgblue}} +underline-utils: &lineutil {underline: { size: 3, color: *fgpeach}} +underline-resources: &linemem {underline: { size: 3, color: *fggreen}} +underline-battery: &linebat {underline: { size: 3, color: *fgsapp}} +underline-clock: &lineclock {underline: { size: 3, color: *fgteal}} +underline-weather: &linewea {underline: { size: 3, color: *fglav}} +underline-title: &linetitle {underline: { size: 3, color: *bgtag}} + +# Combined decorations +combination-utils: &combutil {stack: [ <<: *bgcblock, <<: *lineutil]} +combination-resources: &combmem {stack: [ <<: *bgcblock, <<: *linemem]} +combination-battery: &combbat {stack: [ <<: *bgcblock, <<: *linebat]} +combination-clock: &combclock {stack: [ <<: *bgcblock, <<: *lineclock]} +combination-weather: &combwea {stack: [ <<: *bgcblock, <<: *linewea]} + + +### Main + +bar: + location: top + height: 25 + layer: bottom + monitor: DP-2 + spacing: 0 + margin: 10 + border: {margin: 0, top-margin: 5} + foreground: *fg1 + background: *fgnone + font: *fontmain + + ### Left, river tags + left: + - river: + anchors: + - id: &name { text: "{id}" } + - string: &focus { stack: [ {background: {color: *bg1}} ] } + - string: &normal { string: { <<: *name, margin: 10 } } + - string: + &occupied { string: { <<: *name, deco: {background: {color: *bgtag2}}, margin: 10 } } + - string: &urgent { string: { <<: *name, deco: {stack: [background: {color: *bgurgent}, <<: *lineurgent]}, margin: 10 } } + - string: &focused { string: { <<: *name, deco: {stack: [background: {color: *bgtag}, <<: *line]}, margin: 10 } } + - string: &unfocused { string: { <<: *name, deco: {background: {color: *bgtag2}}, margin: 10 } } + - base: &river_base + tag: state + default: *normal + values: + focused: *focused + unfocused: *unfocused + urgent: *urgent + invisible: + map: + tag: occupied + values: + true: *occupied + false: *normal + content: + map: + on-click: + left: sh -c "riverctl set-focused-tags $((1 << ({id} - 1)))" + right: sh -c "riverctl toggle-focused-tags $((1 << ({id} -1)))" + middle: sh -c "riverctl toggle-view-tags $((1 << ({id} -1)))" + tag: id + values: + 1: { map: { <<: *river_base } } + 2: { map: { <<: *river_base } } + 3: { map: { <<: *river_base } } + 4: { map: { <<: *river_base } } + 5: { map: { <<: *river_base } } + 6: { map: { <<: *river_base } } + 7: { map: { <<: *river_base } } + 8: { map: { <<: *river_base } } + 9: { map: { <<: *river_base } } + title: + map: + tag: title + default: + { + string: + { + text: "{title}", + left-margin: 12, + right-margin: 12, + #max: 35, + deco: *linetitle + }, + } + values: { "": { string: { text: "" } } } diff --git a/home-manager/config/yambar/default.nix b/home-manager/config/yambar/default.nix new file mode 100644 index 00000000..7a2e6fe9 --- /dev/null +++ b/home-manager/config/yambar/default.nix @@ -0,0 +1,10 @@ +{ + config, + pkgs, + ... +}: { + xdg.configFile."yambar/config.yaml".source = ./config/config.yml; + xdg.configFile."yambar/scripts".source = ./scripts; +} +# vim: ts=2 + diff --git a/home-manager/config/yambar/scripts/amixer-monitor b/home-manager/config/yambar/scripts/amixer-monitor new file mode 100755 index 00000000..9e75acfa --- /dev/null +++ b/home-manager/config/yambar/scripts/amixer-monitor @@ -0,0 +1,24 @@ +#!/bin/sh +# An improved amixer script that actually detects volume beyond 100% + + +SLEEPTIME=1 + + +while true; do + + volume=$(pactl get-sink-volume 0 | awk 'BEGIN { FS="/"} {print $2 }' | tr -d "%" | tr -d ' ') + + if [ "$volume" -eq 0 ]; then + echo "muted|bool|true" + + else + # Read sink volume in percentages + echo "volume|string|$volume" + echo "muted|bool|false" + fi + + echo "" + sleep "$SLEEPTIME" + +done diff --git a/home-manager/config/yambar/scripts/cpu b/home-manager/config/yambar/scripts/cpu new file mode 100755 index 00000000..bae820d0 --- /dev/null +++ b/home-manager/config/yambar/scripts/cpu @@ -0,0 +1,126 @@ +#!/bin/bash +# I didn't write this script; this is almost directly copied from the dnkl/yambar github. + + +# cpu.sh - measures CPU usage at a configurable sample interval +# +# Usage: cpu.sh INTERVAL_IN_SECONDS +# +# This script will emit the following tags on stdout (N is the number +# of logical CPUs): +# +# Name Type +# -------------------- +# cpu range 0-100 +# cpu0 range 0-100 +# cpu1 range 0-100 +# ... +# cpuN-1 range 0-100 +# +# I.e. ‘cpu’ is the average (or aggregated) CPU usage, while cpuX is a +# specific CPU’s usage. +# +# Example configuration (update every second): +# +# - script: +# path: /path/to/cpu.sh +# args: [1] +# content: {string: {text: "{cpu}%"}} +# + +interval=2 + +case ${interval} in + ''|*[!0-9]*) + echo "interval must be an integer" + exit 1 + ;; + *) + ;; +esac + +# Get number of CPUs, by reading /proc/stat +# The output looks like: +# +# cpu A B C D ... +# cpu0 A B C D ... +# cpu1 A B C D ... +# cpuN A B C D ... +# +# The first line is a summary line, accounting *all* CPUs +IFS=$'\n' readarray -t all_cpu_stats < <(grep -e "^cpu" /proc/stat) +cpu_count=$((${#all_cpu_stats[@]} - 1)) + +# Arrays of ‘previous’ idle and total stats, needed to calculate the +# difference between each sample. +prev_idle=() +prev_total=() +for i in $(seq ${cpu_count}); do + prev_idle+=(0) + prev_total+=(0) +done + +prev_average_idle=0 +prev_average_total=0 + +while true; do + IFS=$'\n' readarray -t all_cpu_stats < <(grep -e "^cpu" /proc/stat) + + usage=() # CPU usage in percent, 0 <= x <= 100 + + average_idle=0 # All CPUs idle time since boot + average_total=0 # All CPUs total time since boot + + for i in $(seq 0 $((cpu_count - 1))); do + # Split this CPUs stats into an array + stats=($(echo "${all_cpu_stats[$((i + 1))]}")) + + # man procfs(5) + user=${stats[1]} + nice=${stats[2]} + system=${stats[3]} + idle=${stats[4]} + iowait=${stats[5]} + irq=${stats[6]} + softirq=${stats[7]} + steal=${stats[8]} + guest=${stats[9]} + guestnice=${stats[10]} + + # Guest time already accounted for in user + user=$((user - guest)) + nice=$((nice - guestnice)) + + idle=$((idle + iowait)) + + total=$((user + nice + system + irq + softirq + idle + steal + guest + guestnice)) + + average_idle=$((average_idle + idle)) + average_total=$((average_total + total)) + + # Diff since last sample + diff_idle=$((idle - prev_idle[i])) + diff_total=$((total - prev_total[i])) + + usage[i]=$((100 * (diff_total - diff_idle) / diff_total)) + + prev_idle[i]=${idle} + prev_total[i]=${total} + done + + diff_average_idle=$((average_idle - prev_average_idle)) + diff_average_total=$((average_total - prev_average_total)) + + average_usage=$((100 * (diff_average_total - diff_average_idle) / diff_average_total)) + + prev_average_idle=${average_idle} + prev_average_total=${average_total} + + echo "cpu|range:0-100|${average_usage}" + for i in $(seq 0 $((cpu_count - 1))); do + echo "cpu${i}|range:0-100|${usage[i]}" + done + + echo "" + sleep "${interval}" +done diff --git a/home-manager/config/yambar/scripts/dfspace b/home-manager/config/yambar/scripts/dfspace new file mode 100755 index 00000000..0b262481 --- /dev/null +++ b/home-manager/config/yambar/scripts/dfspace @@ -0,0 +1,23 @@ +#!/bin/sh + +# Sleep seconds +timer="60" + +# Main loop +while true; do + + # vars + used_space=$(btrfs filesystem usage / 2> /dev/null | awk '{if ( /Used:/ ) { print $2 } } ' | head -n1) + all_space=$(btrfs filesystem usage / 2> /dev/null | awk '{if ( /Device size:/ ) { print $3 } } ' | head -n1 | tr -d "GiB") + + + # Check space available (4) and percentage used (5) + spaceperc=$(echo "$(echo "$used_space" | tr -d "GiB" )" "$all_space" | awk '{div=$1/$2;div *= 100; printf"%2d%%\n",div }') + + echo "diskspace|string|$used_space" + echo "diskperc|string|$spaceperc" + echo "" + sleep $timer + +done + diff --git a/home-manager/config/yambar/scripts/grades-average b/home-manager/config/yambar/scripts/grades-average new file mode 100755 index 00000000..a04b958c --- /dev/null +++ b/home-manager/config/yambar/scripts/grades-average @@ -0,0 +1,12 @@ +#!/bin/sh +# shellcheck disable=SC2086 +# shellcheck source=/dev/null +. ~/.local/lib/shell/lib + +grade=$(grades list average | awk '{print $2}'); + +echo "grade|string|$grade"; +echo ""; + + +if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manager/config/yambar/scripts/meminfo b/home-manager/config/yambar/scripts/meminfo new file mode 100755 index 00000000..0156e94c --- /dev/null +++ b/home-manager/config/yambar/scripts/meminfo @@ -0,0 +1,37 @@ +#!/bin/sh +# Checks memory usage + +# Number of seconds to retest +timer=5 + +# Main loop +while true; do + + mem_total=$(LANG=C free -b|awk '/^Mem:/{print $2}') + mem_used=$(LANG=C free -b|awk '/^Mem:/{print $3}') + swap_total=$(LANG=C free -b|awk '/^Swap:/{print $2}') + swap_used=$(LANG=C free -b|awk '/^Swap:/{print $3}') + + + memperc=$(echo "$mem_used" "$mem_total" | awk '{ div = 100 * ($1 / $2)} { printf "%.0f ", div }' | tr -d ' ' ) + swapperc=$(echo "$swap_used" "$swap_total" | awk '{ + if ( $1 == 0 || $2 == 0 ) { + print "%" + } else { + div = 100 * ($1 / $2); + printf "%.0f ", div +} +}' | tr -d ' ' ) + + +echo "memperc|string|$memperc" +if [ "$swapperc" = "%" ];then + echo "swapstate|bool|false" +else + echo "swapperc|string|$swapperc" + echo "swapstate|bool|true" +fi +echo "" +sleep "$timer" + +done diff --git a/home-manager/config/yambar/scripts/nmclitest b/home-manager/config/yambar/scripts/nmclitest new file mode 100755 index 00000000..3e8bc73a --- /dev/null +++ b/home-manager/config/yambar/scripts/nmclitest @@ -0,0 +1,23 @@ +#!/bin/sh +# Test for connectivity with nmcli + +Timer=${1:-120} # Number of seconds to retest +Timer2=${2:-10} # Number of seconds to retest if connection fails + +# Main loop +while true; do + + CONN=$(nmcli networking connectivity) + + if [[ "$CONN" == "full" ]]; then + echo "internet|string|Connected" + echo "" + sleep $Timer + else + echo "internet|string|Disconnected" + echo "" + sleep $Timer2 + fi + +done + diff --git a/home-manager/config/yambar/scripts/pingtest b/home-manager/config/yambar/scripts/pingtest new file mode 100755 index 00000000..2b5f9998 --- /dev/null +++ b/home-manager/config/yambar/scripts/pingtest @@ -0,0 +1,28 @@ +#!/bin/sh +# Test for connectivity with ping + +Timer=${1:-120} # Number of seconds to retest +Timer2=${2:-10} # Number of seconds to retest if connection fails +IP=${3:-'8.8.8.8'} # IP address to test, defaults to Google +PCount=${4:-3} # Number of pings to send + +# Main loop +while true; do + + # Pings the IP address for five times + PINGSTR=$(ping $IP -c $PCount -q) + # Use text formatting to get min/max ms delays + MED=$(echo $PINGSTR | sed 's/min\/avg\/max\/mdev = /\n/g' | tail -n 1 | sed 's/\//\t/g' | cut -f2) + + if [[ "$MED" == "" ]]; then + echo "med|string|No connection" + echo "" + sleep $Timer2 + else + echo "med|string|$MED ms" + echo "" + sleep $Timer + fi + +done + diff --git a/home-manager/config/yambar/scripts/yambar-tray b/home-manager/config/yambar/scripts/yambar-tray new file mode 100755 index 00000000..1704c6dd --- /dev/null +++ b/home-manager/config/yambar/scripts/yambar-tray @@ -0,0 +1,27 @@ +#!/bin/sh + + +pkill stalonetray +pkill trayer + +# launch a tray. +echo + +sleep 0.1 # make sure yambar starts first so we can draw on tpo of it + +# trayer-srg fork! +trayer \ + --edge top \ + --tint 0x24242400 \ + --align right \ + --height 20 \ + --expand false \ + --transparent true \ + --alpha 0 \ + --width 20 \ + --monitor primary \ + --widthtype request + # &>/dev/null + + + diff --git a/home-manager/config/yambar/scripts/yambar-tray-width b/home-manager/config/yambar/scripts/yambar-tray-width new file mode 100755 index 00000000..00544e70 --- /dev/null +++ b/home-manager/config/yambar/scripts/yambar-tray-width @@ -0,0 +1,28 @@ +#!/bin/sh +# shellcheck disable=SC2086 +# shellcheck source=/dev/null +. ~/.local/lib/shell/lib + + +CHARWIDTH=8 # i guess? + +tray_width_px() { + xwininfo -name panel | # trayer names its window "panel" + grep -i width: | + awk '{print $2}' +} + +px_to_spaces() { + spaces="$((1 + ${1:-0} / $CHARWIDTH))" + printf "% *s\n" $spaces +} + +sleep 0.2 # be sure trayer is already up + +output="$(px_to_spaces `tray_width_px`)" +echo "padding|string|$output" +echo "" + + + +if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manager/config/zsh/config/custom_cursor.sh b/home-manager/config/zsh/config/custom_cursor.sh new file mode 100644 index 00000000..9a6da012 --- /dev/null +++ b/home-manager/config/zsh/config/custom_cursor.sh @@ -0,0 +1,40 @@ +# Change cursor shape for different vi modes. +function zle-keymap-select { + if [[ ${KEYMAP} == vicmd ]] || + [[ $1 = 'block' ]]; then + echo -ne '\e[1 q' + elif [[ ${KEYMAP} == main ]] || + [[ ${KEYMAP} == viins ]] || + [[ ${KEYMAP} = '' ]] || + [[ $1 = 'beam' ]]; then + echo -ne '\e[5 q' + fi +} +zle -N zle-keymap-select + +# ci", ci', ci`, di", etc +autoload -U select-quoted +zle -N select-quoted +for m in visual viopp; do + for c in {a,i}{\',\",\`}; do + bindkey -M $m $c select-quoted + done +done + +# ci{, ci(, ci<, di{, etc +autoload -U select-bracketed +zle -N select-bracketed +for m in visual viopp; do + for c in {a,i}${(s..)^:-'()[]{}<>bB'}; do + bindkey -M $m $c select-bracketed + done +done + +zle-line-init() { + zle -K viins # initiate `vi insert` as keymap (can be removed if `bindkey -V` has been set elsewhere) + echo -ne "\e[5 q" +} +zle -N zle-line-init + +echo -ne '\e[5 q' # Use beam shape cursor on startup. +precmd() { echo -ne '\e[5 q' ;} # Use beam shape cursor for each new prompt. diff --git a/home-manager/config/zsh/config/zsh-init.sh b/home-manager/config/zsh/config/zsh-init.sh new file mode 100644 index 00000000..bc9af87a --- /dev/null +++ b/home-manager/config/zsh/config/zsh-init.sh @@ -0,0 +1,38 @@ +# If not running interactively, don't do anything +[[ $- != *i* ]] && return + +# Flex on the ubuntu users +[ "$NVIM" ] || neofetch || hyfetch +#loginctl show-session $XDG_SESSION_ID + +## Enable colors and change prompt: +#autoload -Uz colors && colors +#autoload -Uz compinit && compinit -u +## Edit line in vim buffer ctrl-v +#autoload -Uz edit-command-line; zle -N edit-command-line +## Enter vim buffer from normal mode +#autoload -Uz edit-command-line && zle -N edit-command-line + +## zstyles +#zstyle ':completion:*' menu select +## Auto complete with case insensitivity +#zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' + +#zmodload zsh/complist +#fpath+=/home/dt/.config/zsh/comp +#compinit +#_comp_options+=(globdots) # Include hidden files. +# +## Source configs +#source "${ZDOTDIR}/ali.sh" +#source "${ZDOTDIR}/prompt.sh" +#source "${ZDOTDIR}/hotkeys.sh" +source "./${path_custom_cursor}" +#source ~/.local/lib/shell/lib +# +## Load zsh-syntax-highlighting +#source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh +## Suggest aliases for commands +#source /usr/share/zsh/plugins/zsh-you-should-use/you-should-use.plugin.zsh +# +##eval "$(lua ~/scripts/z.lua --init zsh enhanced)" diff --git a/home-manager/config/zsh/config/zsh-prompt.sh b/home-manager/config/zsh/config/zsh-prompt.sh new file mode 100644 index 00000000..1f0f164b --- /dev/null +++ b/home-manager/config/zsh/config/zsh-prompt.sh @@ -0,0 +1,63 @@ +#vim:ft=zsh +_command_time_preexec() { + timer=${timer:-$SECONDS} +} + +_command_time_precmd() { + PROMPT_TMP_DIR=$(mktemp) + if [ $timer ]; then + ts=$(($SECONDS - $timer)) + tts=$ts + mi=0 + ho=0 + if [ $ts -ge 3 ];then + while [ $ts -ge 60 ];do + ts=$((ts-60)) + mi=$((mi+1)) + done + + while [ $mi -ge 60 ];do + mi=$((mi-60)) + ho=$((ho+1)) + done + + if [ $tts -ge 3600 ];then + out=$(printf '%dh %dm %ds\n' $ho $mi $ts) + elif [ $tts -ge 60 ];then + out=$(printf '%dm %ds\n' $mi $ts) + elif [ $tts -lt 60 ];then + out=$(printf '%ds\n' $ts) + fi + + export psvar[1]="took $(printf '%s ' "$out")" + echo $psvar[1] > $PROMPT_TMP_DIR + fi + + unset timer + unset ts + unset tts + unset mi + unset ho +fi +} + +_command_ro_precmd() { +if ! [ -w $(pwd) ];then + echo " " +fi +} + +preexec_functions+=(_command_time_preexec) +precmd_functions+=(_command_time_precmd) + +blue="14" +red="9" +white="15" +setopt PROMPT_SUBST +export PROMPT='%(?.%F{$blue}.%F{$red})%B%3~%(!. %F{$red}as root %f. )%F{$white}$(if [ -n $PROMPT_TMP_DIR ];then cat $PROMPT_TMP_DIR; rm $PROMPT_TMP_DIR;fi)%f%(?.%F{$blue}.%F{$red})%F{$red}$(_command_ro_precmd)%F{$blue}❯ %b%f' +export RPROMPT='' + +#%(2V.%F{$red}%2v%f$(export psvar[2]="") .) + +# TODO: +# Add git support diff --git a/home-manager/config/zsh/default.nix b/home-manager/config/zsh/default.nix new file mode 100644 index 00000000..f05de847 --- /dev/null +++ b/home-manager/config/zsh/default.nix @@ -0,0 +1,148 @@ +{ + config, + pkgs, + lib, + ... +}: { + programs.zsh = { + enable = true; + enableAutosuggestions = true; + enableCompletion = true; + enableSyntaxHighlighting = true; + + autocd = true; + + dotDir = ".config/zsh"; + + history = { + extended = true; + ignoreDups = false; + expireDuplicatesFirst = false; + ignoreSpace = false; # TODO I might change that + + path = "${config.xdg.dataHome}/zsh/history"; + save = 9000000; # number of lines to save + size = 9000000; # number of lines to keep + share = true; # share between sessions + }; + historySubstringSearch = { + enable = true; + searchDownKey = "^[[B"; # DOWN Arrow key + searchUpKey = "^[[A"; # UP Arrow key + }; + + loginExtra = + builtins.readFile ./config/zsh-prompt.sh + + builtins.readFile ./config/custom_cursor.sh + + '' + eval $(ssh-agent -s) > /dev/null # start ssh agent + export ENHANCHED_NEOFETCH="$(pacman -Qn | wc -l) (pacman), $(pacman -Qm | wc -l) (aur), $(($(cargo install --list | wc -l ) / 2)) (cargo)" + '' + + lib.concatStringsSep "setopt" [ + "AUTO_CD" + "AUTO_PUSHD" + "CHASE_DOTS" + + "ALWAYS_TO_END" + + "EXTENDED_HISTORY" + "HIST_ALLOW_CLOBBER" + "HIST_VERIFY" + "HIST_FCNTL_LOCK" + + "DVORAK" + "CORRECT" + + "PROMPT_SUBST" + "TRANSIENT_RPROMPT" # maybe? + + "COMBINING_CHARS" + "VI" + ]; + + initExtraFirst = builtins.readFile ./config/zsh-init.sh; + + shellAliases = { + ls = "ls -a --color=auto"; + ll = ". ll"; + pip = "pip --require-virtualenv"; + hisea = "history info | grep"; + + mocp = "mocp -M ${config.xdg.configHome}/moc"; + yarn = "yarn --use-yarnrc ${config.xdg.configHome}/yarn/config"; + }; + sessionVariables = { + # managed by home-manager xdg + # XDG_DATA_HOME = "$HOME/.local/share"; + # XDG_STATE_HOME = "$HOME/.local/state"; + # XDG_CACHE_HOME = "$HOME/.cache"; + # XDG_CONFIG_HOME = "$HOME/.config"; + # XDG_BIN_HOME = "\${HOME}/.local/bin"; + + # HISTSIZE = "9000000"; # This Should already be set by the shell + TIMEFMT = "'$fg[green]%J$reset_color' time: $fg[blue]%*Es$reset_color, cpu: $fg[blue]%P$reset_color"; # no idea what this does or why it is needed + REPORTTIME = "10"; + + PATH = [ + "\${PATH}:/home/dt/repos/shell/scripts" + "/home/dt/.local/bin" + "/home/dt/.local/share/cargo/bin/" + ]; + EDITOR = "nvim"; + IVIEWER = "imv"; + READER = "zathura"; + VISUAL = "nvim"; + CODEEDITOR = "nvim"; + TERMINAL = "alacritty"; + BROWSER = "firefox"; + COLORTERM = "truecolor"; + PAGER = "less -R"; + WM = "river"; + AWMWALLPAPER = "/home/dt/media/pictures/tes/wallpapers-linux_cast/Dedicated_Colorschemes/nord/Abstract-Nord.png"; + + # FUNCNEST for more functions in functions + FUNCNEST = "2000"; + + WALLPAPERDIR = "$HOME/media/pictures/wallpapers/"; + LESS = "R"; + MANPAGER = "less -R --use-color -Dd+r -Du+b"; + LIBVIRT_DEFAULT_URI = "qemu:///system"; + BEMENU_SCALE = "1.5"; + BEMENU_BACKEND = "wayland"; + BEMENU_OPTS = "--fn 'Source Code Pro 10' -c -l 30 -B 1 -W 0.9 --hf #ffffff"; + + # Clean the home dir {{{ + _JAVA_OPTIONS = lib.concatStringsSep " " [ + ''-Djava.util.prefs.userRoot="${config.xdg.configHome}/java"'' + ''-Djavafx.cachedir="${config.xdg.cacheHome}/openjfx"'' + ]; + GRADLE_USER_HOME = "${config.xdg.dataHome}/gradle"; + CARGO_HOME = "${config.xdg.dataHome}/cargo"; + GNUPGHOME = "${config.xdg.dataHome}/gnupg"; + GOPATH = "${config.xdg.dataHome}/go"; + GTK2_RC_FILES = "${config.xdg.configHome}/gtk-2.0/gtkrc"; + LESSHISFILE = "${config.xdg.cacheHome}/less/history"; + LESSKEYIN = "${config.xdg.configHome}/less/lesskey"; + RUSTUP_HOME = "${config.xdg.dataHome}/rustup"; + NPM_CONFIG_USERCONFIG = "${config.xdg.configHome}/npm/npmrc"; + NUGET_PACKAGES = "${config.xdg.cacheHome}/NuGetPackages"; + PYTHONSTARTUP = "${config.xdg.configHome}/python/pythonrc"; + XAUTHORITY = "${config.xdg.stateHome}/Xauthority"; + COMPDUMPFILE = "${config.xdg.dataHome}/zsh/.zcompdump}"; + IPYTHONDIR = "${config.xdg.configHome}/ipython"; + PARALLEL_HOME = "${config.xdg.configHome}/parallel"; + STACK_XDG = "1"; + # }}} + + # Export Wayland env Vars {{{ + QT_QPA_PLATFORM = "wayland"; + QT_QPA_PLATFORMTHEME = "qt5ct"; # needs qt5ct + CLUTTER_BACKEND = "wayland"; + SDL_VIDEODRIVER = "wayland"; # might brake some things + MOZ_ENABLE_WAYLAND = "1"; + # }}} + }; + }; +} +# vim: ts=2 + diff --git a/home-manager/cups/default.nix b/home-manager/cups/default.nix deleted file mode 100644 index 4fef0a9c..00000000 --- a/home-manager/cups/default.nix +++ /dev/null @@ -1,3 +0,0 @@ -{config, ...}: { -xdg.configFile."cups/lpoptions".text = "Default Brother\n"; -} diff --git a/home-manager/default.nix b/home-manager/default.nix index c11b8d85..82e6927d 100644 --- a/home-manager/default.nix +++ b/home-manager/default.nix @@ -16,32 +16,8 @@ dataHome = "${homeDirectory}/.local/share"; in { imports = [ -# ./impermanence # TODO doesn't work - - - ./alacritty - ./cups - ./firefox - ./gammastep - ./git - ./grades - ./gtk - ./keepassxc - ./latexindent - ./less - ./lf - ./mako - ./mpd - ./neovim - ./npm - ./python - ./rclone - ./river - ./ssh - ./swayidle - ./swaylock - ./yambar - ./zsh + ./impermanence + ./packages ]; home = { inherit username homeDirectory; diff --git a/home-manager/firefox/chrome/userChrome.css b/home-manager/firefox/chrome/userChrome.css deleted file mode 100644 index 0b3aff77..00000000 --- a/home-manager/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-manager/firefox/default.nix b/home-manager/firefox/default.nix deleted file mode 100644 index 88fad227..00000000 --- a/home-manager/firefox/default.nix +++ /dev/null @@ -1,232 +0,0 @@ -# vim: ts=2 -{ - config, - pkgs, - lib, - stdenv, - strip_js_comments, - generate_extensions, - user_js, - system, - ... -}: let - userChrome = builtins.readFile ./chrome/userChrome.css; - - user_js_override = pkgs.writeText "user.override.js" (builtins.readFile ./settings/override.js); - user_js_nix = pkgs.runCommand "user.js" {} '' - mkdir $out; - cat "${user_js}/user.js" > $out/user.js; - cat "${user_js_override}" >> $out/user.js; - - "${strip_js_comments.app.${system}.default.program}" $out/user.js > $out/user_clean.js; - # echo "{" > $out/user.nix.tmp - # sed 's/user_pref(\(.*\)",\(.*\));/\1" = \2;/' $out/user_clean.js >> $out/user.nix.tmp; - # echo "}" >> $out/user.nix.tmp - # awk '!/"_user.js.parrot"/' $out/user.nix.tmp >> $out/user.nix; # delete duplicate keys - ''; - - extensions = builtins.map buildFirefoxXpiAddon ( - lib.attrValues ( - lib.importJSON ./settings/extensions.json - ) - ); - - # source: https://gitlab.com/rycee/nur-expressions/-/blob/master/pkgs/firefox-addons/default.nix - buildFirefoxXpiAddon = { - pname, - version, - addonId, - url, - sha256, -#meta, - ... - }: - pkgs.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 = { - # 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.home.homeDirectory}/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; - }; -in { - home.packages = [ - pkgs.firefox-wayland - ]; - home.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; - profiles."default" = { - inherit extensions; - isDefault = true; - id = 0; - name = "default"; - - inherit userChrome; - - 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; - extraConfig = builtins.readFile "${user_js_nix}/user.js"; - }; - }; -} diff --git a/home-manager/firefox/scripts/unzip_mozlz4.py b/home-manager/firefox/scripts/unzip_mozlz4.py deleted file mode 100755 index 311fd214..00000000 --- a/home-manager/firefox/scripts/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-manager/firefox/scripts/update_extensions b/home-manager/firefox/scripts/update_extensions deleted file mode 100755 index 97f7c0ba..00000000 --- a/home-manager/firefox/scripts/update_extensions +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -# shellcheck disable=SC2086 -# shellcheck source=/dev/null -. ~/.local/lib/shell/lib - -tmp=$(mktmp) -cat << EOF > $tmp - darkreader - firenvim - keepassxc-browser - simple-tab-groups - ublock-origin -EOF - - -nix shell git+https://codeberg.org/ene/generate_moz_extension.git -c generate_extensions $(cat $tmp) > "$(dirname $0)"/../settings/extensions.json - - - -if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manager/firefox/settings.nix b/home-manager/firefox/settings.nix deleted file mode 100644 index f38e23b3..00000000 --- a/home-manager/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-manager/firefox/settings/extensions.json b/home-manager/firefox/settings/extensions.json deleted file mode 100644 index 057810bc..00000000 --- a/home-manager/firefox/settings/extensions.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "darkreader": { - "addonId": "addon@darkreader.org", - "pname": "darkreader", - "sha256": "sha256:e537a2cee45ed7c26f79ecd3ed362620e3f00d24c158532a58e163a63a3d60cc", - "url": "https://addons.mozilla.org/firefox/downloads/file/4053589/darkreader-4.9.62.xpi", - "version": "4.9.62" - }, - "firenvim": { - "addonId": "firenvim@lacamb.re", - "pname": "firenvim", - "sha256": "sha256:a8c495a59e30eaabbb3fcd188db9b5e28b40bffefe41a3f0fa22ecc58c80c2b6", - "url": "https://addons.mozilla.org/firefox/downloads/file/4026386/firenvim-0.2.14.xpi", - "version": "0.2.14" - }, - "keepassxc-browser": { - "addonId": "keepassxc-browser@keepassxc.org", - "pname": "keepassxc-browser", - "sha256": "sha256:cc39aa058cb8915cfc88424e2e1cebe3ccfc3f95d7bddb2abd0c4905d2b17719", - "url": "https://addons.mozilla.org/firefox/downloads/file/4045866/keepassxc_browser-1.8.4.xpi", - "version": "1.8.4" - }, - "simple-tab-groups": { - "addonId": "simple-tab-groups@drive4ik", - "pname": "simple-tab-groups", - "sha256": "sha256:75077589098ca62c00b86cf9554c6120bf8dc04c5f916fe26f84915f5147b2a4", - "url": "https://addons.mozilla.org/firefox/downloads/file/3873608/simple_tab_groups-4.7.2.1.xpi", - "version": "4.7.2.1" - }, - "ublock-origin": { - "addonId": "uBlock0@raymondhill.net", - "pname": "ublock-origin", - "sha256": "sha256:6bf8af5266353fab5eabdc7476de026e01edfb7901b0430c5e539f6791f1edc8", - "url": "https://addons.mozilla.org/firefox/downloads/file/4047353/ublock_origin-1.46.0.xpi", - "version": "1.46.0" - } -} diff --git a/home-manager/firefox/settings/override.js b/home-manager/firefox/settings/override.js deleted file mode 100644 index ca03e8ed..00000000 --- a/home-manager/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", false); // 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/gammastep/default.nix b/home-manager/gammastep/default.nix deleted file mode 100644 index 79b027cd..00000000 --- a/home-manager/gammastep/default.nix +++ /dev/null @@ -1,20 +0,0 @@ -{config, lib, ...}: { - services.gammastep = { - enable = true; - settings = { - general = { - temp-day = lib.mkForce 1300; - temp-night = lib.mkForce 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 deleted file mode 100644 index 667bb206..00000000 --- a/home-manager/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 { - 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 deleted file mode 100644 index ebbc61f8..00000000 --- a/home-manager/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-manager/grades/default.nix b/home-manager/grades/default.nix deleted file mode 100644 index 22c5a6d4..00000000 --- a/home-manager/grades/default.nix +++ /dev/null @@ -1,3 +0,0 @@ -{config, ...}: { - xdg.configFile."grades/config.yaml".source = ./config.yaml; -} diff --git a/home-manager/gtk/default.nix b/home-manager/gtk/default.nix deleted file mode 100644 index a3f197d2..00000000 --- a/home-manager/gtk/default.nix +++ /dev/null @@ -1,60 +0,0 @@ -{ - config, - lib, - pkgs, - stdenv, - ... -}: { - gtk = { - 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 deleted file mode 100644 index 152611c1..00000000 --- a/home-manager/keepassxc/default.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - config, - pkgs, - ... -}: { - xdg.configFile."keepassxc/keepassxc.ini".source = ./keepassxc.ini; -} -# vim: ts=2 - diff --git a/home-manager/keepassxc/keepassxc.ini b/home-manager/keepassxc/keepassxc.ini deleted file mode 100644 index ee10d691..00000000 --- a/home-manager/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-manager/latexindent/default.nix b/home-manager/latexindent/default.nix deleted file mode 100644 index 10bae481..00000000 --- a/home-manager/latexindent/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ - config, - pkgs, - ... -}: { - xdg.configFile."latexindent/indentconfig.yaml".source = ./indentconfig.yaml; - xdg.configFile."latexindent/mysettings.yaml".source = ./mysettings.yaml; -} -# vim: ts=2 - diff --git a/home-manager/latexindent/indentconfig.yaml b/home-manager/latexindent/indentconfig.yaml deleted file mode 100644 index d67351f3..00000000 --- a/home-manager/latexindent/indentconfig.yaml +++ /dev/null @@ -1,2 +0,0 @@ -paths: -- /home/dt/.config/latexindent/mysettings.yaml diff --git a/home-manager/latexindent/mysettings.yaml b/home-manager/latexindent/mysettings.yaml deleted file mode 100644 index 9a0f8b2f..00000000 --- a/home-manager/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-manager/lf/cmds/broot_jump.sh b/home-manager/lf/cmds/broot_jump.sh deleted file mode 100644 index 188c9508..00000000 --- a/home-manager/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-manager/lf/cmds/chmod.sh b/home-manager/lf/cmds/chmod.sh deleted file mode 100644 index f6a87336..00000000 --- a/home-manager/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-manager/lf/cmds/clear_trash.sh b/home-manager/lf/cmds/clear_trash.sh deleted file mode 100644 index c02321f2..00000000 --- a/home-manager/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-manager/lf/cmds/dl_file.sh b/home-manager/lf/cmds/dl_file.sh deleted file mode 100644 index 9cb9023c..00000000 --- a/home-manager/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-manager/lf/cmds/dragon.sh b/home-manager/lf/cmds/dragon.sh deleted file mode 100644 index 36e94706..00000000 --- a/home-manager/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-manager/lf/cmds/dragon_individual.sh b/home-manager/lf/cmds/dragon_individual.sh deleted file mode 100644 index abcadb13..00000000 --- a/home-manager/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-manager/lf/cmds/dragon_stay.sh b/home-manager/lf/cmds/dragon_stay.sh deleted file mode 100644 index 60195d09..00000000 --- a/home-manager/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-manager/lf/cmds/fzf_jump.sh b/home-manager/lf/cmds/fzf_jump.sh deleted file mode 100644 index 688efdb9..00000000 --- a/home-manager/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-manager/lf/cmds/help.sh b/home-manager/lf/cmds/help.sh deleted file mode 100644 index 8fedd0ea..00000000 --- a/home-manager/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-manager/lf/cmds/mk_dir.sh b/home-manager/lf/cmds/mk_dir.sh deleted file mode 100644 index bfa0627d..00000000 --- a/home-manager/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-manager/lf/cmds/mk_file.sh b/home-manager/lf/cmds/mk_file.sh deleted file mode 100644 index 044016a6..00000000 --- a/home-manager/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-manager/lf/cmds/mk_ln.sh b/home-manager/lf/cmds/mk_ln.sh deleted file mode 100644 index 71a70a36..00000000 --- a/home-manager/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-manager/lf/cmds/mk_scr.sh b/home-manager/lf/cmds/mk_scr.sh deleted file mode 100644 index b6c17458..00000000 --- a/home-manager/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-manager/lf/cmds/open.sh b/home-manager/lf/cmds/open.sh deleted file mode 100644 index 8376be21..00000000 --- a/home-manager/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-manager/lf/cmds/open_config.sh b/home-manager/lf/cmds/open_config.sh deleted file mode 100644 index 93c174d7..00000000 --- a/home-manager/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-manager/lf/cmds/restore_trash.sh b/home-manager/lf/cmds/restore_trash.sh deleted file mode 100644 index 432e9e9b..00000000 --- a/home-manager/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-manager/lf/cmds/set_wall_paper.sh b/home-manager/lf/cmds/set_wall_paper.sh deleted file mode 100644 index 4599de2a..00000000 --- a/home-manager/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-manager/lf/cmds/stripspace.sh b/home-manager/lf/cmds/stripspace.sh deleted file mode 100644 index c7f68767..00000000 --- a/home-manager/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-manager/lf/cmds/sudo_mk_file.sh b/home-manager/lf/cmds/sudo_mk_file.sh deleted file mode 100644 index 1f06a92f..00000000 --- a/home-manager/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-manager/lf/cmds/trash.sh b/home-manager/lf/cmds/trash.sh deleted file mode 100644 index 4598b4fd..00000000 --- a/home-manager/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-manager/lf/cmds/unarchive.sh b/home-manager/lf/cmds/unarchive.sh deleted file mode 100644 index 47a713fa..00000000 --- a/home-manager/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-manager/lf/colors b/home-manager/lf/colors deleted file mode 100644 index c4b6417b..00000000 --- a/home-manager/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-manager/lf/default.nix b/home-manager/lf/default.nix deleted file mode 100644 index e27b040c..00000000 --- a/home-manager/lf/default.nix +++ /dev/null @@ -1,202 +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 { - xdg.configFile."lf/icons".source = ./icons; - xdg.configFile."lf/colors".source = ./colors; - - 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"; - }; -# TODO add ctpv, if it gets merged -# previewer = { -# keybinding = "i"; -# source = pkgs.ctpv; -# }; - settings = { - # TODO this needs to be added to nixos: - #autoquit = true; # quit the server, if no clients are left - #dirpreviews = true; # preview for directories - - dircounts = true; # count things in directories TODO this has performance impact - 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 - }; - # TODO remove auto quit, if it has been added - # TODO add ctpv, if it gets merged - extraConfig = '' - &ctpv -s $id - &ctpvquit $id - set cleaner = {pkgs.ctpv} - - set autoquit = true - set dirpreviews = true - ''; - }; -} -# vim: ts=2 - diff --git a/home-manager/lf/icons b/home-manager/lf/icons deleted file mode 100644 index 68d53e34..00000000 --- a/home-manager/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-manager/mako/default.nix b/home-manager/mako/default.nix deleted file mode 100644 index 9b9e01a0..00000000 --- a/home-manager/mako/default.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ - config, - pkgs, - ... -}: { - programs.mako = { - enable = true; - backgroundColor = "#2e3440"; - borderColor = "#88c0d0"; - borderRadius = 25; - borderSize = 2; - defaultTimeout = 5000; - font = "Source Code Pro 10"; - width = 500; - height = 500; - icons = true; - ignoreTimeout = 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 deleted file mode 100644 index ea535415..00000000 --- a/home-manager/mpd/default.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ - config, - pkgs, - ... -}: let - dataDir = "${config.xdg.dataHome}/mpd"; -in { -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 deleted file mode 100644 index eaa5e641..00000000 --- a/home-manager/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-manager/mpd/test.TODO b/home-manager/mpd/test.TODO deleted file mode 100644 index 6225d8fd..00000000 --- a/home-manager/mpd/test.TODO +++ /dev/null @@ -1 +0,0 @@ -# TODO this still needs some client diff --git a/home-manager/neovim/default.nix b/home-manager/neovim/default.nix deleted file mode 100644 index 8074f19d..00000000 --- a/home-manager/neovim/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ - config, - pkgs, - neovim_config, - ... -}: { - xdg.configFile."neovim".source = neovim_config; -} -# vim: ts=2 - diff --git a/home-manager/npm/.npmrc b/home-manager/npm/.npmrc deleted file mode 100644 index d0d846bd..00000000 --- a/home-manager/npm/.npmrc +++ /dev/null @@ -1,6 +0,0 @@ -scripts-prepend-node-path=true -node_gyp= -prefix=${XDG_DATA_HOME}/npm -cache=${XDG_CACHE_HOME}/npm -tmp=${XDG_RUNTIME_DIR}/npm -init-module=${XDG_CONFIG_HOME}/npm/config/npm-init.js diff --git a/home-manager/npm/default.nix b/home-manager/npm/default.nix deleted file mode 100644 index d12ce73b..00000000 --- a/home-manager/npm/default.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - config, - pkgs, - ... -}: { - xdg.configFile."npm/.npmrc".source = ./.npmrc; -} -# vim: ts=2 - diff --git a/home-manager/python/default.nix b/home-manager/python/default.nix deleted file mode 100644 index 4fd01a0a..00000000 --- a/home-manager/python/default.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - config, - pkgs, - ... -}: { - xdg.configFile."python/pythonrc".source = ./pythonrc; -} -# vim: ts=2 - diff --git a/home-manager/python/pythonrc b/home-manager/python/pythonrc deleted file mode 100644 index 38c48e0f..00000000 --- a/home-manager/python/pythonrc +++ /dev/null @@ -1,11 +0,0 @@ -import os -import atexit -import readline - -history = os.path.join(os.environ['XDG_CACHE_HOME'], 'python_history') -readline.read_history_file(history) - -def write_history(): - readline.write_history_file(history) - -atexit.register(write_history) diff --git a/home-manager/rclone/default.nix b/home-manager/rclone/default.nix deleted file mode 100644 index 1939a0b5..00000000 --- a/home-manager/rclone/default.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - config, - pkgs, - ... -}: { - xdg.configFile."rclone/rclone.conf".source = ./rclone.conf; -} -# vim: ts=2 - diff --git a/home-manager/rclone/rclone.conf b/home-manager/rclone/rclone.conf deleted file mode 100644 index 9e1c4f08..00000000 --- a/home-manager/rclone/rclone.conf +++ /dev/null @@ -1,10 +0,0 @@ -[vhack1] -type = sftp -host = server1.vhack.eu -user = soispha -key_use_agent = true -known_hosts_file = ~/.local/share/ssh/known_hosts -shell_type = unix -md5sum_command = md5sum -sha1sum_command = sha1sum - diff --git a/home-manager/river/default.nix b/home-manager/river/default.nix deleted file mode 100644 index d0de7f13..00000000 --- a/home-manager/river/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ - config, - pkgs, - ... -}: { - xdg.configFile."river/init".source = ./init; - xdg.configFile."river/res".source = ./res; -} -# vim: ts=2 - diff --git a/home-manager/river/init b/home-manager/river/init deleted file mode 100755 index 4c49489a..00000000 --- a/home-manager/river/init +++ /dev/null @@ -1,84 +0,0 @@ -#!/bin/sh -# shellcheck disable=SC2086 -# shellcheck source=/dev/null -. ~/.local/lib/shell/lib - -err_fail() { - "$@" - if [ $? -ne 0 ] ;then - printf "%s\n" "$@" >> ~/river_log - exec ~/.config/river/res/safe_init - fi -} -rm ~/river_log -exec 1>>"$HOME/river_log" -exec 2>>"$HOME"/river_log - -#Setup of environment variables {{{ -err_fail msg "Starting environment variables set" -err_fail riverctl spawn "exec dbus-update-activation-environment SEATD_SOCK DISPLAY WAYLAND_DISPLAY DESKTOP_SESSION=river XDG_CURRENT_DESKTOP=river" -err_fail export XDG_CURRENT_DESKTOP=river -#}}} - -# Setup of mappings {{{ -err_fail msg "Started river_init_lesser" -err_fail river_init_lesser ~/.config/river/res/keys.ron -# }}} - -# Setup of Rules {{{ -err_fail msg "Starting Rules set" -err_fail riverctl float-filter-add app-id float -err_fail riverctl float-filter-add app-id mpv -err_fail riverctl float-filter-add app-id ModernGL -err_fail riverctl float-filter-add title "Manim Slides" - -err_fail riverctl csd-filter-add app-id firefox -# }}} - -# Set riverctl settings {{{ -err_fail msg "Starting Riverctl settings" -# background -err_fail riverctl background-color 0x002b36 -err_fail riverctl border-color-focused 0x93a1a1 -err_fail riverctl border-color-unfocused 0x586e75 - -# keyboard repeat rate -err_fail riverctl set-repeat 50 300 - -# Cursor -err_fail riverctl focus-follows-cursor always -#riverctl hide-cursor timeout 2000 -err_fail riverctl hide-cursor when-typing enabled -err_fail riverctl set-cursor-warp on-output-change - -err_fail riverctl input pointer-1133-49970-Logitech_Gaming_Mouse_G502 pointer-accel 0 -err_fail riverctl input pointer-1133-49970-Logitech_Gaming_Mouse_G502 accel-profile none - -# remove GTK buttons in titlebar -err_fail gsettings set org.gnome.desktop.wm.preferences button-layout "" -# }}} - -# Setup of general apps {{{ -err_fail msg "Starting apps" -err_fail gammastep & - -err_fail wlr-randr --output DP-2 --pos 2560,0 -err_fail wlr-randr --output DP-1 --scale 1.5 --pos 0,0 - -err_fail yambar & - -err_fail mako & -err_fail swaybg -i "$AWMWALLPAPER" & -err_fail swayidle & -alacritty & -# }}} - - - -# Setup of layout [acts as exec!] {{{ -err_fail riverctl default-layout rivertile -err_fail rivertile -main-ratio 0.5 -view-padding 1 -outer-padding 0 - -#riverctl default-layout luatile -#river-luatile -# }}} diff --git a/home-manager/river/res/keys.ron b/home-manager/river/res/keys.ron deleted file mode 100644 index a4ad6988..00000000 --- a/home-manager/river/res/keys.ron +++ /dev/null @@ -1,57 +0,0 @@ -#![enable(implicit_some)] -RiverctlCommandArray( - commands: [ - // Focus change - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "T", mods: "Super", command: "focus-view", command_args: "next",), - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "N", mods: "Super", command: "focus-view", command_args: "previous",), - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "T", mods: "Super+Control", command: "focus-output", command_args: "next",), - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "N", mods: "Super+Control", command: "focus-output", command_args: "previous",), - - // Standard program - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "Return", mods: "Super", command: "spawn", command_args: "alacritty",), - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "q", mods: "Super+Shift", command: "exit", command_args: None,), - - // Screenshot - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "Print", mods: "None", command: "spawn", command_args: "~/repos/shell/scripts/screen_shot",), - - // Audio - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "XF86AudioRaiseVolume", mods: "None", command: "spawn", command_args: "pactl set-sink-volume 1 +5%",), - RiverctlCommand( map_mode: Map, mode: ["normal", "locked"], key: "XF86AudioLowerVolume", mods: "None", command: "spawn", command_args: "~/.local/bin/ytcs",), - RiverctlCommand( map_mode: Map, mode: ["normal", "locked"], key: "XF86AudioMute", mods: "None", command: "spawn", command_args: "~/repos/shell/scripts/mocs",), - - // Launcher - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "R", mods: "Super", command: "spawn", command_args: "bemenu-run",), - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "F1", mods: "Super", command: "spawn", command_args: "firefox",), - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "F2", mods: "Super", command: "spawn", command_args: "keepassxc",), - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "F3", mods: "Super", command: "spawn", command_args: "nheko",), - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "F4", mods: "Super", command: "spawn", command_args: "steam",), - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "L", mods: "Super", command: "spawn", command_args: "swaylock -f",), - - // Client - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "f", mods: "Super", command: "toggle-fullscreen", command_args: None,), - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "c", mods: "Super+Shift", command: "close", command_args: None,), - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "space", mods: "Super+Control", command: "toggle-float", command_args: None,), - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "Return", mods: "Super+Control", command: "zoom", command_args: None,), - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "o", mods: "Super", command: "send-to-output", command_args: "next",), - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "T", mods: "Super+Shift", command: "swap", command_args: "next",), - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "N", mods: "Super+Shift", command: "swap", command_args: "previous",), - - // Toggle all tags - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "0", mods: "Super", command: "set-focused-tags", command_args: "4294967295"), - RiverctlCommand( map_mode: Map, mode: ["normal"], key: "0", mods: "Super+Shift", command: "set-view-tags", command_args: "4294967295"), - - // Mouse - RiverctlCommand( map_mode: MapMouse, mode: ["normal"], key: "BTN_LEFT", mods: "Super", command: "move-view", command_args: None,), - RiverctlCommand( map_mode: MapMouse, mode: ["normal"], key: "BTN_RIGHT", mods: "Super", command: "resize-view", command_args: None,), - - ], - // Set these mappings for the tags 0-8 with key [1-9] - tags_number: 9, - tag_commands: [ - RiverctlTagCommand( map_mode: Map, mode: ["normal"], mods: "Super", command: "set-focused-tags",), - RiverctlTagCommand( map_mode: Map, mode: ["normal"], mods: "Super+Shift", command: "set-view-tags",), - RiverctlTagCommand( map_mode: Map, mode: ["normal"], mods: "Super+Control", command: "toggle-focused-tags",), - RiverctlTagCommand( map_mode: Map, mode: ["normal"], mods: "Super+Shift+Control", command: "toggle-view-tags",), - ], -) - diff --git a/home-manager/river/res/safe_init b/home-manager/river/res/safe_init deleted file mode 100755 index 8e80026a..00000000 --- a/home-manager/river/res/safe_init +++ /dev/null @@ -1,160 +0,0 @@ -#!/bin/sh - -# This is the example configuration file for river. -# -# If you wish to edit this, you will probably want to copy it to -# $XDG_CONFIG_HOME/river/init or $HOME/.config/river/init first. -# -# See the river(1), riverctl(1), and rivertile(1) man pages for complete -# documentation. - -# Note: the "Super" modifier is also known as Logo, GUI, Windows, Mod4, etc. - -# Super+Shift+Return to start an instance of foot (https://codeberg.org/dnkl/foot) -riverctl map normal Super Return spawn alacritty - -# Super+Q to close the focused view -riverctl map normal Super Q close - -# Super+Shift+E to exit river -riverctl map normal Super+Shift Q exit - -# Super+J and Super+K to focus the next/previous view in the layout stack -riverctl map normal Super J focus-view next -riverctl map normal Super K focus-view previous - -# Super+Shift+J and Super+Shift+K to swap the focused view with the next/previous -# view in the layout stack -riverctl map normal Super+Shift J swap next -riverctl map normal Super+Shift K swap previous - -# Super+Period and Super+Comma to focus the next/previous output -riverctl map normal Super Period focus-output next -riverctl map normal Super Comma focus-output previous - -# Super+Shift+{Period,Comma} to send the focused view to the next/previous output -riverctl map normal Super+Shift Period send-to-output next -riverctl map normal Super+Shift Comma send-to-output previous - -# Super+Return to bump the focused view to the top of the layout stack -riverctl map normal Super Return zoom - -# Super+H and Super+L to decrease/increase the main ratio of rivertile(1) -riverctl map normal Super H send-layout-cmd rivertile "main-ratio -0.05" -riverctl map normal Super L send-layout-cmd rivertile "main-ratio +0.05" - -# Super+Shift+H and Super+Shift+L to increment/decrement the main count of rivertile(1) -riverctl map normal Super+Shift H send-layout-cmd rivertile "main-count +1" -riverctl map normal Super+Shift L send-layout-cmd rivertile "main-count -1" - -# Super+Alt+{H,J,K,L} to move views -riverctl map normal Super+Alt H move left 100 -riverctl map normal Super+Alt J move down 100 -riverctl map normal Super+Alt K move up 100 -riverctl map normal Super+Alt L move right 100 - -# Super+Alt+Control+{H,J,K,L} to snap views to screen edges -riverctl map normal Super+Alt+Control H snap left -riverctl map normal Super+Alt+Control J snap down -riverctl map normal Super+Alt+Control K snap up -riverctl map normal Super+Alt+Control L snap right - -# Super+Alt+Shift+{H,J,K,L} to resize views -riverctl map normal Super+Alt+Shift H resize horizontal -100 -riverctl map normal Super+Alt+Shift J resize vertical 100 -riverctl map normal Super+Alt+Shift K resize vertical -100 -riverctl map normal Super+Alt+Shift L resize horizontal 100 - -# Super + Left Mouse Button to move views -riverctl map-pointer normal Super BTN_LEFT move-view - -# Super + Right Mouse Button to resize views -riverctl map-pointer normal Super BTN_RIGHT resize-view - -for i in $(seq 1 9) -do - tags=$((1 << ($i - 1))) - - # Super+[1-9] to focus tag [0-8] - riverctl map normal Super $i set-focused-tags $tags - - # Super+Shift+[1-9] to tag focused view with tag [0-8] - riverctl map normal Super+Shift $i set-view-tags $tags - - # Super+Ctrl+[1-9] to toggle focus of tag [0-8] - riverctl map normal Super+Control $i toggle-focused-tags $tags - - # Super+Shift+Ctrl+[1-9] to toggle tag [0-8] of focused view - riverctl map normal Super+Shift+Control $i toggle-view-tags $tags -done - -# Super+0 to focus all tags -# Super+Shift+0 to tag focused view with all tags -all_tags=$(((1 << 32) - 1)) -riverctl map normal Super 0 set-focused-tags $all_tags -riverctl map normal Super+Shift 0 set-view-tags $all_tags - -# Super+Space to toggle float -riverctl map normal Super Space toggle-float - -# Super+F to toggle fullscreen -riverctl map normal Super F toggle-fullscreen - -# Super+{Up,Right,Down,Left} to change layout orientation -riverctl map normal Super Up send-layout-cmd rivertile "main-location top" -riverctl map normal Super Right send-layout-cmd rivertile "main-location right" -riverctl map normal Super Down send-layout-cmd rivertile "main-location bottom" -riverctl map normal Super Left send-layout-cmd rivertile "main-location left" - -# Declare a passthrough mode. This mode has only a single mapping to return to -# normal mode. This makes it useful for testing a nested wayland compositor -riverctl declare-mode passthrough - -# Super+F11 to enter passthrough mode -riverctl map normal Super F11 enter-mode passthrough - -# Super+F11 to return to normal mode -riverctl map passthrough Super F11 enter-mode normal - -# Various media key mapping examples for both normal and locked mode which do -# not have a modifier -for mode in normal locked -do - # Eject the optical drive (well if you still have one that is) - riverctl map $mode None XF86Eject spawn 'eject -T' - - # Control pulse audio volume with pamixer (https://github.com/cdemoulins/pamixer) - riverctl map $mode None XF86AudioRaiseVolume spawn 'pamixer -i 5' - riverctl map $mode None XF86AudioLowerVolume spawn 'pamixer -d 5' - riverctl map $mode None XF86AudioMute spawn 'pamixer --toggle-mute' - - # Control MPRIS aware media players with playerctl (https://github.com/altdesktop/playerctl) - riverctl map $mode None XF86AudioMedia spawn 'playerctl play-pause' - riverctl map $mode None XF86AudioPlay spawn 'playerctl play-pause' - riverctl map $mode None XF86AudioPrev spawn 'playerctl previous' - riverctl map $mode None XF86AudioNext spawn 'playerctl next' - - # Control screen backlight brightness with light (https://github.com/haikarainen/light) - riverctl map $mode None XF86MonBrightnessUp spawn 'light -A 5' - riverctl map $mode None XF86MonBrightnessDown spawn 'light -U 5' -done - -# Set background and border color -riverctl background-color 0x002b36 -riverctl border-color-focused 0x93a1a1 -riverctl border-color-unfocused 0x586e75 - -# Set keyboard repeat rate -riverctl set-repeat 50 300 - -# Make certain views start floating -riverctl float-filter-add app-id float -riverctl float-filter-add title "popup title with spaces" - -# Set app-ids and titles of views which should use client side decorations -riverctl csd-filter-add app-id "gedit" - -# Set the default layout generator to be rivertile and start it. -# River will send the process group of the init executable SIGTERM on exit. -riverctl default-layout rivertile -rivertile -view-padding 6 -outer-padding 6 diff --git a/home-manager/ssh/default.nix b/home-manager/ssh/default.nix deleted file mode 100644 index 506c36be..00000000 --- a/home-manager/ssh/default.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ - config, - pkgs, - ... -}: { - programs.ssh = { - enable = true; - compression = true; - hashKnownHosts = true; - serverAliveInterval = 240; - userKnownHostsFile = "${config.xdg.dataHome}/ssh/know_hosts"; - - }; -} -# vim: ts=2 - diff --git a/home-manager/swayidle/config b/home-manager/swayidle/config deleted file mode 100644 index d49aaa56..00000000 --- a/home-manager/swayidle/config +++ /dev/null @@ -1,5 +0,0 @@ -timeout 180 'swaylock -f -c 000000' - -timeout 360 'systemctl suspend-then-hibernate' - -before-sleep 'swaylock -f -c 000000' diff --git a/home-manager/swayidle/default.nix b/home-manager/swayidle/default.nix deleted file mode 100644 index d9f001d5..00000000 --- a/home-manager/swayidle/default.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ - config, - pkgs, - ... -}: { - services.swayidle = { - enable = true; - events = [ - { - event = "before-sleep"; - command = "${pkgs.swaylock}/bin/swaylock -f "; - } - ]; - timeouts = [ - { - timeout = 180; - command = "${pkgs.swaylock}/bin/swaylock -fFu "; - } - { - timeout = 360; - # TODO systemctl is installed? - command = "systemctl suspend-then-hibernate"; - } - ]; - # systemdTarget = ""; # TODO this might be usefull - }; -} -# vim: ts=2 - diff --git a/home-manager/swaylock/default.nix b/home-manager/swaylock/default.nix deleted file mode 100644 index dd614a61..00000000 --- a/home-manager/swaylock/default.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ - config, - pkgs, - ... -}: { - programs.swaylock = { - settings = { - image = "$AWMWALLPAPER"; - color = "000000"; - }; - }; -} -# vim: ts=2 - diff --git a/home-manager/yambar/config/config.yml b/home-manager/yambar/config/config.yml deleted file mode 100644 index 173e93a4..00000000 --- a/home-manager/yambar/config/config.yml +++ /dev/null @@ -1,238 +0,0 @@ ---- -# Config file for yambar -# Note that this may be version-dependent, this file is written for v1.8.0 - - -# Font anchors -font-main: &fontmain Source Code Pro:pixelsize=26 -font-aws: &awesome Font Awesome 5 Free:style=solid:pixelsize=23 - -# Color anchors -fg-none: &fgnone 00000000 -fg-1: &fg1 c6ceefff -fg-blue: &fgblue 99d1dbff -fg-sapphire: &fgsapp 74c7ecdd -fg-green: &fggreen a6e3a1dd -fg-peach: &fgpeach fab387dd -fg-mauve: &fgmauve cba6f7dd -fg-teal: &fgteal 94e2d5dd -fg-lavendar: &fglav b4befedd -fg-focus: &fgfocus e78284ff -bg-1: &bg1 303446ff -bg-tag: &bgtag 585b70ff -bg-tag2: &bgtag2 45475aff -bg-urgent: &bgurgent e78284ff - -# Background blocks -background-block: &bgcblock {background: {color: *bg1 }} -background-block-urgent: &bgcurg {background: {color: *bgurgent }} - -# Underlines -underline-focused: &line {underline: { size: 3, color: *fgfocus}} -underline-urgent: &lineurgent {underline: { size: 3, color: *fgblue}} -underline-utils: &lineutil {underline: { size: 3, color: *fgpeach}} -underline-resources: &linemem {underline: { size: 3, color: *fggreen}} -underline-battery: &linebat {underline: { size: 3, color: *fgsapp}} -underline-clock: &lineclock {underline: { size: 3, color: *fgteal}} -underline-weather: &linewea {underline: { size: 3, color: *fglav}} -underline-title: &linetitle {underline: { size: 3, color: *bgtag}} - -# Combined decorations -combination-utils: &combutil {stack: [ <<: *bgcblock, <<: *lineutil]} -combination-resources: &combmem {stack: [ <<: *bgcblock, <<: *linemem]} -combination-battery: &combbat {stack: [ <<: *bgcblock, <<: *linebat]} -combination-clock: &combclock {stack: [ <<: *bgcblock, <<: *lineclock]} -combination-weather: &combwea {stack: [ <<: *bgcblock, <<: *linewea]} - - -### Main - -bar: - location: top - height: 45 - layer: bottom - spacing: 0 - margin: 10 - border: {margin: 0, top-margin: 10} - foreground: *fg1 - background: *fgnone - font: *fontmain - - ### Left, river tags - left: - - river: - anchors: - - id: &name { text: "{id}" } - - string: &focus { stack: [ {background: {color: *bg1}} ] } - - string: &normal { string: { <<: *name, margin: 10 } } - - string: - &occupied { string: { <<: *name, deco: {background: {color: *bgtag2}}, margin: 10 } } - - string: &urgent { string: { <<: *name, deco: {stack: [background: {color: *bgurgent}, <<: *lineurgent]}, margin: 10 } } - - string: &focused { string: { <<: *name, deco: {stack: [background: {color: *bgtag}, <<: *line]}, margin: 10 } } - - string: &unfocused { string: { <<: *name, deco: {background: {color: *bgtag2}}, margin: 10 } } - - base: &river_base - tag: state - default: *normal - values: - focused: *focused - unfocused: *unfocused - urgent: *urgent - invisible: - map: - tag: occupied - values: - true: *occupied - false: *normal - content: - map: - on-click: - left: sh -c "riverctl set-focused-tags $((1 << ({id} - 1)))" - right: sh -c "riverctl toggle-focused-tags $((1 << ({id} -1)))" - middle: sh -c "riverctl toggle-view-tags $((1 << ({id} -1)))" - tag: id - values: - 1: { map: { <<: *river_base } } - 2: { map: { <<: *river_base } } - 3: { map: { <<: *river_base } } - 4: { map: { <<: *river_base } } - 5: { map: { <<: *river_base } } - 6: { map: { <<: *river_base } } - 7: { map: { <<: *river_base } } - 8: { map: { <<: *river_base } } - 9: { map: { <<: *river_base } } - title: - map: - tag: title - default: - { - string: - { - text: "{title}", - left-margin: 12, - right-margin: 12, - #max: 35, - deco: *linetitle - }, - } - values: { "": { string: { text: "" } } } - - ### Center, clock & weather gadget - center: - - clock: - time-format: "%H:%M:%S %Z" - date-format: "%d/%m/%y (%a)" - foreground: *fgblue - content: - string: - text: " {date} {time} " - deco: *combclock - - ### Right, system tray - right: - - network: - name: wlp5s0 - poll-interval: 10 - content: - map: - on-click: /bin/sh -c "nmtui" - tag: carrier - values: - false: {empty: {}} - true: - string: {text: "  {ssid} ", deco: *combutil} - - network: - name: enp4s0 - content: - map: - on-click: /bin/sh -c "nmtui" - tag: carrier - values: - false: - string: {text: "  Eth failed ", deco: *combutil} - true: {empty: {}} - - - script: # Sound volume - path: /home/dt/.config/yambar/scripts/amixer-monitor - content: - map: - on-click: /bin/sh -c "pavucontrol" - tag: muted - values: - true: - string: - text: " ﱝ " - deco: *bgcurg - false: - string: {text: "  {volume}% ", deco: *combutil} - - script: # Grade average - path: /home/dt/.config/yambar/scripts/grades-average - poll-interval: 10 - content: - string: - text: "  {grade} " - deco: *combmem - #- backlight: - # name: intel_backlight - # content: - # - string: {text: "  {percent}% ", deco: *combutil} - - script: # CPU - path: /home/dt/.config/yambar/scripts/cpu - content: - string: - text: "  {cpu}% " - deco: *combmem - - script: # Memory info - path: /home/dt/.config/yambar/scripts/meminfo - content: - map: - tag: swapstate - values: - true: - string: - text: "  {memperc}%({swapperc}%) " - deco: *combmem - false: - string: - text: "  {memperc}% " - deco: *combmem - - script: # Disk space - path: /home/dt/.config/yambar/scripts/dfspace - content: - string: - text: "  {diskspace}({diskperc})" - deco: *combmem - #- battery: - # name: BAT0 - # poll-interval: 30 - # content: - # list: - # items: - # - ramp: - # tag: capacity - # items: - # - string: - # text: "  {capacity}%({estimate}) " - # deco: *bgcurg - # - string: - # text: "  {capacity}%({estimate}) " - # deco: {stack: [ <<: *bgcblock, <<: *linebat]} - # - string: - # text: "  {capacity}%({estimate}) " - # deco: {stack: [ <<: *bgcblock, <<: *linebat]} - # - string: - # text: "  {capacity}%({estimate}) " - # deco: {stack: [ <<: *bgcblock, <<: *linebat]} - # - string: - # text: "  {capacity}%({estimate}) " - # deco: {stack: [ <<: *bgcblock, <<: *linebat]} - #- script: # tray - # path: /home/dt/.config/yambar/scripts/yambar-tray - # content: - # empty: {} - #- script: - # path: /home/dt/.config/yambar/scripts/yambar-tray-width - # poll-interval: 10 - # content: - # string: - # text: "{padding}" - # deco: *combmem diff --git a/home-manager/yambar/config/config.yml.diffrent b/home-manager/yambar/config/config.yml.diffrent deleted file mode 100644 index 462a329b..00000000 --- a/home-manager/yambar/config/config.yml.diffrent +++ /dev/null @@ -1,56 +0,0 @@ -hack: &hack Hack Nerd Font:pixelsize=13 -bg_default: &bg_default {stack: [{background: {color: 81A1C1ff}}, {underline: {size: 4, color: D8DEE9ff}}]} -bar: - height: 40 - location: top - font: JuliaMono:pixelsize=10 - spacing: 2 - margin: 0 - layer: bottom - foreground: eeeeeeff - background: 2E3440dd - - left: - - river: - anchors: - - base: &river_base - left-margin: 10 - right-margin: 13 - default: {string: {text: , font: *hack}} - conditions: - id == 1: {string: {text: ﳐ, font: *hack}} - id == 2: {string: {text: , font: *hack}} - id == 3: {string: {text: , font: *hack}} - id == 4: {string: {text: , font: *hack}} - id == 5: {string: {text: , font: *hack}} - id == 10: {string: {text: "scratchpad", font: *hack}} - id == 11: {string: {text: "work", font: *hack}} - - content: - map: - on-click: - left: sh -c "riverctl set-focused-tags $((1 << ({id} - 1)))" - right: sh -c "riverctl toggle-focused-tags $((1 << ({id} -1)))" - middle: sh -c "riverctl toggle-view-tags $((1 << ({id} -1)))" - conditions: - state == urgent: - map: - <<: *river_base - deco: {background: {color: D08770ff}} - state == focused: - map: - <<: *river_base - deco: *bg_default - state == visible: - map: - conditions: - ~occupied: {map: {<<: *river_base}} - occupied: {map: {<<: *river_base, deco: *bg_default}} - state == unfocused: - map: - <<: *river_base - state == invisible: - map: - conditions: - ~occupied: {empty: {}} - occupied: {map: {<<: *river_base, deco: {underline: {size: 3, color: ea6962ff}}}} diff --git a/home-manager/yambar/config/laptop.yml b/home-manager/yambar/config/laptop.yml deleted file mode 100644 index c3bfe6ab..00000000 --- a/home-manager/yambar/config/laptop.yml +++ /dev/null @@ -1,117 +0,0 @@ -# Config file for yambar -# Note that this may be version-dependent, this file is written for v1.8.0 - - -# Font anchors -font-main: &fontmain DejavuSansMono:pixelsize=22 -font-aws: &awesome Font Awesome 5 Free:style=solid:pixelsize=20 - -# Color anchors -fg-none: &fgnone 00000000 -fg-1: &fg1 c6ceefff -fg-blue: &fgblue 99d1dbff -fg-sapphire: &fgsapp 74c7ecdd -fg-green: &fggreen a6e3a1dd -fg-peach: &fgpeach fab387dd -fg-mauve: &fgmauve cba6f7dd -fg-teal: &fgteal 94e2d5dd -fg-lavendar: &fglav b4befedd -fg-focus: &fgfocus e78284ff -bg-1: &bg1 303446ff -bg-tag: &bgtag 585b70ff -bg-tag2: &bgtag2 45475aff -bg-urgent: &bgurgent e78284ff - -# Background blocks -background-block: &bgcblock {background: {color: *bg1 }} -background-block-urgent: &bgcurg {background: {color: *bgurgent }} - -# Underlines -underline-focused: &line {underline: { size: 3, color: *fgfocus}} -underline-urgent: &lineurgent {underline: { size: 3, color: *fgblue}} -underline-utils: &lineutil {underline: { size: 3, color: *fgpeach}} -underline-resources: &linemem {underline: { size: 3, color: *fggreen}} -underline-battery: &linebat {underline: { size: 3, color: *fgsapp}} -underline-clock: &lineclock {underline: { size: 3, color: *fgteal}} -underline-weather: &linewea {underline: { size: 3, color: *fglav}} -underline-title: &linetitle {underline: { size: 3, color: *bgtag}} - -# Combined decorations -combination-utils: &combutil {stack: [ <<: *bgcblock, <<: *lineutil]} -combination-resources: &combmem {stack: [ <<: *bgcblock, <<: *linemem]} -combination-battery: &combbat {stack: [ <<: *bgcblock, <<: *linebat]} -combination-clock: &combclock {stack: [ <<: *bgcblock, <<: *lineclock]} -combination-weather: &combwea {stack: [ <<: *bgcblock, <<: *linewea]} - - -### Main - -bar: - location: top - height: 25 - layer: bottom - monitor: DP-2 - spacing: 0 - margin: 10 - border: {margin: 0, top-margin: 5} - foreground: *fg1 - background: *fgnone - font: *fontmain - - ### Left, river tags - left: - - river: - anchors: - - id: &name { text: "{id}" } - - string: &focus { stack: [ {background: {color: *bg1}} ] } - - string: &normal { string: { <<: *name, margin: 10 } } - - string: - &occupied { string: { <<: *name, deco: {background: {color: *bgtag2}}, margin: 10 } } - - string: &urgent { string: { <<: *name, deco: {stack: [background: {color: *bgurgent}, <<: *lineurgent]}, margin: 10 } } - - string: &focused { string: { <<: *name, deco: {stack: [background: {color: *bgtag}, <<: *line]}, margin: 10 } } - - string: &unfocused { string: { <<: *name, deco: {background: {color: *bgtag2}}, margin: 10 } } - - base: &river_base - tag: state - default: *normal - values: - focused: *focused - unfocused: *unfocused - urgent: *urgent - invisible: - map: - tag: occupied - values: - true: *occupied - false: *normal - content: - map: - on-click: - left: sh -c "riverctl set-focused-tags $((1 << ({id} - 1)))" - right: sh -c "riverctl toggle-focused-tags $((1 << ({id} -1)))" - middle: sh -c "riverctl toggle-view-tags $((1 << ({id} -1)))" - tag: id - values: - 1: { map: { <<: *river_base } } - 2: { map: { <<: *river_base } } - 3: { map: { <<: *river_base } } - 4: { map: { <<: *river_base } } - 5: { map: { <<: *river_base } } - 6: { map: { <<: *river_base } } - 7: { map: { <<: *river_base } } - 8: { map: { <<: *river_base } } - 9: { map: { <<: *river_base } } - title: - map: - tag: title - default: - { - string: - { - text: "{title}", - left-margin: 12, - right-margin: 12, - #max: 35, - deco: *linetitle - }, - } - values: { "": { string: { text: "" } } } diff --git a/home-manager/yambar/default.nix b/home-manager/yambar/default.nix deleted file mode 100644 index 7a2e6fe9..00000000 --- a/home-manager/yambar/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ - config, - pkgs, - ... -}: { - xdg.configFile."yambar/config.yaml".source = ./config/config.yml; - xdg.configFile."yambar/scripts".source = ./scripts; -} -# vim: ts=2 - diff --git a/home-manager/yambar/scripts/amixer-monitor b/home-manager/yambar/scripts/amixer-monitor deleted file mode 100755 index 9e75acfa..00000000 --- a/home-manager/yambar/scripts/amixer-monitor +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -# An improved amixer script that actually detects volume beyond 100% - - -SLEEPTIME=1 - - -while true; do - - volume=$(pactl get-sink-volume 0 | awk 'BEGIN { FS="/"} {print $2 }' | tr -d "%" | tr -d ' ') - - if [ "$volume" -eq 0 ]; then - echo "muted|bool|true" - - else - # Read sink volume in percentages - echo "volume|string|$volume" - echo "muted|bool|false" - fi - - echo "" - sleep "$SLEEPTIME" - -done diff --git a/home-manager/yambar/scripts/cpu b/home-manager/yambar/scripts/cpu deleted file mode 100755 index bae820d0..00000000 --- a/home-manager/yambar/scripts/cpu +++ /dev/null @@ -1,126 +0,0 @@ -#!/bin/bash -# I didn't write this script; this is almost directly copied from the dnkl/yambar github. - - -# cpu.sh - measures CPU usage at a configurable sample interval -# -# Usage: cpu.sh INTERVAL_IN_SECONDS -# -# This script will emit the following tags on stdout (N is the number -# of logical CPUs): -# -# Name Type -# -------------------- -# cpu range 0-100 -# cpu0 range 0-100 -# cpu1 range 0-100 -# ... -# cpuN-1 range 0-100 -# -# I.e. ‘cpu’ is the average (or aggregated) CPU usage, while cpuX is a -# specific CPU’s usage. -# -# Example configuration (update every second): -# -# - script: -# path: /path/to/cpu.sh -# args: [1] -# content: {string: {text: "{cpu}%"}} -# - -interval=2 - -case ${interval} in - ''|*[!0-9]*) - echo "interval must be an integer" - exit 1 - ;; - *) - ;; -esac - -# Get number of CPUs, by reading /proc/stat -# The output looks like: -# -# cpu A B C D ... -# cpu0 A B C D ... -# cpu1 A B C D ... -# cpuN A B C D ... -# -# The first line is a summary line, accounting *all* CPUs -IFS=$'\n' readarray -t all_cpu_stats < <(grep -e "^cpu" /proc/stat) -cpu_count=$((${#all_cpu_stats[@]} - 1)) - -# Arrays of ‘previous’ idle and total stats, needed to calculate the -# difference between each sample. -prev_idle=() -prev_total=() -for i in $(seq ${cpu_count}); do - prev_idle+=(0) - prev_total+=(0) -done - -prev_average_idle=0 -prev_average_total=0 - -while true; do - IFS=$'\n' readarray -t all_cpu_stats < <(grep -e "^cpu" /proc/stat) - - usage=() # CPU usage in percent, 0 <= x <= 100 - - average_idle=0 # All CPUs idle time since boot - average_total=0 # All CPUs total time since boot - - for i in $(seq 0 $((cpu_count - 1))); do - # Split this CPUs stats into an array - stats=($(echo "${all_cpu_stats[$((i + 1))]}")) - - # man procfs(5) - user=${stats[1]} - nice=${stats[2]} - system=${stats[3]} - idle=${stats[4]} - iowait=${stats[5]} - irq=${stats[6]} - softirq=${stats[7]} - steal=${stats[8]} - guest=${stats[9]} - guestnice=${stats[10]} - - # Guest time already accounted for in user - user=$((user - guest)) - nice=$((nice - guestnice)) - - idle=$((idle + iowait)) - - total=$((user + nice + system + irq + softirq + idle + steal + guest + guestnice)) - - average_idle=$((average_idle + idle)) - average_total=$((average_total + total)) - - # Diff since last sample - diff_idle=$((idle - prev_idle[i])) - diff_total=$((total - prev_total[i])) - - usage[i]=$((100 * (diff_total - diff_idle) / diff_total)) - - prev_idle[i]=${idle} - prev_total[i]=${total} - done - - diff_average_idle=$((average_idle - prev_average_idle)) - diff_average_total=$((average_total - prev_average_total)) - - average_usage=$((100 * (diff_average_total - diff_average_idle) / diff_average_total)) - - prev_average_idle=${average_idle} - prev_average_total=${average_total} - - echo "cpu|range:0-100|${average_usage}" - for i in $(seq 0 $((cpu_count - 1))); do - echo "cpu${i}|range:0-100|${usage[i]}" - done - - echo "" - sleep "${interval}" -done diff --git a/home-manager/yambar/scripts/dfspace b/home-manager/yambar/scripts/dfspace deleted file mode 100755 index 0b262481..00000000 --- a/home-manager/yambar/scripts/dfspace +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -# Sleep seconds -timer="60" - -# Main loop -while true; do - - # vars - used_space=$(btrfs filesystem usage / 2> /dev/null | awk '{if ( /Used:/ ) { print $2 } } ' | head -n1) - all_space=$(btrfs filesystem usage / 2> /dev/null | awk '{if ( /Device size:/ ) { print $3 } } ' | head -n1 | tr -d "GiB") - - - # Check space available (4) and percentage used (5) - spaceperc=$(echo "$(echo "$used_space" | tr -d "GiB" )" "$all_space" | awk '{div=$1/$2;div *= 100; printf"%2d%%\n",div }') - - echo "diskspace|string|$used_space" - echo "diskperc|string|$spaceperc" - echo "" - sleep $timer - -done - diff --git a/home-manager/yambar/scripts/grades-average b/home-manager/yambar/scripts/grades-average deleted file mode 100755 index a04b958c..00000000 --- a/home-manager/yambar/scripts/grades-average +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -# shellcheck disable=SC2086 -# shellcheck source=/dev/null -. ~/.local/lib/shell/lib - -grade=$(grades list average | awk '{print $2}'); - -echo "grade|string|$grade"; -echo ""; - - -if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manager/yambar/scripts/meminfo b/home-manager/yambar/scripts/meminfo deleted file mode 100755 index 0156e94c..00000000 --- a/home-manager/yambar/scripts/meminfo +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh -# Checks memory usage - -# Number of seconds to retest -timer=5 - -# Main loop -while true; do - - mem_total=$(LANG=C free -b|awk '/^Mem:/{print $2}') - mem_used=$(LANG=C free -b|awk '/^Mem:/{print $3}') - swap_total=$(LANG=C free -b|awk '/^Swap:/{print $2}') - swap_used=$(LANG=C free -b|awk '/^Swap:/{print $3}') - - - memperc=$(echo "$mem_used" "$mem_total" | awk '{ div = 100 * ($1 / $2)} { printf "%.0f ", div }' | tr -d ' ' ) - swapperc=$(echo "$swap_used" "$swap_total" | awk '{ - if ( $1 == 0 || $2 == 0 ) { - print "%" - } else { - div = 100 * ($1 / $2); - printf "%.0f ", div -} -}' | tr -d ' ' ) - - -echo "memperc|string|$memperc" -if [ "$swapperc" = "%" ];then - echo "swapstate|bool|false" -else - echo "swapperc|string|$swapperc" - echo "swapstate|bool|true" -fi -echo "" -sleep "$timer" - -done diff --git a/home-manager/yambar/scripts/nmclitest b/home-manager/yambar/scripts/nmclitest deleted file mode 100755 index 3e8bc73a..00000000 --- a/home-manager/yambar/scripts/nmclitest +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -# Test for connectivity with nmcli - -Timer=${1:-120} # Number of seconds to retest -Timer2=${2:-10} # Number of seconds to retest if connection fails - -# Main loop -while true; do - - CONN=$(nmcli networking connectivity) - - if [[ "$CONN" == "full" ]]; then - echo "internet|string|Connected" - echo "" - sleep $Timer - else - echo "internet|string|Disconnected" - echo "" - sleep $Timer2 - fi - -done - diff --git a/home-manager/yambar/scripts/pingtest b/home-manager/yambar/scripts/pingtest deleted file mode 100755 index 2b5f9998..00000000 --- a/home-manager/yambar/scripts/pingtest +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh -# Test for connectivity with ping - -Timer=${1:-120} # Number of seconds to retest -Timer2=${2:-10} # Number of seconds to retest if connection fails -IP=${3:-'8.8.8.8'} # IP address to test, defaults to Google -PCount=${4:-3} # Number of pings to send - -# Main loop -while true; do - - # Pings the IP address for five times - PINGSTR=$(ping $IP -c $PCount -q) - # Use text formatting to get min/max ms delays - MED=$(echo $PINGSTR | sed 's/min\/avg\/max\/mdev = /\n/g' | tail -n 1 | sed 's/\//\t/g' | cut -f2) - - if [[ "$MED" == "" ]]; then - echo "med|string|No connection" - echo "" - sleep $Timer2 - else - echo "med|string|$MED ms" - echo "" - sleep $Timer - fi - -done - diff --git a/home-manager/yambar/scripts/yambar-tray b/home-manager/yambar/scripts/yambar-tray deleted file mode 100755 index 1704c6dd..00000000 --- a/home-manager/yambar/scripts/yambar-tray +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh - - -pkill stalonetray -pkill trayer - -# launch a tray. -echo - -sleep 0.1 # make sure yambar starts first so we can draw on tpo of it - -# trayer-srg fork! -trayer \ - --edge top \ - --tint 0x24242400 \ - --align right \ - --height 20 \ - --expand false \ - --transparent true \ - --alpha 0 \ - --width 20 \ - --monitor primary \ - --widthtype request - # &>/dev/null - - - diff --git a/home-manager/yambar/scripts/yambar-tray-width b/home-manager/yambar/scripts/yambar-tray-width deleted file mode 100755 index 00544e70..00000000 --- a/home-manager/yambar/scripts/yambar-tray-width +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh -# shellcheck disable=SC2086 -# shellcheck source=/dev/null -. ~/.local/lib/shell/lib - - -CHARWIDTH=8 # i guess? - -tray_width_px() { - xwininfo -name panel | # trayer names its window "panel" - grep -i width: | - awk '{print $2}' -} - -px_to_spaces() { - spaces="$((1 + ${1:-0} / $CHARWIDTH))" - printf "% *s\n" $spaces -} - -sleep 0.2 # be sure trayer is already up - -output="$(px_to_spaces `tray_width_px`)" -echo "padding|string|$output" -echo "" - - - -if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manager/zsh/config/custom_cursor.sh b/home-manager/zsh/config/custom_cursor.sh deleted file mode 100644 index 9a6da012..00000000 --- a/home-manager/zsh/config/custom_cursor.sh +++ /dev/null @@ -1,40 +0,0 @@ -# Change cursor shape for different vi modes. -function zle-keymap-select { - if [[ ${KEYMAP} == vicmd ]] || - [[ $1 = 'block' ]]; then - echo -ne '\e[1 q' - elif [[ ${KEYMAP} == main ]] || - [[ ${KEYMAP} == viins ]] || - [[ ${KEYMAP} = '' ]] || - [[ $1 = 'beam' ]]; then - echo -ne '\e[5 q' - fi -} -zle -N zle-keymap-select - -# ci", ci', ci`, di", etc -autoload -U select-quoted -zle -N select-quoted -for m in visual viopp; do - for c in {a,i}{\',\",\`}; do - bindkey -M $m $c select-quoted - done -done - -# ci{, ci(, ci<, di{, etc -autoload -U select-bracketed -zle -N select-bracketed -for m in visual viopp; do - for c in {a,i}${(s..)^:-'()[]{}<>bB'}; do - bindkey -M $m $c select-bracketed - done -done - -zle-line-init() { - zle -K viins # initiate `vi insert` as keymap (can be removed if `bindkey -V` has been set elsewhere) - echo -ne "\e[5 q" -} -zle -N zle-line-init - -echo -ne '\e[5 q' # Use beam shape cursor on startup. -precmd() { echo -ne '\e[5 q' ;} # Use beam shape cursor for each new prompt. diff --git a/home-manager/zsh/config/zsh-init.sh b/home-manager/zsh/config/zsh-init.sh deleted file mode 100644 index bc9af87a..00000000 --- a/home-manager/zsh/config/zsh-init.sh +++ /dev/null @@ -1,38 +0,0 @@ -# If not running interactively, don't do anything -[[ $- != *i* ]] && return - -# Flex on the ubuntu users -[ "$NVIM" ] || neofetch || hyfetch -#loginctl show-session $XDG_SESSION_ID - -## Enable colors and change prompt: -#autoload -Uz colors && colors -#autoload -Uz compinit && compinit -u -## Edit line in vim buffer ctrl-v -#autoload -Uz edit-command-line; zle -N edit-command-line -## Enter vim buffer from normal mode -#autoload -Uz edit-command-line && zle -N edit-command-line - -## zstyles -#zstyle ':completion:*' menu select -## Auto complete with case insensitivity -#zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' - -#zmodload zsh/complist -#fpath+=/home/dt/.config/zsh/comp -#compinit -#_comp_options+=(globdots) # Include hidden files. -# -## Source configs -#source "${ZDOTDIR}/ali.sh" -#source "${ZDOTDIR}/prompt.sh" -#source "${ZDOTDIR}/hotkeys.sh" -source "./${path_custom_cursor}" -#source ~/.local/lib/shell/lib -# -## Load zsh-syntax-highlighting -#source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh -## Suggest aliases for commands -#source /usr/share/zsh/plugins/zsh-you-should-use/you-should-use.plugin.zsh -# -##eval "$(lua ~/scripts/z.lua --init zsh enhanced)" diff --git a/home-manager/zsh/config/zsh-prompt.sh b/home-manager/zsh/config/zsh-prompt.sh deleted file mode 100644 index 1f0f164b..00000000 --- a/home-manager/zsh/config/zsh-prompt.sh +++ /dev/null @@ -1,63 +0,0 @@ -#vim:ft=zsh -_command_time_preexec() { - timer=${timer:-$SECONDS} -} - -_command_time_precmd() { - PROMPT_TMP_DIR=$(mktemp) - if [ $timer ]; then - ts=$(($SECONDS - $timer)) - tts=$ts - mi=0 - ho=0 - if [ $ts -ge 3 ];then - while [ $ts -ge 60 ];do - ts=$((ts-60)) - mi=$((mi+1)) - done - - while [ $mi -ge 60 ];do - mi=$((mi-60)) - ho=$((ho+1)) - done - - if [ $tts -ge 3600 ];then - out=$(printf '%dh %dm %ds\n' $ho $mi $ts) - elif [ $tts -ge 60 ];then - out=$(printf '%dm %ds\n' $mi $ts) - elif [ $tts -lt 60 ];then - out=$(printf '%ds\n' $ts) - fi - - export psvar[1]="took $(printf '%s ' "$out")" - echo $psvar[1] > $PROMPT_TMP_DIR - fi - - unset timer - unset ts - unset tts - unset mi - unset ho -fi -} - -_command_ro_precmd() { -if ! [ -w $(pwd) ];then - echo " " -fi -} - -preexec_functions+=(_command_time_preexec) -precmd_functions+=(_command_time_precmd) - -blue="14" -red="9" -white="15" -setopt PROMPT_SUBST -export PROMPT='%(?.%F{$blue}.%F{$red})%B%3~%(!. %F{$red}as root %f. )%F{$white}$(if [ -n $PROMPT_TMP_DIR ];then cat $PROMPT_TMP_DIR; rm $PROMPT_TMP_DIR;fi)%f%(?.%F{$blue}.%F{$red})%F{$red}$(_command_ro_precmd)%F{$blue}❯ %b%f' -export RPROMPT='' - -#%(2V.%F{$red}%2v%f$(export psvar[2]="") .) - -# TODO: -# Add git support diff --git a/home-manager/zsh/default.nix b/home-manager/zsh/default.nix deleted file mode 100644 index f05de847..00000000 --- a/home-manager/zsh/default.nix +++ /dev/null @@ -1,148 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: { - programs.zsh = { - enable = true; - enableAutosuggestions = true; - enableCompletion = true; - enableSyntaxHighlighting = true; - - autocd = true; - - dotDir = ".config/zsh"; - - history = { - extended = true; - ignoreDups = false; - expireDuplicatesFirst = false; - ignoreSpace = false; # TODO I might change that - - path = "${config.xdg.dataHome}/zsh/history"; - save = 9000000; # number of lines to save - size = 9000000; # number of lines to keep - share = true; # share between sessions - }; - historySubstringSearch = { - enable = true; - searchDownKey = "^[[B"; # DOWN Arrow key - searchUpKey = "^[[A"; # UP Arrow key - }; - - loginExtra = - builtins.readFile ./config/zsh-prompt.sh - + builtins.readFile ./config/custom_cursor.sh - + '' - eval $(ssh-agent -s) > /dev/null # start ssh agent - export ENHANCHED_NEOFETCH="$(pacman -Qn | wc -l) (pacman), $(pacman -Qm | wc -l) (aur), $(($(cargo install --list | wc -l ) / 2)) (cargo)" - '' - + lib.concatStringsSep "setopt" [ - "AUTO_CD" - "AUTO_PUSHD" - "CHASE_DOTS" - - "ALWAYS_TO_END" - - "EXTENDED_HISTORY" - "HIST_ALLOW_CLOBBER" - "HIST_VERIFY" - "HIST_FCNTL_LOCK" - - "DVORAK" - "CORRECT" - - "PROMPT_SUBST" - "TRANSIENT_RPROMPT" # maybe? - - "COMBINING_CHARS" - "VI" - ]; - - initExtraFirst = builtins.readFile ./config/zsh-init.sh; - - shellAliases = { - ls = "ls -a --color=auto"; - ll = ". ll"; - pip = "pip --require-virtualenv"; - hisea = "history info | grep"; - - mocp = "mocp -M ${config.xdg.configHome}/moc"; - yarn = "yarn --use-yarnrc ${config.xdg.configHome}/yarn/config"; - }; - sessionVariables = { - # managed by home-manager xdg - # XDG_DATA_HOME = "$HOME/.local/share"; - # XDG_STATE_HOME = "$HOME/.local/state"; - # XDG_CACHE_HOME = "$HOME/.cache"; - # XDG_CONFIG_HOME = "$HOME/.config"; - # XDG_BIN_HOME = "\${HOME}/.local/bin"; - - # HISTSIZE = "9000000"; # This Should already be set by the shell - TIMEFMT = "'$fg[green]%J$reset_color' time: $fg[blue]%*Es$reset_color, cpu: $fg[blue]%P$reset_color"; # no idea what this does or why it is needed - REPORTTIME = "10"; - - PATH = [ - "\${PATH}:/home/dt/repos/shell/scripts" - "/home/dt/.local/bin" - "/home/dt/.local/share/cargo/bin/" - ]; - EDITOR = "nvim"; - IVIEWER = "imv"; - READER = "zathura"; - VISUAL = "nvim"; - CODEEDITOR = "nvim"; - TERMINAL = "alacritty"; - BROWSER = "firefox"; - COLORTERM = "truecolor"; - PAGER = "less -R"; - WM = "river"; - AWMWALLPAPER = "/home/dt/media/pictures/tes/wallpapers-linux_cast/Dedicated_Colorschemes/nord/Abstract-Nord.png"; - - # FUNCNEST for more functions in functions - FUNCNEST = "2000"; - - WALLPAPERDIR = "$HOME/media/pictures/wallpapers/"; - LESS = "R"; - MANPAGER = "less -R --use-color -Dd+r -Du+b"; - LIBVIRT_DEFAULT_URI = "qemu:///system"; - BEMENU_SCALE = "1.5"; - BEMENU_BACKEND = "wayland"; - BEMENU_OPTS = "--fn 'Source Code Pro 10' -c -l 30 -B 1 -W 0.9 --hf #ffffff"; - - # Clean the home dir {{{ - _JAVA_OPTIONS = lib.concatStringsSep " " [ - ''-Djava.util.prefs.userRoot="${config.xdg.configHome}/java"'' - ''-Djavafx.cachedir="${config.xdg.cacheHome}/openjfx"'' - ]; - GRADLE_USER_HOME = "${config.xdg.dataHome}/gradle"; - CARGO_HOME = "${config.xdg.dataHome}/cargo"; - GNUPGHOME = "${config.xdg.dataHome}/gnupg"; - GOPATH = "${config.xdg.dataHome}/go"; - GTK2_RC_FILES = "${config.xdg.configHome}/gtk-2.0/gtkrc"; - LESSHISFILE = "${config.xdg.cacheHome}/less/history"; - LESSKEYIN = "${config.xdg.configHome}/less/lesskey"; - RUSTUP_HOME = "${config.xdg.dataHome}/rustup"; - NPM_CONFIG_USERCONFIG = "${config.xdg.configHome}/npm/npmrc"; - NUGET_PACKAGES = "${config.xdg.cacheHome}/NuGetPackages"; - PYTHONSTARTUP = "${config.xdg.configHome}/python/pythonrc"; - XAUTHORITY = "${config.xdg.stateHome}/Xauthority"; - COMPDUMPFILE = "${config.xdg.dataHome}/zsh/.zcompdump}"; - IPYTHONDIR = "${config.xdg.configHome}/ipython"; - PARALLEL_HOME = "${config.xdg.configHome}/parallel"; - STACK_XDG = "1"; - # }}} - - # Export Wayland env Vars {{{ - QT_QPA_PLATFORM = "wayland"; - QT_QPA_PLATFORMTHEME = "qt5ct"; # needs qt5ct - CLUTTER_BACKEND = "wayland"; - SDL_VIDEODRIVER = "wayland"; # might brake some things - MOZ_ENABLE_WAYLAND = "1"; - # }}} - }; - }; -} -# vim: ts=2 - -- cgit 1.4.1