From df69b2a47709c7c6d608e7e91f0130e431db00a5 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 19 Jun 2022 10:59:10 +0200 Subject: ... --- accounts/gkleen@sif/autorandr-profiles/bstr.nix | 21 ----------------- accounts/gkleen@sif/autorandr-profiles/def.nix | 6 +++++ accounts/gkleen@sif/autorandr-profiles/wk.nix | 27 ++++++++++++++++++++++ accounts/gkleen@sif/default.nix | 27 ++++++++++++++-------- accounts/gkleen@sif/emacs.el | 2 +- accounts/gkleen@sif/systemd.nix | 6 +++++ .../gkleen@sif/taffybar/gkleen-sif-taffybar.cabal | 1 + accounts/gkleen@sif/taffybar/src/taffybar.hs | 11 ++++++--- .../bluetooth.lua.d/50-bluez-config.lua | 4 +--- accounts/gkleen@sif/xmonad/xmonad.hs | 1 + 10 files changed, 68 insertions(+), 38 deletions(-) delete mode 100644 accounts/gkleen@sif/autorandr-profiles/bstr.nix create mode 100644 accounts/gkleen@sif/autorandr-profiles/wk.nix (limited to 'accounts') diff --git a/accounts/gkleen@sif/autorandr-profiles/bstr.nix b/accounts/gkleen@sif/autorandr-profiles/bstr.nix deleted file mode 100644 index 527f8321..00000000 --- a/accounts/gkleen@sif/autorandr-profiles/bstr.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ - fingerprint = { - "eDP-1-1" = "00ffffffffffff004c83414100000000131d0104b5221378029491ae513eb7240b505400000001010101010101010101010101010101f0d40040f17018803020440058c21000001bf0d40040f17018803020440058c21000001b0000000f00ff093cff093c2c800000000000000000fe0041544e413536575230382d3020011502030f00e3058000e6060501736d0700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ab"; - "DP-1.3" = "00ffffffffffff000469a3289bdd00000b190104a53e22783a1cb5a3574fa0270d5054bfef00d1c0814081809500b300714f81c0010122cc0050f0703e80181035006d552100001a04740030f2705a80b0588a006d552100001a000000fd001e5018a03c041100f0f838f03c000000fc0041535553205042323837510a2001a8020327714f0102031112130414051f900e0f1d1e23091707830100006a030c0010000078200000565e00a0a0a02950302035006d552100001ee26800a0a0402e60302036006d552100001a011d00bc52d01e20b82855406d552100001e8c0ad090204031200c4055006d55210000180000000000000000000000000000000064"; - }; - config = { - "DP-1.3" = { - enable = true; - primary = true; - position = "3840x0"; - rate = "60"; - mode = "3840x2160"; - }; - eDP-1-1 = { - enable = true; - primary = false; - position = "0x0"; - mode = "3840x2160"; - }; - }; -} diff --git a/accounts/gkleen@sif/autorandr-profiles/def.nix b/accounts/gkleen@sif/autorandr-profiles/def.nix index 304b4afe..5733dbe7 100644 --- a/accounts/gkleen@sif/autorandr-profiles/def.nix +++ b/accounts/gkleen@sif/autorandr-profiles/def.nix @@ -1,3 +1,4 @@ +{ pkgs, ... }: { fingerprint = { eDP-1-1 = "00ffffffffffff004c83414100000000131d0104b5221378029491ae513eb7240b505400000001010101010101010101010101010101f0d40040f17018803020440058c21000001bf0d40040f17018803020440058c21000001b0000000f00ff093cff093c2c800000000000000000fe0041544e413536575230382d3020011502030f00e3058000e6060501736d0700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ab"; @@ -10,4 +11,9 @@ mode = "3840x2160"; }; }; + hooks = { + postswitch = '' + ${pkgs.networkmanager}/nmcli radio wifi on + ''; + }; } diff --git a/accounts/gkleen@sif/autorandr-profiles/wk.nix b/accounts/gkleen@sif/autorandr-profiles/wk.nix new file mode 100644 index 00000000..97fa14c9 --- /dev/null +++ b/accounts/gkleen@sif/autorandr-profiles/wk.nix @@ -0,0 +1,27 @@ +{ pkgs, ... }: +{ + fingerprint = { + "eDP-1-1" = "00ffffffffffff004c83414100000000131d0104b5221378029491ae513eb7240b505400000001010101010101010101010101010101f0d40040f17018803020440058c21000001bf0d40040f17018803020440058c21000001b0000000f00ff093cff093c2c800000000000000000fe0041544e413536575230382d3020011502030f00e3058000e6060501736d0700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ab"; + "DP-1.3" = "00ffffffffffff000469a3289bdd00000b190104a53e22783a1cb5a3574fa0270d5054bfef00d1c0814081809500b300714f81c0010122cc0050f0703e80181035006d552100001a04740030f2705a80b0588a006d552100001a000000fd001e5018a03c041100f0f838f03c000000fc0041535553205042323837510a2001a8020327714f0102031112130414051f900e0f1d1e23091707830100006a030c0010000078200000565e00a0a0a02950302035006d552100001ee26800a0a0402e60302036006d552100001a011d00bc52d01e20b82855406d552100001e8c0ad090204031200c4055006d55210000180000000000000000000000000000000064"; + }; + config = { + "DP-1.3" = { + enable = true; + primary = true; + position = "3840x0"; + rate = "60"; + mode = "3840x2160"; + }; + eDP-1-1 = { + enable = true; + primary = false; + position = "0x0"; + mode = "3840x2160"; + }; + }; + hooks = { + postswitch = '' + ${pkgs.networkmanager}/nmcli radio wifi off + ''; + }; +} diff --git a/accounts/gkleen@sif/default.nix b/accounts/gkleen@sif/default.nix index 84b9e464..f28cf4e2 100644 --- a/accounts/gkleen@sif/default.nix +++ b/accounts/gkleen@sif/default.nix @@ -88,12 +88,13 @@ in { emacs = { enable = true; extraPackages = epkgs: with epkgs; [ - evil evil-dvorak undo-tree magit haskell-mode - nix-mode yaml-mode json-mode shakespeare-mode - smart-mode-line highlight-parentheses highlight-symbol - ag sass-mode lua-mode fira-code-mode use-package # notmuch + evil evil-dvorak undo-tree magit haskell-mode nix-mode + yaml-mode json-mode shakespeare-mode smart-mode-line + highlight-parentheses highlight-symbol ag sass-mode lua-mode + fira-code-mode use-package # notmuch use-package-ensure-system-package git-gutter emacsScratch edit-server mediawiki editorconfig typescript-mode + markdown-mode ]; }; firefox = { @@ -123,14 +124,20 @@ in { autorandr = { enable = true; - hooks.postswitch = { - # "restart-compton" = "${pkgs.systemd}/bin/systemctl --user try-restart picom"; - "restart-trays" = '' - ${pkgs.coreutils}/bin/sleep 5 - ${pkgs.systemd}/bin/systemctl --user try-restart taffybar + hooks = { + preswitch = { + "stop-tray" = '' + ${pkgs.systemd}/bin/systemctl --user try-restart tray.target ''; + }; + postswitch = { + # "restart-compton" = "${pkgs.systemd}/bin/systemctl --user try-restart picom"; + "restart-tray" = '' + ${pkgs.systemd}/bin/systemctl --user try-restart tray.target + ''; + }; }; - profiles = customUtils.nixImport { dir = ./autorandr-profiles; }; + profiles = customUtils.nixImport rec { dir = ./autorandr-profiles; _import = name: _base: import "${toString dir}/${name}" inputs; }; }; zsh.initExtra = "source ${./zshrc}"; diff --git a/accounts/gkleen@sif/emacs.el b/accounts/gkleen@sif/emacs.el index 1a7cb863..8b7a4b45 100644 --- a/accounts/gkleen@sif/emacs.el +++ b/accounts/gkleen@sif/emacs.el @@ -148,7 +148,7 @@ (setq direnv-enabled-hosts '("uni2work-dev1")) -(setq auth-sources '("secrets:Login")) +(setq auth-sources '()) (defun tramp-sh-handle-start-file-process@my-direnv (args) "Enable Direnv for hosts in `direnv-enabled-hosts'." diff --git a/accounts/gkleen@sif/systemd.nix b/accounts/gkleen@sif/systemd.nix index 1193723f..819c1ff6 100644 --- a/accounts/gkleen@sif/systemd.nix +++ b/accounts/gkleen@sif/systemd.nix @@ -148,6 +148,12 @@ in { Environment = [ "XSECURELOCK_WANT_FIRST_KEYPRESS=1" ]; }; }; + mpris-proxy = { + Unit.Description = "Mpris proxy"; + Unit.After = [ "network.target" "sound.target" ]; + Service.ExecStart = "${pkgs.bluez}/bin/mpris-proxy"; + Install.WantedBy = [ "default.target" ]; + }; "autossh-socks@proxy.mathw0h:8119" = { Service = { Type = "notify"; diff --git a/accounts/gkleen@sif/taffybar/gkleen-sif-taffybar.cabal b/accounts/gkleen@sif/taffybar/gkleen-sif-taffybar.cabal index 7f56dece..e32cb473 100644 --- a/accounts/gkleen@sif/taffybar/gkleen-sif-taffybar.cabal +++ b/accounts/gkleen@sif/taffybar/gkleen-sif-taffybar.cabal @@ -22,6 +22,7 @@ executable taffybar , text , HStringTemplate , gtk-sni-tray + , hslogger other-modules: Paths_gkleen_sif_taffybar , System.Taffybar.Widget.Clock , System.Taffybar.Widget.TooltipBattery diff --git a/accounts/gkleen@sif/taffybar/src/taffybar.hs b/accounts/gkleen@sif/taffybar/src/taffybar.hs index 7dbb5c8e..13585c55 100644 --- a/accounts/gkleen@sif/taffybar/src/taffybar.hs +++ b/accounts/gkleen@sif/taffybar/src/taffybar.hs @@ -21,15 +21,20 @@ import Control.Monad.Trans.Reader (mapReaderT) import Paths_gkleen_sif_taffybar +import System.Log.Logger + main :: IO () main = do + logger <- getLogger "System.Taffybar" + saveGlobalLogger $ setLevel INFO logger + myCssPath <- getDataFileName "taffybar.css" - startTaffybar exampleTaffybarConfig{ cssPath = Just myCssPath } + startTaffybar taffybarConfig{ cssPath = Just myCssPath } -exampleTaffybarConfig :: TaffybarConfig -exampleTaffybarConfig = +taffybarConfig :: TaffybarConfig +taffybarConfig = let myWorkspacesConfig = defaultWorkspacesConfig { maxIcons = Just 0 diff --git a/accounts/gkleen@sif/wireplumber/bluetooth.lua.d/50-bluez-config.lua b/accounts/gkleen@sif/wireplumber/bluetooth.lua.d/50-bluez-config.lua index 7934e392..b0f2b55b 100644 --- a/accounts/gkleen@sif/wireplumber/bluetooth.lua.d/50-bluez-config.lua +++ b/accounts/gkleen@sif/wireplumber/bluetooth.lua.d/50-bluez-config.lua @@ -5,7 +5,7 @@ rule = { }, }, apply_properties = { - ["bluez5.auto-connect"] = "[ hfp_hf hsp_hs a2dp_sink ]", + -- ["bluez5.auto-connect"] = "[ hfp_hf hsp_hs a2dp_sink ]", }, } @@ -15,6 +15,4 @@ bluez_monitor.properties = { ["bluez5.enable-msbc"] = true, ["bluez5.enable-sbc-xq"] = true, ["bluez5.enable-hw-volume"] = true, - ["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]", - ["bluez5.codecs"] = "[ sbc sbc_xq aac ldac aptx aptx_hd aptx_ll aptx_ll_duplex faststream faststream_duplex ]", } diff --git a/accounts/gkleen@sif/xmonad/xmonad.hs b/accounts/gkleen@sif/xmonad/xmonad.hs index 1b73b7a1..48fb4ab2 100644 --- a/accounts/gkleen@sif/xmonad/xmonad.hs +++ b/accounts/gkleen@sif/xmonad/xmonad.hs @@ -199,6 +199,7 @@ hostFromName h , assign "monitor" $ className =? "Virt-viewer" , assign "monitor" $ (className =? "Alacritty" <&&> resource =? "htop") , assign "monitor" $ (className =? "Alacritty" <&&> resource =? "monitor") + , assign "monitor" $ className =? "xfreerdp" , Just $ (className =? "Alacritty" <&&> resource =? "htop") -?> centerFloat , Just $ (className =? "Scp-dbus-service.py") -?> centerFloat , Just $ (className =? "Alacritty" <&&> resource =? "log") -?> centerFloat -- cgit v1.2.3