From 50177fd9022818b07e4518963a54defe3b01d44b Mon Sep 17 00:00:00 2001 From: Anish L Date: Mon, 13 Sep 2021 00:34:12 +1000 Subject: [PATCH] move polybar to the top, and add some config for tree-style tabs --- .gitignore | 1 - hosts/curve/configuration.nix | 2 +- hosts/curve/default.nix | 82 +++++++++---------- hosts/home.nix | 32 ++++---- modules/options.nix | 2 +- .../alucard/config/firefox/userChrome.css | 43 ++++++++++ modules/themes/alucard/config/polybar/config | 2 +- 7 files changed, 103 insertions(+), 61 deletions(-) delete mode 100644 .gitignore diff --git a/.gitignore b/.gitignore deleted file mode 100644 index b2be92b7..00000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -result diff --git a/hosts/curve/configuration.nix b/hosts/curve/configuration.nix index 9013da7b..65da821e 100755 --- a/hosts/curve/configuration.nix +++ b/hosts/curve/configuration.nix @@ -38,7 +38,7 @@ # }; networking.hostName = "curve"; # Define your hostname. - networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. + #networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. time.timeZone = "Australia/Brisbane"; diff --git a/hosts/curve/default.nix b/hosts/curve/default.nix index eea22bda..9d541670 100644 --- a/hosts/curve/default.nix +++ b/hosts/curve/default.nix @@ -74,7 +74,7 @@ ## Local config programs.ssh.startAgent = true; - services.openssh.startWhenNeeded = true; + # services.openssh.startWhenNeeded = true; networking.networkmanager.enable = true; # The global useDHCP flag is deprecated, therefore explicitly set to false @@ -85,44 +85,44 @@ ## Personal backups # Syncthing is a bit heavy handed for my needs, so rsync to my NAS instead. - systemd = { - services.backups = { - description = "Backup /usr/store to NAS"; - wants = [ "usr-drive.mount" ]; - path = [ pkgs.rsync ]; - environment = { - SRC_DIR = "/usr/store"; - DEST_DIR = "/usr/drive"; - }; - script = '' - rcp() { - if [[ -d "$1" && -d "$2" ]]; then - echo "---- BACKUPING UP $1 TO $2 ----" - rsync -rlptPJ --chmod=go= --delete --delete-after \ - --exclude=lost+found/ \ - --exclude=@eaDir/ \ - --include=.git/ \ - --filter=':- .gitignore' \ - --filter=':- $XDG_CONFIG_HOME/git/ignore' \ - "$1" "$2" - fi - } - rcp "$HOME/projects/" "$DEST_DIR/projects" - rcp "$SRC_DIR/" "$DEST_DIR" - ''; - serviceConfig = { - Type = "oneshot"; - Nice = 19; - IOSchedulingClass = "idle"; - User = config.user.name; - Group = config.user.group; - }; - }; - timers.backups = { - wantedBy = [ "timers.target" ]; - partOf = [ "backups.service" ]; - timerConfig.OnCalendar = "*-*-* 00,12:00:00"; - timerConfig.Persistent = true; - }; - }; + # systemd = { + # services.backups = { + # description = "Backup /usr/store to NAS"; + # wants = [ "usr-drive.mount" ]; + # path = [ pkgs.rsync ]; + # environment = { + # SRC_DIR = "/usr/store"; + # DEST_DIR = "/usr/drive"; + # }; + # script = '' + # rcp() { + # if [[ -d "$1" && -d "$2" ]]; then + # echo "---- BACKUPING UP $1 TO $2 ----" + # rsync -rlptPJ --chmod=go= --delete --delete-after \ + # --exclude=lost+found/ \ + # --exclude=@eaDir/ \ + # --include=.git/ \ + # --filter=':- .gitignore' \ + # --filter=':- $XDG_CONFIG_HOME/git/ignore' \ + # "$1" "$2" + # fi + # } + # rcp "$HOME/projects/" "$DEST_DIR/projects" + # rcp "$SRC_DIR/" "$DEST_DIR" + # ''; + # serviceConfig = { + # Type = "oneshot"; + # Nice = 19; + # IOSchedulingClass = "idle"; + # User = config.user.name; + # Group = config.user.group; + # }; + # }; + # timers.backups = { + # wantedBy = [ "timers.target" ]; + # partOf = [ "backups.service" ]; + # timerConfig.OnCalendar = "*-*-* 00,12:00:00"; + # timerConfig.Persistent = true; + # }; + # }; } diff --git a/hosts/home.nix b/hosts/home.nix index a1a73498..f297287b 100644 --- a/hosts/home.nix +++ b/hosts/home.nix @@ -2,32 +2,32 @@ with lib; { - networking.hosts = - let hostConfig = { - "192.168.1.2" = [ "ao" ]; - "192.168.1.3" = [ "kiiro" ]; - "192.168.1.10" = [ "kuro" ]; - "192.168.1.11" = [ "shiro" ]; - "192.168.1.12" = [ "midori" ]; - }; - hosts = flatten (attrValues hostConfig); - hostName = config.networking.hostName; - in mkIf (builtins.elem hostName hosts) hostConfig; + # networking.hosts = + # let hostConfig = { + # "192.168.1.2" = [ "ao" ]; + # "192.168.1.3" = [ "kiiro" ]; + # "192.168.1.10" = [ "kuro" ]; + # "192.168.1.11" = [ "shiro" ]; + # "192.168.1.12" = [ "midori" ]; + # }; + # hosts = flatten (attrValues hostConfig); + # hostName = config.networking.hostName; + # in mkIf (builtins.elem hostName hosts) hostConfig; ## Location config -- since Toronto is my 127.0.0.1 - time.timeZone = mkDefault "America/Toronto"; + time.timeZone = mkDefault "Australia/Brisbane"; i18n.defaultLocale = mkDefault "en_US.UTF-8"; # For redshift, mainly - location = (if config.time.timeZone == "Brisbane/Australia" then { - latitude = 43.70011; - longitude = -79.4163; + location = (if config.time.timeZone == "Australia/Brisbane" then { + latitude = 27.470; + longitude = 153.0260; } else if config.time.timeZone == "Europe/Copenhagen" then { latitude = 55.88; longitude = 12.5; } else {}); # So the vaultwarden CLI knows where to find my server. - modules.shell.vaultwarden.config.server = "p.v0.io"; + # modules.shell.vaultwarden.config.server = "p.v0.io"; ## Not using syncthing atm diff --git a/modules/options.nix b/modules/options.nix index 08861e07..2a7fc8f3 100644 --- a/modules/options.nix +++ b/modules/options.nix @@ -38,7 +38,7 @@ with lib.my; config = { user = let user = builtins.getEnv "USER"; - name = if elem user [ "" "root" ] then "hlissner" else user; + name = if elem user [ "" "root" ] then "anish" else user; in { inherit name; description = "The primary user account"; diff --git a/modules/themes/alucard/config/firefox/userChrome.css b/modules/themes/alucard/config/firefox/userChrome.css index 2476e617..ff131bd9 100644 --- a/modules/themes/alucard/config/firefox/userChrome.css +++ b/modules/themes/alucard/config/firefox/userChrome.css @@ -3,6 +3,49 @@ @-moz-document url(chrome://browser/content/browser.xul), url(chrome://browser/content/browser.xhtml) { + /*** TREE STYLE TABS ***/ + /* Hide main tabs toolbar */ + #TabsToolbar { + visibility: collapse; + } + /* Sidebar min and max width removal */ + #sidebar { + max-width: none !important; + min-width: 0px !important; + } + /* Hide splitter, when using Tree Style Tab. */ + #sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] + #sidebar-splitter { + display: none !important; + } + /* Hide sidebar header, when using Tree Style Tab. */ + #sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar-header { + visibility: collapse; + } + + /* Shrink sidebar until hovered, when using Tree Style Tab. */ + :root { + --thin-tab-width: 30px; + --wide-tab-width: 200px; + } + #sidebar-box:not([sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"]) { + min-width: var(--wide-tab-width) !important; + max-width: none !important; + } + #sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] { + position: relative !important; + transition: all 300ms !important; + min-width: var(--thin-tab-width) !important; + max-width: var(--thin-tab-width) !important; + } + #sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"]:hover { + transition: all 300ms !important; + min-width: var(--wide-tab-width) !important; + max-width: var(--wide-tab-width) !important; + + /* Negative right-margin to keep page from being pushed to the side. */ + margin-right: calc((var(--wide-tab-width) - var(--thin-tab-width)) * -1) !important; + } + /*** TAB BAR ***/ /* Ensure tab doesn't show through auto-completion popup */ .tabbrowser-tab { z-index: 0 !important; } diff --git a/modules/themes/alucard/config/polybar/config b/modules/themes/alucard/config/polybar/config index 26d36571..6d89840e 100644 --- a/modules/themes/alucard/config/polybar/config +++ b/modules/themes/alucard/config/polybar/config @@ -46,7 +46,7 @@ width = 100% height = 34 offset-x = 0 offset-y = 0 -bottom = true +# bottom = true overline-size = 0 overline-color = #f00