From 0d916e5bbc1119597ca7bb15420aab6bed14924a Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Thu, 13 Oct 2022 10:55:42 -0700 Subject: tmux: renumber windows --- lib/common.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/common.nix b/lib/common.nix index cdbbf6e..4ea80a7 100644 --- a/lib/common.nix +++ b/lib/common.nix @@ -208,6 +208,7 @@ in set -g status-left-length 30 set -g status-left '#S | #(whoami)@#(hostname) | ' set -g status-right '~%Y.%m.%d..%H.%M' + set -g renumber-windows on # white-ish background with dark-grey text set -g status-style bg=colour0,fg=colour13 # highlight current window -- cgit v1.2.3 From 9e292f22bf8bffc3c23fc7883dc27545747cd05f Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 7 Nov 2022 20:11:18 -0500 Subject: Add scc, sshfs, and tailscale --- lib/packages.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/packages.nix b/lib/packages.nix index 9d0251e..d7d0f19 100644 --- a/lib/packages.nix +++ b/lib/packages.nix @@ -89,6 +89,9 @@ in { qrencode ranger ripgrep + scc + sshfs + tailscale tmux tree unrar -- cgit v1.2.3 From 04f6f20732965627f72b78787cbe38ebc8478ad7 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 7 Nov 2022 20:11:39 -0500 Subject: Fix display fingerprint --- profiles/laptop.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profiles/laptop.nix b/profiles/laptop.nix index b571c00..e7096cb 100644 --- a/profiles/laptop.nix +++ b/profiles/laptop.nix @@ -27,7 +27,7 @@ fingerprint = { # get fingerprints with `autorandr --fingerprint` eDP-1 = "00ffffffffffff000daea814000000002c170104951f11780237459e55539229125054000000010101010101010101010101010101015e358096703814402c1c240034ad10000018000000fe004e3134304847452d4541310a20000000fe00434d4e0a202020202020202020000000fe004e3134304847452d4541310a20001f"; - HDMI-2 = "00ffffffffffff0006b3ba28c0f40300151f0103803e22782ab4a5ad4f449e250f50542308008140818081c081009500b300d1c001014dd000a0f0703e80303035006d552100001a565e00a0a0a02950302035006d552100001e000000fd00283c1ea03c000a202020202020000000fc00415355532056473238390a20200159020359f159010304121305141f100706025d5e5f60610e0f15161d1e20482309070783010000e200d56d030c002000383c20006001020367d85dc401788003681a00000101283ee6e305c301e50f00800100e6060701565500023a801871382d40582c45006d552100001e000000000000000000000000000000000000000063"; + HDMI-2 = "00ffffffffffff0006b3ba28c0f40300151f0103803e22782ab4a5ad4f449e250f50542308008140818081c081009500b300d1c001014dd000a0f0703e80303035006d552100001a565e00a0a0a02950302035006d552100001e000000fd00283c1ea03c000a202020202020000000fc00415355532056473238390a20200159020359f159010304121305141f100706025d5e5f60610e0f15161d1e20482309070783010000e200d56d030c001000383c20006001020367d85dc401788003681a00000101283ee6e305c301e50f00800100e6060701565500023a801871382d40582c45006d552100001e000000000000000000000000000000000000000073"; }; externalMonitor = rotate: { -- cgit v1.2.3 From 3129db954f15e95d5a6057295c477bf599b5e508 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 7 Nov 2022 20:12:33 -0500 Subject: Make pretty with picom --- profiles/laptop.nix | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/profiles/laptop.nix b/profiles/laptop.nix index e7096cb..c1eab46 100644 --- a/profiles/laptop.nix +++ b/profiles/laptop.nix @@ -71,4 +71,47 @@ }; }; }; + + services.betterlockscreen.enable = true; + + services.picom = { + enable = true; + experimentalBackends = true; + backend = "glx"; + vSync = true; + + # Transparency/Opacity + inactiveOpacity = 0.80; + activeOpacity = 0.95; + opacityRules = [ + "100:class_g *?= 'Firefox'" + "100:class_g *?= 'Deadd-notification-center'" + "100:class_g *?= 'Rofi'" + ]; + + # Fading + fade = true; + fadeDelta = 5; + + # Shadows + shadowExclude = [ + "class_g = 'eww-topbar-btw'" + ]; + + settings = { + # Blur + blur-method = "dual_kawase"; + blur-strength = 8; + blur-backgroud-exclude = [ + "class_g = 'eww-topbar-btw'" + ]; + + # Radius + corner-radius = 10; + round-borders = 1; + rounded-corners-exclude = [ + "class_g = 'Custom-taffybar'" + ]; + }; + }; } -- cgit v1.2.3 From d5681bcc9cb43a48853e8dbc10bb89b8fbc3b7f2 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 7 Nov 2022 20:12:48 -0500 Subject: Fix supported features in remote builder --- machines/helium.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/machines/helium.nix b/machines/helium.nix index d2a054f..228cd98 100644 --- a/machines/helium.nix +++ b/machines/helium.nix @@ -183,6 +183,10 @@ in { sshUser = "ben"; sshKey = "/home/ben/.ssh/id_rsa"; system = "x86_64-linux"; + supportedFeatures = [ + "x86_64-linux" + "big-parallel" + ]; } ]; nix.distributedBuilds = true; -- cgit v1.2.3 From 0e55fb101a9a6ec5d796c99278e90ca28dbf1647 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 7 Nov 2022 20:13:28 -0500 Subject: Disable locking for now --- machines/helium.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/machines/helium.nix b/machines/helium.nix index 228cd98..f60b0c8 100644 --- a/machines/helium.nix +++ b/machines/helium.nix @@ -109,7 +109,7 @@ in { xserver.windowManager.xmonad.enable = true; xserver.desktopManager.xterm.enable = true; - xserver.xautolock.enable = true; + xserver.xautolock.enable = false; xserver.xautolock.locker = "${pkgs.xlockmore}/bin/xlock -mode matrix"; xserver.xautolock.nowlocker = "${pkgs.xlockmore}/bin/xlock -mode matrix"; # xautolock -locknow xserver.xautolock.time = 5; # minutes @@ -144,7 +144,7 @@ in { }; systemd.services = { "xlock" = { - enable = true; + enable = false; script = "xlock"; path = [ pkgs.xlockmore ]; # nat sure about these targets -- cgit v1.2.3 From 69bbe8c4c6252baa74931e6ad28f788654776691 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 7 Nov 2022 20:15:19 -0500 Subject: Trying to fix font sizing problems --- lib/common.nix | 6 +++--- lib/linux.nix | 15 ++++++++++++--- machines/helium.nix | 9 +++++++++ 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/lib/common.nix b/lib/common.nix index 4ea80a7..b5f31dc 100644 --- a/lib/common.nix +++ b/lib/common.nix @@ -1,11 +1,11 @@ { pkgs, lib, ... }: let + fontSize = 12; locale = "en_US.UTF-8"; gpgid = "66A6AD150399D970DCA4C4E6C8218B7D0BFDECCD"; homedir = builtins.getEnv "HOME"; -in -{ +in { nixpkgs.overlays = [ (import ../overlay.nix) ]; home = { stateVersion = "18.09"; @@ -228,7 +228,7 @@ in urxvt = let font = size: "xft:Fira Mono:size=${toString size}:ant"; in { enable = true; fonts = [ - (font 6) + (font fontSize) "xft:Noto Emoji" ]; keybindings = { diff --git a/lib/linux.nix b/lib/linux.nix index f5bad73..fe135d3 100644 --- a/lib/linux.nix +++ b/lib/linux.nix @@ -1,6 +1,7 @@ { pkgs, lib, ... }: let + fontSize = 12; homedir = builtins.getEnv "HOME"; hostname = lib.strings.removeSuffix "\n" (builtins.readFile /etc/hostname); gpgid = "66A6AD150399D970DCA4C4E6C8218B7D0BFDECCD"; @@ -105,11 +106,19 @@ in }; fonts.fontconfig.enable = true; + gtk.enable = false; # this fails because of some missing service file + gtk.font.name = "Fira Sans"; + gtk.font.size = fontSize; + gtk.font.package = pkgs.fira; + gtk.theme.name = "Breeze"; + gtk.iconTheme.name = "hicolor"; + gtk.cursorTheme.name = "breeze_cursors"; + xresources = { properties = { - "XTerm*font" = "-*-FiraMono-medium-r-normal--10-*-*-*-*-*-iso10646-1"; + "XTerm*font" = "-*-FiraMono-medium-r-normal--${toString fontSize}-*-*-*-*-*-iso10646-1"; "XTerm*faceName" = "FireMono"; - "XTerm*faceSize" = "10"; + "XTerm*faceSize" = toString fontSize; "XTerm*termName" = "xterm-256color"; "XTerm*metaSendsEscape" = true; "XTerm*utf8" = true; @@ -142,7 +151,7 @@ in config = { "bar/top" = { background = colors."${theme}".background; - font-0 = "FiraSans:size=16"; + font-0 = "FiraSans:size=${toString fontSize}"; font-1 = "Font Awesome 5:pixelsize=11;1"; font-2 = "MaterialIcons:size=10:antialias=false;2"; foreground = colors."${theme}".foreground; diff --git a/machines/helium.nix b/machines/helium.nix index f60b0c8..8b6a42c 100644 --- a/machines/helium.nix +++ b/machines/helium.nix @@ -7,6 +7,8 @@ let in { imports = [ ./users.nix ]; + console.font = "${pkgs.fira-mono}/share/fonts/opentype/FiraMono-Regular.otf"; + security.sudo.wheelNeedsPassword = true; security.pam.yubico.enable = true; security.pam.yubico.debug = false; @@ -46,6 +48,11 @@ in { fira fira-code fira-code-symbols ]; + environment.variables = { + GDK_SCALE = "2"; + GDK_DPI_SCALE = "0.5"; + }; + environment.systemPackages = with pkgs; [ yubioath-desktop yubico-pam @@ -60,6 +67,7 @@ in { }; }; + hardware.video.hidpi.enable = true; hardware.enableAllFirmware = true; hardware.bluetooth.enable = true; hardware.bluetooth.package = pkgs.bluezFull; @@ -104,6 +112,7 @@ in { xserver.layout = "us"; xserver.libinput.enable = true; xserver.xkbOptions = "caps:ctrl_modifier"; + xserver.dpi = 331; xserver.displayManager.sddm.enable = true; xserver.windowManager.xmonad.enable = true; -- cgit v1.2.3 From c5a5e27b08f188e6e8d1c5764c239022e6657a8e Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 7 Nov 2022 20:15:49 -0500 Subject: Support trackball thing --- machines/helium.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/machines/helium.nix b/machines/helium.nix index 8b6a42c..f0869bc 100644 --- a/machines/helium.nix +++ b/machines/helium.nix @@ -111,6 +111,11 @@ in { xserver.autorun = true; xserver.layout = "us"; xserver.libinput.enable = true; + xserver.libinput.mouse.additionalOptions = '' + Option "ScrollMethod" "Button" + Option "ScrollButton" "3" + ''; + xserver.libinput.mouse.buttonMapping = "1 2 8 4 5 6 7 3 9"; xserver.xkbOptions = "caps:ctrl_modifier"; xserver.dpi = 331; -- cgit v1.2.3 From 03577d4d81ccc954da1960e22aa7f75109f862b6 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 7 Nov 2022 20:16:16 -0500 Subject: Disable redshift Set it at the system level instead --- lib/linux.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/linux.nix b/lib/linux.nix index fe135d3..5ded700 100644 --- a/lib/linux.nix +++ b/lib/linux.nix @@ -309,7 +309,7 @@ in }; redshift = { - enable = true; + enable = false; latitude = "40.80"; longitude = "-81.52"; temperature = { -- cgit v1.2.3 From 9a6262c9f4e173034b83233fc08aacae0e675b73 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 7 Nov 2022 20:16:54 -0500 Subject: Add xsel --- lib/linux.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/linux.nix b/lib/linux.nix index 5ded700..a90b7fb 100644 --- a/lib/linux.nix +++ b/lib/linux.nix @@ -94,6 +94,7 @@ in xdotool xlayoutdisplay xorg.xmodmap + xsel xterm yank youtube-dl -- cgit v1.2.3 From a94317fe9762ab6f7eb0f97135825d5b8b4d4359 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 7 Nov 2022 20:17:46 -0500 Subject: random xmonad improvements --- lib/xmonad.hs | 51 ++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 38 insertions(+), 13 deletions(-) diff --git a/lib/xmonad.hs b/lib/xmonad.hs index 51ae0a8..583ffb5 100644 --- a/lib/xmonad.hs +++ b/lib/xmonad.hs @@ -11,16 +11,21 @@ Docs: - XMonad API: https://hackage.haskell.org/package/xmonad - Contrib API: https://hackage.haskell.org/package/xmonad-contrib +Inspirations: + +- https://reddit.simatime.com/wy695w + -} -import Data.List (intercalate) import Data.Functor ((<&>)) +import Data.List (intercalate, isPrefixOf) import Graphics.X11.ExtraTypes.XF86 import XMonad import XMonad.Actions.CopyWindow import XMonad.Config import XMonad.Hooks.EwmhDesktops (ewmh) import XMonad.Hooks.ManageDocks +import XMonad.Hooks.ManageHelpers (doFullFloat, isFullscreen) import XMonad.Layout.BinarySpacePartition import XMonad.Layout.Dwindle as Dwindle import XMonad.Layout.LayoutModifier @@ -31,8 +36,10 @@ import XMonad.Layout.Spiral import XMonad.Layout.Tabbed import XMonad.Layout.ThreeColumns import XMonad.Layout.TwoPane +import qualified XMonad.StackSet as W import XMonad.Util.CustomKeys (customKeys) import XMonad.Util.EZConfig (additionalKeys) +import XMonad.Util.Scratchpad -- Colors data Colors = Colors @@ -71,21 +78,37 @@ brighter = "brightnessctl s 5%+" dimmer = "brightnessctl s 5%-" +shouldntFloat :: String -> Bool +shouldntFloat = isPrefixOf "qutebrowser" + +shouldFloat :: Query Bool +shouldFloat = do + fs <- isFullscreen + name <- appName + return (fs && not (shouldntFloat name)) + +scratchHook = scratchpadManageHook (W.RationalRect 0.1 0.1 0.6 0.6) + +myManageHook = manageDocks <+> scratchHook <+> (shouldFloat --> doFullFloat) <+> manageHook def + +-- todo: use urxvtc with daemon +termName = "/home/ben/.nix-profile/bin/urxvt" + insKeys :: XConfig l -> [((KeyMask, KeySym), X ())] insKeys conf@(XConfig {modMask = modMask}) = [ ((modMask, xK_y), spawn "passmenu"), ((modMask, xK_m), spawn "cmdtree"), ((modMask, xK_o), spawn "rofi -sidebar-mode -show run"), ((modMask, xK_n), spawn "rofi -sidebar-mode -show window"), - + ((modMask, xK_u), spawn "rofi -show calc -modi calc -no-show-match -no-sort"), + ((modMask, xK_s), scratchpadSpawnActionTerminal termName), + ((modMask, xK_h), scratchpadSpawnActionTerminal "htop"), -- refresh display via autorandr ( (modMask, xK_r), spawn $ "autorandr --cycle" ), - -- lock it up - ( (modMask .|. shiftMask, xK_l), spawn "xautolock -locknow"), - + ((modMask .|. shiftMask, xK_l), spawn "xautolock -locknow"), -- sticky windows ((modMask, xK_a), windows copyToAll), -- @@ Make focused window always visible ((modMask .|. shiftMask, xK_a), killAllOtherCopies), -- @@ Toggle window state back @@ -134,14 +157,15 @@ myLayout theme = ||| (addSpace $ noBorders Full) ||| twopane ||| Mirror twopane --- ||| ThreeCol 1 (3 / 100) (1 / 2) --- ||| ThreeColMid 1 (3 / 100) (1 / 2) + -- ||| ThreeCol 1 (3 / 100) (1 / 2) + -- ||| ThreeColMid 1 (3 / 100) (1 / 2) ||| tiled ||| Mirror tiled ||| emptyBSP --- ||| goldenSpiral --- ||| Spiral R Dwindle.CW (3 / 2) (11 / 10) -- L/R is where to put non-main windows where + -- ||| goldenSpiral + -- ||| Spiral R Dwindle.CW (3 / 2) (11 / 10) -- L/R is where to put non-main windows + -- The last parameter is fraction to multiply the slave window heights -- with. Useless here. tiled = addSpace $ ResizableTall nmaster delta ratio [] @@ -154,17 +178,18 @@ myLayout theme = -- Percent of screen to increment by when resizing panes delta = 3 / 100 -myConf theme = additionalKeys c (insKeys c) + +myConf theme = additionalKeys cfg (insKeys cfg) where - c = + cfg = def { modMask = mod4Mask, -- super instead of alt normalBorderColor = background theme, focusedBorderColor = highlight theme, borderWidth = 3, - manageHook = manageDocks <+> manageHook def, + manageHook = myManageHook, layoutHook = myLayout theme, - terminal = "/home/ben/.nix-profile/bin/urxvt", + terminal = termName, workspaces = myWorkspaces } -- cgit v1.2.3 From 7ab2000e7ef58afe0dd97c293b2242f27238fa7b Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 7 Nov 2022 20:17:54 -0500 Subject: fixing huggingface colors --- lib/userstyles.css | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/userstyles.css b/lib/userstyles.css index 1b1449b..e610609 100644 --- a/lib/userstyles.css +++ b/lib/userstyles.css @@ -7,3 +7,12 @@ input, input#hoogle /* gitolite.com */ body { background: transparent } + +/* huggingface */ +.lg\:.bg-gradient-to-r, +.bg-gradient-to-l, +.lg\:.bg-gradient-to-l, +.bg-gradient-to-t, +.overview-card-wrapper, +.tag, .btn +{ background: transparent } -- cgit v1.2.3 From 15dcb4f3eee0d52c6f8f0d62e01a32007631e489 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 7 Nov 2022 20:48:07 -0500 Subject: Fix size issue on laptop by setting dpi The other changes served to set fontSize centrally, and adjust it for urxvt which doesn't behave for some reason. --- lib/common.nix | 8 ++++---- lib/const.nix | 5 +++++ lib/linux.nix | 4 +--- machines/helium.nix | 5 ----- profiles/laptop.nix | 1 + 5 files changed, 11 insertions(+), 12 deletions(-) create mode 100644 lib/const.nix diff --git a/lib/common.nix b/lib/common.nix index b5f31dc..8b40f60 100644 --- a/lib/common.nix +++ b/lib/common.nix @@ -1,10 +1,8 @@ { pkgs, lib, ... }: let - fontSize = 12; + inherit (import ./const.nix) fontSize homedir gpgid; locale = "en_US.UTF-8"; - gpgid = "66A6AD150399D970DCA4C4E6C8218B7D0BFDECCD"; - homedir = builtins.getEnv "HOME"; in { nixpkgs.overlays = [ (import ../overlay.nix) ]; home = { @@ -228,7 +226,9 @@ in { urxvt = let font = size: "xft:Fira Mono:size=${toString size}:ant"; in { enable = true; fonts = [ - (font fontSize) + # for some reason, urxvt font size is much larger than every other + # program's, so i gotta cut it in half + (font (fontSize / 2)) "xft:Noto Emoji" ]; keybindings = { diff --git a/lib/const.nix b/lib/const.nix new file mode 100644 index 0000000..0accd17 --- /dev/null +++ b/lib/const.nix @@ -0,0 +1,5 @@ +{ + fontSize = 16; + homedir = builtins.getEnv "HOME"; + gpgid = "66A6AD150399D970DCA4C4E6C8218B7D0BFDECCD"; +} diff --git a/lib/linux.nix b/lib/linux.nix index a90b7fb..fd0f887 100644 --- a/lib/linux.nix +++ b/lib/linux.nix @@ -1,10 +1,8 @@ { pkgs, lib, ... }: let - fontSize = 12; - homedir = builtins.getEnv "HOME"; + inherit (import ./const.nix) fontSize homedir gpgid; hostname = lib.strings.removeSuffix "\n" (builtins.readFile /etc/hostname); - gpgid = "66A6AD150399D970DCA4C4E6C8218B7D0BFDECCD"; base16-scheme = "atelier-sulphurpool"; base16-scheme-filename = lib.strings.concatStrings (lib.strings.splitString "-" base16-scheme); theme = lib.removeSuffix "\n" (builtins.readFile "${homedir}/.local/share/xtheme"); diff --git a/machines/helium.nix b/machines/helium.nix index f0869bc..093b25d 100644 --- a/machines/helium.nix +++ b/machines/helium.nix @@ -48,11 +48,6 @@ in { fira fira-code fira-code-symbols ]; - environment.variables = { - GDK_SCALE = "2"; - GDK_DPI_SCALE = "0.5"; - }; - environment.systemPackages = with pkgs; [ yubioath-desktop yubico-pam diff --git a/profiles/laptop.nix b/profiles/laptop.nix index c1eab46..cf8b708 100644 --- a/profiles/laptop.nix +++ b/profiles/laptop.nix @@ -46,6 +46,7 @@ position = "0x0"; mode = "1920x1080"; rate = "60.00"; + dpi = 156; }; in { -- cgit v1.2.3 From 5be90e0ef12ae62f14b1e14460d3bddf9299b903 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Tue, 8 Nov 2022 19:59:12 -0500 Subject: add gerrit ssh key Change-Id: I3d7b449202840a8d5f55c8a11b5fee89a5e2702b --- lib/ssh.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/ssh.nix b/lib/ssh.nix index 48b79ad..29cb677 100644 --- a/lib/ssh.nix +++ b/lib/ssh.nix @@ -47,6 +47,12 @@ in { identityFile = [ "${homedir}/.ssh/id_rsa" ]; identitiesOnly = true; }; + "gerrit.simatime.com" = { + hostname = "gerrit.simatime.com"; + user = "bsima"; + identityFile = [ "${homedir}/.ssh/gerrit.simatime.com" ]; + identitiesOnly = true; + }; "lithium" = { hostname = "192.168.1.9"; user = "ben"; -- cgit v1.2.3 From 37c2a2e6618a5c0877578f4d60ed03f3b6efa59b Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 14 Nov 2022 09:20:38 -0500 Subject: Add python: I use it too much for it to not be global Change-Id: I2333c9a29b5c405c0f0bbc334332fe234bdfe97e --- lib/packages.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/packages.nix b/lib/packages.nix index d7d0f19..4e5cd26 100644 --- a/lib/packages.nix +++ b/lib/packages.nix @@ -86,6 +86,7 @@ in { pup pv pwgen + python3 qrencode ranger ripgrep -- cgit v1.2.3 From 63dd7f24b6ed3b770221f924551ebf5b8d6ef60e Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 14 Nov 2022 09:20:54 -0500 Subject: Add sysz Change-Id: I43084fd6143d7fdb2b7b1eb3b44327dcd7156f36 --- lib/packages.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/packages.nix b/lib/packages.nix index 4e5cd26..60698f8 100644 --- a/lib/packages.nix +++ b/lib/packages.nix @@ -92,6 +92,7 @@ in { ripgrep scc sshfs + sysz tailscale tmux tree -- cgit v1.2.3 From 032b1f0a62f2869c941cf4d5bfa5bb3fe068785a Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 14 Nov 2022 15:41:45 -0500 Subject: Add git revise Change-Id: I77e5c26bf2cd55a06cd0f19f5c8a717617271675 --- lib/packages.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/packages.nix b/lib/packages.nix index 60698f8..717103f 100644 --- a/lib/packages.nix +++ b/lib/packages.nix @@ -61,6 +61,7 @@ in { forgit fossil gcal + git-revise github-cli gotop hashcash -- cgit v1.2.3 From 92521e0c88bf49eb5e1bd6c59c2d9eea32bac1be Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Tue, 15 Nov 2022 09:54:24 -0500 Subject: moved ledger stuff to ~/fund Change-Id: If0996e11fa8b6a17fb42f9ce264f14187b22122c --- lib/common.nix | 9 --------- lib/linux.nix | 3 --- pkgs/hledger-1.19.1.nix | 43 ------------------------------------------- pkgs/hledger-lib-1.19.1.nix | 35 ----------------------------------- 4 files changed, 90 deletions(-) delete mode 100644 pkgs/hledger-1.19.1.nix delete mode 100644 pkgs/hledger-lib-1.19.1.nix diff --git a/lib/common.nix b/lib/common.nix index 8b40f60..2f6c77e 100644 --- a/lib/common.nix +++ b/lib/common.nix @@ -15,7 +15,6 @@ in { LANGUAGE = locale; PATH = "${homedir}/bin:${homedir}/.local/bin:$PATH"; PAGER = "less"; # "bat --theme=ansi"; - LEDGER_FILE = "${homedir}/.hledger.journal"; XTERM_LOCALE = locale; PYTHONSTARTUP = "${homedir}/.pythonrc"; @@ -46,14 +45,6 @@ in { source = ./editorconfig; target = ".editorconfig"; }; - hledger = { - source = builtins.toFile "hledger.journal" '' - !include ${homedir}/org/fund/accounts.journal - !include ${homedir}/org/fund/ledger.journal - !include ${homedir}/org/fund/prices.journal - ''; - target = ".hledger.journal"; - }; pythonrc = { source = ./pythonrc; target = ".pythonrc"; diff --git a/lib/linux.nix b/lib/linux.nix index fd0f887..7da8c2f 100644 --- a/lib/linux.nix +++ b/lib/linux.nix @@ -98,9 +98,6 @@ in youtube-dl yubioath-desktop zathura - - # languages i regularly use - (haskellPackages.ghcWithPackages (a: with a; [hledger rainbow])) # for hledger scripting ]; }; fonts.fontconfig.enable = true; diff --git a/pkgs/hledger-1.19.1.nix b/pkgs/hledger-1.19.1.nix deleted file mode 100644 index 11f4678..0000000 --- a/pkgs/hledger-1.19.1.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ mkDerivation, aeson, ansi-terminal, base, base-compat-batteries -, bytestring, cmdargs, containers, data-default, Decimal, Diff -, directory, extra, filepath, hashable, haskeline, hledger-lib -, lucid, math-functions, megaparsec, mtl, old-time, parsec -, pretty-show, process, regex-tdfa, safe, shakespeare, split -, stdenv, tabular, tasty, temporary, terminfo, text, time, timeit -, transformers, unordered-containers, utf8-string, utility-ht -, wizards -}: -mkDerivation { - pname = "hledger"; - version = "1.19.1"; - sha256 = "d5c1eb6d8de5cf2d82771db1796b57a304095fa940773a6405c9cd8085f3da71"; - isLibrary = true; - isExecutable = true; - libraryHaskellDepends = [ - aeson ansi-terminal base base-compat-batteries bytestring cmdargs - containers data-default Decimal Diff directory extra filepath - hashable haskeline hledger-lib lucid math-functions megaparsec mtl - old-time parsec pretty-show process regex-tdfa safe shakespeare - split tabular tasty temporary terminfo text time timeit - transformers unordered-containers utf8-string utility-ht wizards - ]; - executableHaskellDepends = [ - aeson ansi-terminal base base-compat-batteries bytestring cmdargs - containers data-default Decimal directory extra filepath haskeline - hledger-lib math-functions megaparsec mtl old-time parsec - pretty-show process regex-tdfa safe shakespeare split tabular tasty - temporary terminfo text time timeit transformers - unordered-containers utf8-string utility-ht wizards - ]; - testHaskellDepends = [ - aeson ansi-terminal base base-compat-batteries bytestring cmdargs - containers data-default Decimal directory extra filepath haskeline - hledger-lib math-functions megaparsec mtl old-time parsec - pretty-show process regex-tdfa safe shakespeare split tabular tasty - temporary terminfo text time timeit transformers - unordered-containers utf8-string utility-ht wizards - ]; - homepage = "http://hledger.org"; - description = "Command-line interface for the hledger accounting system"; - license = stdenv.lib.licenses.gpl3; -} diff --git a/pkgs/hledger-lib-1.19.1.nix b/pkgs/hledger-lib-1.19.1.nix deleted file mode 100644 index 329bade..0000000 --- a/pkgs/hledger-lib-1.19.1.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ mkDerivation, aeson, aeson-pretty, ansi-terminal, array, base -, base-compat-batteries, blaze-markup, bytestring, call-stack -, cassava, cassava-megaparsec, cmdargs, containers, data-default -, Decimal, directory, doctest, extra, fgl, file-embed, filepath -, Glob, hashtables, megaparsec, mtl, old-time, parsec -, parser-combinators, pretty-show, regex-tdfa, safe, split, stdenv -, tabular, tasty, tasty-hunit, template-haskell, text, time, timeit -, transformers, uglymemo, unordered-containers, utf8-string -}: -mkDerivation { - pname = "hledger-lib"; - version = "1.19.1"; - sha256 = "cabf263fe8a3c38822c9146b54a519fe56d369456c72be6db5a88c1c0208c15f"; - libraryHaskellDepends = [ - aeson aeson-pretty ansi-terminal array base base-compat-batteries - blaze-markup bytestring call-stack cassava cassava-megaparsec - cmdargs containers data-default Decimal directory extra fgl - file-embed filepath Glob hashtables megaparsec mtl old-time parsec - parser-combinators pretty-show regex-tdfa safe split tabular tasty - tasty-hunit template-haskell text time timeit transformers uglymemo - unordered-containers utf8-string - ]; - testHaskellDepends = [ - aeson aeson-pretty ansi-terminal array base base-compat-batteries - blaze-markup bytestring call-stack cassava cassava-megaparsec - cmdargs containers data-default Decimal directory doctest extra fgl - file-embed filepath Glob hashtables megaparsec mtl old-time parsec - parser-combinators pretty-show regex-tdfa safe split tabular tasty - tasty-hunit template-haskell text time timeit transformers uglymemo - unordered-containers utf8-string - ]; - homepage = "http://hledger.org"; - description = "A reusable library providing the core functionality of hledger"; - license = stdenv.lib.licenses.gpl3; -} -- cgit v1.2.3 From 3beb3a8f334b7efa58fb8ca6aa5c8409325435df Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Tue, 15 Nov 2022 11:48:51 -0500 Subject: organize and add some git configs push.default and remote.pushDefault combine to make a better branch-directed workflow by default: https://stackoverflow.com/questions/45638858/how-to-set-up-branches-with-different-pull-push-upstreams also set the default init branch to 'main' because its shorter than master Change-Id: I424c3e897954ffe3a9c7b8e6d6c6a0033cb8067b --- lib/common.nix | 15 ++++++++------- lib/packages.nix | 1 + 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/common.nix b/lib/common.nix index 2f6c77e..247a81e 100644 --- a/lib/common.nix +++ b/lib/common.nix @@ -108,13 +108,16 @@ in { glog = ''log --decorate --all --graph --pretty=format:"%Cred%h%Creset %an: %s - %Creset %C(yellow)%d%Creset %Cgreen(%cr)%Creset" --abbrev-commit --date=relative''; }; extraConfig = { - fetch.showForcedUpdate = "false"; - push.default = "simple"; - pull.rebase = "true"; commit.template = "${./git-commit-template}"; commit.verbose = "true"; - mergetool.fugitive.cmd = ''vim -f -c "Gvdiffsplit!" "$MERGED"''; + fetch.showForcedUpdate = "false"; + init.defaultBranch = "main"; + log.date = "local"; merge.tool = "fugitive"; + mergetool.fugitive.cmd = ''vim -f -c "Gvdiffsplit!" "$MERGED"''; + pull.rebase = "true"; + push.default = "current"; + remote.pushDefault = "origin"; sendemail = { #smtpuser = "ben@bsima.me"; #smtpserverport = 587; @@ -124,9 +127,7 @@ in { annotate = "yes"; cccmd = "git-contacts"; }; - log = { - date = "local"; - }; + }; }; diff --git a/lib/packages.nix b/lib/packages.nix index 717103f..a6c7baf 100644 --- a/lib/packages.nix +++ b/lib/packages.nix @@ -71,6 +71,7 @@ in { jq lsof mpc_cli + nb ncdu nmap ncmpc -- cgit v1.2.3 From c3ffee012cd18a990e76a22c7a4ea62ff61a6e60 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Wed, 16 Nov 2022 05:59:34 -0500 Subject: Add cava Change-Id: I91959078052b88f8683405a87435cde8b4981ba4 --- lib/packages.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/packages.nix b/lib/packages.nix index a6c7baf..ba5c638 100644 --- a/lib/packages.nix +++ b/lib/packages.nix @@ -47,6 +47,7 @@ in { bat barrier bc + cava cloc cmatrix direnv -- cgit v1.2.3 From c3a28e6c5882ea19b9de48e9544d0c606b2662ce Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Wed, 16 Nov 2022 06:38:01 -0500 Subject: Add transparent terminal Change-Id: Ib281d72d782df657eda23e580d54dc0d4f1b18c6 --- lib/xmonad.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/xmonad.hs b/lib/xmonad.hs index 583ffb5..a2dd180 100644 --- a/lib/xmonad.hs +++ b/lib/xmonad.hs @@ -93,6 +93,7 @@ myManageHook = manageDocks <+> scratchHook <+> (shouldFloat --> doFullFloat) <+> -- todo: use urxvtc with daemon termName = "/home/ben/.nix-profile/bin/urxvt" +transparentTerm = "urxvt -depth 32 -bg rgba:0000/0000/0000/4444 -fg '[80]white'" insKeys :: XConfig l -> [((KeyMask, KeySym), X ())] insKeys conf@(XConfig {modMask = modMask}) = @@ -101,8 +102,8 @@ insKeys conf@(XConfig {modMask = modMask}) = ((modMask, xK_o), spawn "rofi -sidebar-mode -show run"), ((modMask, xK_n), spawn "rofi -sidebar-mode -show window"), ((modMask, xK_u), spawn "rofi -show calc -modi calc -no-show-match -no-sort"), - ((modMask, xK_s), scratchpadSpawnActionTerminal termName), - ((modMask, xK_h), scratchpadSpawnActionTerminal "htop"), + ((modMask, xK_s), scratchpadSpawnActionTerminal transparentTerm), + ((modMask, xK_h), spawn transparentTerm), -- refresh display via autorandr ( (modMask, xK_r), spawn $ "autorandr --cycle" -- cgit v1.2.3 From 6bfb7ef9e6b590b3eeaa3bb0ea022251230f11a4 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Wed, 16 Nov 2022 06:38:11 -0500 Subject: Finally figured out how to use RationalRect Change-Id: I98e53e9984a98795fec01196bb51e41a2b9597dd --- lib/xmonad.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/xmonad.hs b/lib/xmonad.hs index a2dd180..b3cdffd 100644 --- a/lib/xmonad.hs +++ b/lib/xmonad.hs @@ -87,7 +87,8 @@ shouldFloat = do name <- appName return (fs && not (shouldntFloat name)) -scratchHook = scratchpadManageHook (W.RationalRect 0.1 0.1 0.6 0.6) +-- RationalRect is x y w h +scratchHook = scratchpadManageHook (W.RationalRect 0.125 0.125 0.75 0.75) myManageHook = manageDocks <+> scratchHook <+> (shouldFloat --> doFullFloat) <+> manageHook def -- cgit v1.2.3 From a0864a1754debbf9eb93ceeb4886feb283b97160 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Thu, 17 Nov 2022 16:41:36 -0500 Subject: bit more transparency Change-Id: I4a1774ffaa5d8587888c800e0f8a9df170293997 --- profiles/laptop.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profiles/laptop.nix b/profiles/laptop.nix index cf8b708..b23e08d 100644 --- a/profiles/laptop.nix +++ b/profiles/laptop.nix @@ -82,7 +82,7 @@ vSync = true; # Transparency/Opacity - inactiveOpacity = 0.80; + inactiveOpacity = 0.70; activeOpacity = 0.95; opacityRules = [ "100:class_g *?= 'Firefox'" -- cgit v1.2.3 From 77d7f79048484266bddde2ce9405d10411a8a1d7 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Thu, 17 Nov 2022 16:41:45 -0500 Subject: fix fresh wall cmdtree Change-Id: I73147fc2c0dbace0bdcc1ea4a3a22a90ff7b6041 --- lib/cfg.def.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cfg.def.h b/lib/cfg.def.h index d1e7119..57709fc 100644 --- a/lib/cfg.def.h +++ b/lib/cfg.def.h @@ -79,7 +79,7 @@ static struct command system_commands[] = { DEFCMD("R", "reboot", "reboot") DEFCMD("S", "suspend", "systemctl suspend") DEFCMD("h", "h-m switch", "home-manager switch") - DEFCMD("w", "fresh wall", "n wal") + DEFCMD("w", "fresh wall", "wal") DEFCMD("x", "restart xbindkeys", "pkill xbindkeys && xbindkeys") DEFCMD("l", "light theme", "xtheme light") -- cgit v1.2.3