This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

repair switch-theme again for wayland/qtile

+43
+5
2configs/themes.nix
··· 16 16 ${pkgs.coreutils}/bin/chown lass:users /var/theme/current_theme 17 17 ${pkgs.xorg.xrdb}/bin/xrdb -merge /var/theme/config/xresources || : # wayland has no xresources 18 18 ${pkgs.procps}/bin/pkill -HUP xsettingsd || : 19 + set +f 20 + GSETTINGS_SCHEMA_DIR=$(echo /run/current-system/sw/share/gsettings-schemas/*/*/schemas | sed s', ,:,g') 21 + export GSETTINGS_SCHEMA_DIR 22 + set -f 19 23 ${pkgs.glib}/bin/gsettings set org.gnome.desktop.interface gtk-theme "$(cat /var/theme/config/gtk-theme)" || : 24 + ${pkgs.glib}/bin/gsettings set org.gnome.desktop.interface color-scheme "prefer-$1" || : 20 25 else 21 26 echo "theme $1 not found" 22 27 fi
+35
tools/nvim.nix
··· 37 37 " need to use lua to expand $HOME 38 38 lua vim.o.undodir = vim.fs.normalize('$HOME/.vim/undodir') 39 39 ''; 40 + extraConfigLua = '' 41 + local function watch_theme_file() 42 + local path = '/var/theme/current_theme' 43 + local uv = vim.loop 44 + 45 + local watcher = uv.new_fs_event() 46 + watcher:start(path, {}, function(err, filename, events) 47 + if err then 48 + print('Error watching file:', err) 49 + return 50 + end 51 + 52 + -- Use Lua's io.open to read the file content 53 + local file = io.open(path, 'r') 54 + if not file then 55 + print('Failed to open file:', path) 56 + return 57 + end 58 + 59 + local content = file:read('*a') -- Read the entire file 60 + file:close() 61 + 62 + content = content:gsub('%s+$', "") 63 + content = content:gsub('"', '\\"') 64 + 65 + -- Execute a Neovim command based on the content 66 + vim.schedule(function() 67 + cmd = 'set background=' .. content 68 + vim.cmd(cmd) 69 + end) 70 + end) 71 + end 72 + watch_theme_file() 73 + 74 + ''; 40 75 extraPlugins = [ 41 76 pkgs.vimPlugins.vim-fetch 42 77 ];
+3
2configs/desktops/lib/wayland.nix
··· 40 40 ]; 41 41 42 42 xdg.portal.enable = true; 43 + xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; 43 44 xdg.portal.wlr.enable = true; 44 45 xdg.portal.config.common.default = "*"; # get old behavior back 45 46 fonts.enableDefaultPackages = true; ··· 48 49 security.pam.services.swaylock = { }; 49 50 50 51 programs.dconf.enable = lib.mkDefault true; 52 + services.gnome.gnome-keyring.enable = lib.mkDefault true; 51 53 programs.xwayland.enable = lib.mkDefault true; 52 54 53 55 environment.sessionVariables = { ··· 57 59 QT_QPA_PLATFORM = "wayland"; 58 60 QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; 59 61 _JAVA_AWT_WM_NONREPARENTING = "1"; 62 + NIXOS_OZONE_WL = "1"; # Hint for electron apps to use wayland 60 63 }; 61 64 62 65 programs.wshowkeys.enable = true;