From 5938c92ec69a1152aceb27c1e4316560f1e713cb Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Sat, 9 Sep 2023 01:10:22 +0200 Subject: [PATCH] meooow --- common.nix | 8 +- flake.nix | 17 + haskell/xmonad/xmonad.hs | 132 ++-- hosts/catbook-j/configuration.nix | 119 +++ hosts/catbook-j/hardware-configuration.nix | 58 ++ modules/desktop/audio.nix | 1 + modules/desktop/cloud.nix | 8 +- modules/desktop/compositing.nix | 4 +- modules/desktop/default.nix | 70 +- modules/desktop/networking.nix | 12 +- modules/desktop/social.nix | 2 +- modules/helix.nix | 17 +- modules/zsh.nix | 1 - other/config.nu | 795 +++++++++++++++++++++ other/remaps-catbook.toml | 22 + other/scripts/desktop/desktopctl.nix | 63 +- other/scripts/desktop/searchwolf.sh | 2 +- 17 files changed, 1177 insertions(+), 154 deletions(-) create mode 100644 hosts/catbook-j/configuration.nix create mode 100644 hosts/catbook-j/hardware-configuration.nix create mode 100644 other/config.nu create mode 100644 other/remaps-catbook.toml diff --git a/common.nix b/common.nix index 53a3d2f..d524cfd 100644 --- a/common.nix +++ b/common.nix @@ -30,9 +30,9 @@ with builtins; wget git neofetch pciutils zip unzip gnutar iw btop nodejs jdk8 jdk11 - jdk libsecret gh nix-prefetch-scripts fzf glab openal + jdk libsecret gh nix-prefetch-scripts fzf glab ripgrep sl lolcat appimage-run git-crypt file whois p7zip file nmap cmatrix tree - socat + socat smartmontools ]; }; @@ -82,7 +82,7 @@ with builtins; users.users.jade = { isNormalUser = true; - extraGroups = [ "wheel" "input" "uinput" "libvirtd" "adbusers" ]; + extraGroups = [ "wheel" "input" "uinput" "libvirtd" "adbusers" "dialout" "plugdev" ]; packages = [ pkgs.marksman ]; @@ -93,6 +93,6 @@ users.users.jade = { algorithm = "zstd"; }; - users.defaultUserShell = pkgs.zsh; + users.defaultUserShell = pkgs.nushell.override { additionalFeatures = (p: p ++ ["dataframe"]); }; } diff --git a/flake.nix b/flake.nix index f4ba512..cb5c0bb 100644 --- a/flake.nix +++ b/flake.nix @@ -43,6 +43,23 @@ } ]; }; + catbook-j = nixpkgs.lib.nixosSystem { + specialArgs = { + inherit inputs; + }; + system = "x86_64-linux"; + modules = [ + ./hosts/catbook-j/configuration.nix + home-manager.nixosModules.home-manager { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.jade = { nixosConfig, pkgs, ... }: { + home.sessionVariables.TZ = nixosConfig.time.timeZone; + home.stateVersion = "${nixosConfig.system.stateVersion}"; + }; + } + ]; + }; potatobook-g = nixpkgs.lib.nixosSystem { specialArgs = { inherit inputs; diff --git a/haskell/xmonad/xmonad.hs b/haskell/xmonad/xmonad.hs index 4978161..d06fad1 100644 --- a/haskell/xmonad/xmonad.hs +++ b/haskell/xmonad/xmonad.hs @@ -24,6 +24,8 @@ import XMonad.Prompt import XMonad.Prompt.Layout import Graphics.X11.ExtraTypes.XF86 +import Control.Monad (when) + -- The preferred terminal program, which is used in a binding below and by -- certain contrib modules. -- @@ -74,18 +76,22 @@ myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $ -- Rotate through the available layout algorithms , ((modm, xK_space ), sendMessage NextLayout) - -- rofiing + -- rofiing , ((modm, xK_d), spawn "rofi -show drun") - , ((modm .|. shiftMask, xK_e), spawn "rofi -show \"desktopctl\" -modes \"desktopctl:$(which desktopctl)\"") - , ((modm, xK_m), spawn "menu-qalc") - , ((modm, xK_i), spawn "rofimoji -f alchemical_symbols anatolian_hieroglyphs emojis braille_patterns box_drawing chess_symbols emoticons geometric_shapes gothic greek_extended math mathematical_alphanumeric_symbols mathematical_operators miscellaneous_symbols miscellaneous_mathematical_symbols-a miscellaneous_mathematical_symbols-b miscellaneous_symbols_and_arrows miscellaneous_symbols_and_pictographs miscellaneous_technical modi modifier_tone_letters musical_symbols nerd_font number_forms shorthand_format_controls specials variation_selectors vertical_forms -a copy") + , ((modm .|. shiftMask, xK_e), spawn "rofi -show desktopctl -modes desktopctl:desktopctl -show-icons") + , ((modm, xK_m), spawn "menu-qalc -- -theme gruvbox-dark") + , ((modm, xK_i), spawn "rofimoji --selector-args '-theme gruvbox-dark' -f alchemical_symbols anatolian_hieroglyphs emojis braille_patterns box_drawing chess_symbols emoticons geometric_shapes gothic greek_extended math mathematical_alphanumeric_symbols mathematical_operators miscellaneous_symbols miscellaneous_mathematical_symbols-a miscellaneous_mathematical_symbols-b miscellaneous_symbols_and_arrows miscellaneous_symbols_and_pictographs miscellaneous_technical modi modifier_tone_letters musical_symbols nerd_font number_forms shorthand_format_controls specials variation_selectors vertical_forms -a copy") - -- screenshotting - -- TODO: Fix/rewrite window-screenshot.sh - , ((modm, xK_w), spawn "window-screenshot.sh") - , ((modm, xK_s), spawn "flameshot gui -c -p $HOME/Pictures/screenshots") - , ((modm, xK_a), spawn "flameshot screen -c -p $HOME/Pictures/screenshots") - , ((modm, xK_t), spawn "ocr-screenshot.sh") + , ((modm, xK_o), spawn "rofi -show searchwolf -modes searchwolf:searchwolf -theme gruvbox-dark") + + -- screenshotting + -- TODO: Fix/rewrite window-screenshot.sh + , ((modm, xK_w), spawn "window-screenshot.sh") + , ((modm, xK_s), spawn "flameshot gui -c -p $HOME/Pictures/screenshots") + , ((modm, xK_a), spawn "flameshot screen -c -p $HOME/Pictures/screenshots") + , ((modm, xK_t), spawn "ocr-screenshot.sh") + + , ((modm .|. shiftMask, xK_t), spawn "DEVICE=\"MELF0410:00 1FD2:7007\"; if [ $(xinput list-props \"$DEVICE\" | awk '/^\\tDevice Enabled \\([0-9]+\\):\\t[01]/ {print $NF}') = \"1\" ]; then xinput disable \"$DEVICE\"; else xinput enable \"$DEVICE\"; fi") -- Reset the layouts on the current workspace to default -- , ((modm .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf) @@ -117,13 +123,13 @@ myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $ , ((modm , xK_period), sendMessage (IncMasterN (-1))) -- Brightness n stuff - , ((0, xF86XK_AudioRaiseVolume), spawn "amixer -D pulse sset Master 10%+") - , ((0, xF86XK_AudioLowerVolume), spawn "amixer -D pulse sset Master 10%-") - , ((0, xF86XK_AudioMute), spawn "amixer -D pulse sset Master toggle") - , ((0, xF86XK_MonBrightnessUp), spawn "brightnessctl set +10%") - , ((0, xF86XK_MonBrightnessDown), spawn "brightnessctl set 10%-") - , ((0, xF86XK_KbdBrightnessUp), spawn "brightnessctl -d \"kbd_backlight\" set +10%") - , ((0, xF86XK_KbdBrightnessDown), spawn "brightnessctl -d \"kbd_backlight\" set 10%-") + -- , ((0, xF86XK_AudioRaiseVolume), spawn "amixer -D pulse sset Master 10%+") + -- , ((0, xF86XK_AudioLowerVolume), spawn "amixer -D pulse sset Master 10%-") + -- , ((0, xF86XK_AudioMute), spawn "amixer -D pulse sset Master toggle") + -- , ((0, xF86XK_MonBrightnessUp), spawn "brightnessctl set +10%") + -- , ((0, xF86XK_MonBrightnessDown), spawn "brightnessctl set 10%-") + -- , ((0, xF86XK_KbdBrightnessUp), spawn "brightnessctl -d \"kbd_backlight\" set +10%") + -- , ((0, xF86XK_KbdBrightnessDown), spawn "brightnessctl -d \"kbd_backlight\" set 10%-") -- Toggle the status bar gap -- Use this binding with avoidStruts from Hooks.ManageDocks. @@ -137,7 +143,6 @@ myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $ --, ((modm , xK_q ), spawn "xmonad --recompile; xmonad --restart") -- Run xmessage with a summary of the default keybindings (useful for beginners) - , ((modm .|. shiftMask, xK_slash ), spawn ("echo \"" ++ help ++ "\" | xmessage -file -")) ] ++ @@ -148,15 +153,15 @@ myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $ [((m .|. modm, k), windows $ f i) | (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9] , (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]] - ++ + -- ++ -- -- mod-{w,e,r}, Switch to physical/Xinerama screens 1, 2, or 3 -- mod-shift-{w,e,r}, Move client to screen 1, 2, or 3 -- - [((m .|. modm, key), screenWorkspace sc >>= flip whenJust (windows . f)) - | (key, sc) <- zip [xK_w, xK_e, xK_r] [0..] - , (f, m) <- [(W.view, 0), (W.shift, shiftMask)]] + -- [((m .|. modm, key), screenWorkspace sc >>= flip whenJust (windows . f)) + -- | (key, sc) <- zip [xK_w, xK_e, xK_r] [0..] + -- , (f, m) <- [(W.view, 0), (W.shift, shiftMask)]] ------------------------------------------------------------------------ @@ -246,6 +251,11 @@ myManageHook = composeAll -- myEventHook = mempty +focusChangeHook (FocusChangeEvent {ev_event_type=t, ev_window=window}) = do + when (t == focusIn) $ spawn "notify-send 'focusIn'" + when (t == focusOut) $ spawn "notify-send 'focusOut'" + return $ All True + ------------------------------------------------------------------------ -- Status bars and logging @@ -269,6 +279,8 @@ myStartupHook = do spawn "pkill nm-applet; nm-applet" spawn "mullvad-vpn --background" + + ------------------------------------------------------------------------ -- Now run xmonad with all the defaults we set up. @@ -284,74 +296,24 @@ main = xmonad $ withEasySB mySB defToggleStrutsKey defaults -- No need to modify this. -- defaults = def - -- simple stuff + -- simple stuff { terminal = myTerminal - , focusFollowsMouse = myFocusFollowsMouse - , clickJustFocuses = myClickJustFocuses - , borderWidth = myBorderWidth - , modMask = myModMask - , workspaces = myWorkspaces - , normalBorderColor = myNormalBorderColor - , focusedBorderColor = myFocusedBorderColor - - -- key bindings - , keys = myKeys + , focusFollowsMouse = myFocusFollowsMouse + , clickJustFocuses = myClickJustFocuses + , borderWidth = myBorderWidth + , modMask = myModMask + , workspaces = myWorkspaces + , normalBorderColor = myNormalBorderColor + , focusedBorderColor = myFocusedBorderColor + -- , clientMask = focusChangeMask .|. XMonad.clientMask + -- key bindings + , keys = myKeys , mouseBindings = myMouseBindings - -- hooks, layouts + -- hooks, layouts , layoutHook = spacingRaw True (Border 0 0 0 0) True (Border 7 7 7 7) True $ myLayout , manageHook = myManageHook , handleEventHook = myEventHook , logHook = myLogHook , startupHook = myStartupHook - } + } --- | Finally, a copy of the default bindings in simple textual tabular format. -help :: String -help = unlines ["The default modifier key is 'alt'. Default keybindings:", - "", - "-- launching and killing programs", - "mod-Shift-Enter Launch xterminal", - "mod-p Launch dmenu", - "mod-Shift-p Launch gmrun", - "mod-Shift-c Close/kill the focused window", - "mod-Space Rotate through the available layout algorithms", - "mod-Shift-Space Reset the layouts on the current workSpace to default", - "mod-n Resize/refresh viewed windows to the correct size", - "", - "-- move focus up or down the window stack", - "mod-Tab Move focus to the next window", - "mod-Shift-Tab Move focus to the previous window", - "mod-j Move focus to the next window", - "mod-k Move focus to the previous window", - "mod-m Move focus to the master window", - "", - "-- modifying the window order", - "mod-Return Swap the focused window and the master window", - "mod-Shift-j Swap the focused window with the next window", - "mod-Shift-k Swap the focused window with the previous window", - "", - "-- resizing the master/slave ratio", - "mod-h Shrink the master area", - "mod-l Expand the master area", - "", - "-- floating layer support", - "mod-t Push window back into tiling; unfloat and re-tile it", - "", - "-- increase or decrease number of windows in the master area", - "mod-comma (mod-,) Increment the number of windows in the master area", - "mod-period (mod-.) Deincrement the number of windows in the master area", - "", - "-- quit, or restart", - "mod-Shift-q Quit xmonad", - "mod-q Restart xmonad", - "mod-[1..9] Switch to workSpace N", - "", - "-- Workspaces & screens", - "mod-Shift-[1..9] Move client to workspace N", - "mod-{w,e,r} Switch to physical/Xinerama screens 1, 2, or 3", - "mod-Shift-{w,e,r} Move client to screen 1, 2, or 3", - "", - "-- Mouse bindings: default actions bound to mouse events", - "mod-button1 Set the window to floating mode and move by dragging", - "mod-button2 Raise the window to the top of the stack", - "mod-button3 Set the window to floating mode and resize by dragging"] diff --git a/hosts/catbook-j/configuration.nix b/hosts/catbook-j/configuration.nix new file mode 100644 index 0000000..8348d95 --- /dev/null +++ b/hosts/catbook-j/configuration.nix @@ -0,0 +1,119 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page +# and in the NixOS manual (accessible by running ‘nixos-help’). + +{ config, pkgs, ... }: +let + evremap = pkgs.rustPlatform.buildRustPackage { + pname = "evremap"; + version = "0.1.0"; + src = pkgs.fetchFromGitHub { + owner = "wez"; + repo = "evremap"; + rev = "4480c4eda223b98899b0fbd926bc34f7bd0e1a18"; + sha256 = "sha256-BxSrphgW1n465FX6bKVkq6O0XE2JqanfSYlsGwWUWkQ="; + }; + cargoHash = ""; + cargoLock.lockFile = ../../other/evremap.Cargo.lock; + postPatch = '' + cp ${../../other/evremap.Cargo.lock} Cargo.lock + ''; + nativeBuildInputs = [ pkgs.pkg-config ]; + buildInputs = [ pkgs.libevdev ]; + }; +in { + imports = + [ # Include the results of the hardware scan. + ./hardware-configuration.nix + ../../common.nix + ../../modules + ]; + jade = { + flatpak.enable = true; + desktop = { + enable = true; + compositing.enable = true; + creative.enable = true; + syncthing.enable = true; + kdeconnect.enable = true; + cloud.enable = true; + social.enable = true; + mail.enable = true; + gaming.enable = true; + }; + helix.enable = true; + zellij.enable = true; + terminal.enable = true; + # zsh.enable = true; + }; + + hardware.trackpoint = { + enable = true; + # device = "MELF0410:00 1FD2:7007"; + device = "DELL081C:00 044E:121F Mouse"; + sensitivity = 255; + }; + + boot.resumeDevice = "/dev/disk/by-uuid/4f9e8afa-f8d7-40bf-b3ea-17e8e8fbb694"; + boot.kernelParams = [ "resume_offset=7380652" ]; + + boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; + + hardware.bluetooth.enable = true; + services.blueman.enable = true; + + services.xserver.libinput.touchpad.tapping = false; + + environment.systemPackages = [ pkgs.vivaldi pkgs.vivaldi-ffmpeg-codecs pkgs.plantuml ]; + + # Bootloader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + # Setup keyfile + boot.initrd.secrets = { + "/crypto_keyfile.bin" = null; + }; + + systemd.services = { + evremap = { + script = "${evremap}/bin/evremap remap ${../../other/remaps-catbook.toml}"; + wantedBy = ["multi-user.target"]; + }; + }; + + services.xserver.displayManager.autoLogin = { + enable = true; + user = "jade"; + }; + + networking.hostName = "catbook-j"; # Define your hostname. + # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. + + # Configure network proxy if necessary + # networking.proxy.default = "http://user:password@proxy:port/"; + # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + + # Enable networking + networking.networkmanager.enable = true; + + i18n.extraLocaleSettings = { + LC_ADDRESS = "de_DE.UTF-8"; + LC_IDENTIFICATION = "de_DE.UTF-8"; + LC_MEASUREMENT = "de_DE.UTF-8"; + LC_MONETARY = "de_DE.UTF-8"; + LC_NAME = "de_DE.UTF-8"; + LC_NUMERIC = "de_DE.UTF-8"; + LC_PAPER = "de_DE.UTF-8"; + LC_TELEPHONE = "de_DE.UTF-8"; + LC_TIME = "de_DE.UTF-8"; + }; + # This value determines the NixOS release from which the default + # settings for stateful data, like file locations and database versions + # on your system were taken. It‘s perfectly fine and recommended to leave + # this value at the release version of the first install of this system. + # Before changing this value read the documentation for this option + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). + system.stateVersion = "23.05"; # Did you read the comment? + +} diff --git a/hosts/catbook-j/hardware-configuration.nix b/hosts/catbook-j/hardware-configuration.nix new file mode 100644 index 0000000..38a5aa6 --- /dev/null +++ b/hosts/catbook-j/hardware-configuration.nix @@ -0,0 +1,58 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/4f9e8afa-f8d7-40bf-b3ea-17e8e8fbb694"; + fsType = "btrfs"; + options = [ "subvol=@" "compress=zstd:3" "noatime" ]; + }; + + fileSystems."/home" = + { device = "/dev/disk/by-uuid/4f9e8afa-f8d7-40bf-b3ea-17e8e8fbb694"; + fsType = "btrfs"; + options = [ "subvol=@home" "compress=zstd:3" ]; + }; + + fileSystems."/swap" = + { device = "/dev/disk/by-uuid/4f9e8afa-f8d7-40bf-b3ea-17e8e8fbb694"; + fsType = "btrfs"; + options = [ "subvol=@/@swap" "noatime" ]; + }; + + boot.initrd.luks.devices."luks-9cd75cce-6829-4db8-8c5c-a9fb9ec3e122".device = "/dev/disk/by-uuid/9cd75cce-6829-4db8-8c5c-a9fb9ec3e122"; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/C6CA-5DE8"; + fsType = "vfat"; + }; + + swapDevices = [{ + device = "/swap/swapfile"; + size = (1024 * 12); + }]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wwp0s20f0u2i12.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/modules/desktop/audio.nix b/modules/desktop/audio.nix index 8abfc6c..f015427 100644 --- a/modules/desktop/audio.nix +++ b/modules/desktop/audio.nix @@ -13,6 +13,7 @@ jack.enable = true; }; }; + sound.mediaKeys.enable = true; home-manager.users.jade = { pkgs, ... }: { home.packages = with pkgs; [ pavucontrol diff --git a/modules/desktop/cloud.nix b/modules/desktop/cloud.nix index 01ae017..cc0f90e 100644 --- a/modules/desktop/cloud.nix +++ b/modules/desktop/cloud.nix @@ -7,10 +7,10 @@ in with lib; { }; config = mkIf cfg.enable { home-manager.users.jade = { pkgs, ... }: { - services.nextcloud-client = { - enable = true; - startInBackground = true; - }; + # services.nextcloud-client = { + # enable = true; + # startInBackground = true; + # }; programs.rbw = { enable = true; settings = { diff --git a/modules/desktop/compositing.nix b/modules/desktop/compositing.nix index b9c368d..cf46cc2 100644 --- a/modules/desktop/compositing.nix +++ b/modules/desktop/compositing.nix @@ -15,11 +15,9 @@ in with lib; { shadowOffsets = [ (-40) (-30) ]; shadowOpacity = 0.2; shadowExclude = [ - "class_g = 'Conky'" "class_g ?= 'Notify-osd'" - "class_g = 'Cairo-clock'" "_GTK_FRAME_EXTENTS@:c" - "class_g != 'Rofi'" + "!(class_g = 'Rofi' || class_g = 'Dunst')" ]; vSync = true; diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix index 1a8c834..b450790 100644 --- a/modules/desktop/default.nix +++ b/modules/desktop/default.nix @@ -84,7 +84,7 @@ in with lib; { virtualisation.libvirtd.enable = true; - environment.systemPackages = with pkgs; [ gnome.gdm ]; + # environment.systemPackages = with pkgs; [ gnome.gdm ]; services = { printing.enable = true; gnome.gnome-keyring.enable = true; @@ -140,10 +140,66 @@ in with lib; { # also useful: # - every custom script its own flake n stuff + programs.xss-lock = { + enable = true; + lockerCommand = "${pkgs.i3lock}/bin/i3lock"; + }; + + services.illum.enable = true; + services.avahi.enable = true; + + services.smartd = { + enable = true; + notifications.x11.enable = true; + notifications.test = true; + }; + home-manager.users.jade = { pkgs, ... }: { - programs.rofi.theme = ../../other/rofi-themes/applauncher.rasi; + programs.bat = { + # TODO: more config + enable = true; + }; + programs.exa = { + # TODO: more config + enable = true; + }; + programs.nushell = { + enable = true; + package = config.users.defaultUserShell; + configFile.source = ../../other/config.nu; + }; + programs.ripgrep = { + enable = true; + }; + services.dunst = { + enable = true; + settings = { + global = { + dmenu = "${pkgs.rofi}/bin/rofi -theme gruvbox-dark -dmenu -p dunst"; + browser = "${pkgs.librewolf}/bin/librewolf"; + mouse_left_click = "context"; + mouse_middle_click = "close_current"; + background = "#282828"; + foreground = "#ebdbb2"; + frame_color = "#504945"; + frame_width = 2; + }; + }; + }; + programs.rofi = { + enable = true; + theme = ../../other/rofi-themes/applauncher.rasi; + }; home.packages = with pkgs; [ - i3lock-fancy rofi rofimoji feh xorg.xinput dunst arandr flameshot + #nushell + nu_scripts direnv + + magic-wormhole-rs + + # carapace completer + carapace + + i3lock rofimoji feh xorg.xinput arandr flameshot tesseract5 imagemagick xclip xmacro libwacom wacomtablet xorg.xev # categories @@ -154,14 +210,14 @@ in with lib; { # from environment.systemPackages cleanup font-manager xdotool xorg.xwininfo gparted librewolf firefox uhk-agent - cool-retro-term xdg-desktop-portal-gtk nheko obsidian virt-manager - ddccontrol-db firebird-emu godot gitg gpick qdirstat ffmpeg_5 + cool-retro-term xdg-desktop-portal-gtk obsidian zettlr virt-manager + ddccontrol-db firebird-emu gitg gpick qdirstat ffmpeg_5 # external - libnotify i3lock-fancy rofi rofimoji feh xorg.xinput dunst arandr + libnotify i3lock rofi rofimoji feh xorg.xinput arandr flameshot tesseract5 imagemagick xclip kitty xmacro - brightnessctl drawing libqalculate ddgr jq brillo + brightnessctl drawing libqalculate ddgr jq # custom scripts window-screenshot desktop-ctl em-record em-play em-play-loop diff --git a/modules/desktop/networking.nix b/modules/desktop/networking.nix index 9d69620..2c761db 100644 --- a/modules/desktop/networking.nix +++ b/modules/desktop/networking.nix @@ -3,7 +3,7 @@ { config = { networking = { - networkmanager.wifi.backend = "iwd"; + networkmanager.wifi.backend = "wpa_supplicant"; extraHosts = '' 127.0.0.1 www.youtube.com 127.0.0.1 www.reddit.com @@ -37,16 +37,6 @@ mullvad-vpn speedtest-cli ]; - xsession.windowManager.i3.config.startup = [ - { - command = "pkill nm-applet; nm-applet"; - always = true; - } - { - command = "mullvad-vpn --background"; - always = true; - } - ]; }; }; } diff --git a/modules/desktop/social.nix b/modules/desktop/social.nix index 8a75388..a893320 100644 --- a/modules/desktop/social.nix +++ b/modules/desktop/social.nix @@ -7,10 +7,10 @@ in with lib; { }; config = mkIf cfg.enable { home-manager.users.jade = { pkgs, ... }: { - programs.nheko.enable = true; home.packages = with pkgs; [ evolutionWithPlugins schildichat-desktop + mumble ]; }; }; diff --git a/modules/helix.nix b/modules/helix.nix index 0af1534..bbd8cb6 100644 --- a/modules/helix.nix +++ b/modules/helix.nix @@ -31,10 +31,19 @@ in with lib; { }; }; languages = { - language = [{ - name = "rust"; - config = { rust-analyzer.check.command = "clippy"; }; - }]; + language = [ + { + name = "rust"; + } + { + name = "php"; + file-types = [ "php" ]; + language-server = { + command = "psalm"; + args = ["--language-server"]; + }; + } + ]; }; }; }; diff --git a/modules/zsh.nix b/modules/zsh.nix index 4f1e4f1..3dca73a 100644 --- a/modules/zsh.nix +++ b/modules/zsh.nix @@ -6,7 +6,6 @@ in with lib; { enable = mkEnableOption "Enable zsh"; }; config = mkIf cfg.enable { - programs.zsh.enable = true; home-manager.users.jade = { pkgs,... } : { home.packages = with pkgs; [ thefuck diff --git a/other/config.nu b/other/config.nu new file mode 100644 index 0000000..c0a1e82 --- /dev/null +++ b/other/config.nu @@ -0,0 +1,795 @@ +# Nushell Config File +# +# version = "0.84.0" + +# For more information on defining custom themes, see +# https://www.nushell.sh/book/coloring_and_theming.html +# And here is the theme collection +# https://github.com/nushell/nu_scripts/tree/main/themes +let dark_theme = { + # color for nushell primitives + separator: white + leading_trailing_space_bg: { attr: n } # no fg, no bg, attr none effectively turns this off + header: green_bold + empty: blue + # Closures can be used to choose colors for specific values. + # The value (in this case, a bool) is piped into the closure. + # eg) {|| if $in { 'light_cyan' } else { 'light_gray' } } + bool: light_cyan + int: white + filesize: cyan + duration: white + date: purple + range: white + float: white + string: white + nothing: white + binary: white + cellpath: white + row_index: green_bold + record: white + list: white + block: white + hints: dark_gray + search_result: {bg: red fg: white} + shape_and: purple_bold + shape_binary: purple_bold + shape_block: blue_bold + shape_bool: light_cyan + shape_closure: green_bold + shape_custom: green + shape_datetime: cyan_bold + shape_directory: cyan + shape_external: cyan + shape_externalarg: green_bold + shape_filepath: cyan + shape_flag: blue_bold + shape_float: purple_bold + # shapes are used to change the cli syntax highlighting + shape_garbage: { fg: white bg: red attr: b} + shape_globpattern: cyan_bold + shape_int: purple_bold + shape_internalcall: cyan_bold + shape_list: cyan_bold + shape_literal: blue + shape_match_pattern: green + shape_matching_brackets: { attr: u } + shape_nothing: light_cyan + shape_operator: yellow + shape_or: purple_bold + shape_pipe: purple_bold + shape_range: yellow_bold + shape_record: cyan_bold + shape_redirection: purple_bold + shape_signature: green_bold + shape_string: green + shape_string_interpolation: cyan_bold + shape_table: blue_bold + shape_variable: purple + shape_vardecl: purple +} + +let light_theme = { + # color for nushell primitives + separator: dark_gray + leading_trailing_space_bg: { attr: n } # no fg, no bg, attr none effectively turns this off + header: green_bold + empty: blue + # Closures can be used to choose colors for specific values. + # The value (in this case, a bool) is piped into the closure. + # eg) {|| if $in { 'dark_cyan' } else { 'dark_gray' } } + bool: dark_cyan + int: dark_gray + filesize: cyan_bold + duration: dark_gray + date: purple + range: dark_gray + float: dark_gray + string: dark_gray + nothing: dark_gray + binary: dark_gray + cellpath: dark_gray + row_index: green_bold + record: white + list: white + block: white + hints: dark_gray + search_result: {fg: white bg: red} + shape_and: purple_bold + shape_binary: purple_bold + shape_block: blue_bold + shape_bool: light_cyan + shape_closure: green_bold + shape_custom: green + shape_datetime: cyan_bold + shape_directory: cyan + shape_external: cyan + shape_externalarg: green_bold + shape_filepath: cyan + shape_flag: blue_bold + shape_float: purple_bold + # shapes are used to change the cli syntax highlighting + shape_garbage: { fg: white bg: red attr: b} + shape_globpattern: cyan_bold + shape_int: purple_bold + shape_internalcall: cyan_bold + shape_list: cyan_bold + shape_literal: blue + shape_match_pattern: green + shape_matching_brackets: { attr: u } + shape_nothing: light_cyan + shape_operator: yellow + shape_or: purple_bold + shape_pipe: purple_bold + shape_range: yellow_bold + shape_record: cyan_bold + shape_redirection: purple_bold + shape_signature: green_bold + shape_string: green + shape_string_interpolation: cyan_bold + shape_table: blue_bold + shape_variable: purple + shape_vardecl: purple +} + +# External completer example +let carapace_completer = {|spans| + carapace $spans.0 nushell $spans | from json +} + +# The default config record. This is where much of your global configuration is setup. +$env.config = { + show_banner: false # true or false to enable or disable the welcome banner at startup + + ls: { + use_ls_colors: true # use the LS_COLORS environment variable to colorize output + clickable_links: true # enable or disable clickable links. Your terminal has to support links. + } + + rm: { + always_trash: true # always act as if -t was given. Can be overridden with -p + } + + cd: { + abbreviations: true # allows `cd s/o/f` to expand to `cd some/other/folder` + } + + table: { + mode: reinforced # basic, compact, compact_double, light, thin, with_love, rounded, reinforced, heavy, none, other + index_mode: always # "always" show indexes, "never" show indexes, "auto" = show indexes when a table has "index" column + show_empty: true # show 'empty list' and 'empty record' placeholders for command output + padding: { left: 1, right: 1 } # a left right padding of each column in a table + trim: { + methodology: wrapping # wrapping or truncating + wrapping_try_keep_words: true # A strategy used by the 'wrapping' methodology + truncating_suffix: "..." # A suffix used by the 'truncating' methodology + } + header_on_separator: false # show header text on separator/border line + } + + # datetime_format determines what a datetime rendered in the shell would look like. + # Behavior without this configuration point will be to "humanize" the datetime display, + # showing something like "a day ago." + datetime_format: { + # normal: '%a, %d %b %Y %H:%M:%S %z' # shows up in displays of variables or other datetime's outside of tables + # table: '%m/%d/%y %I:%M:%S%p' # generally shows up in tabular outputs such as ls. commenting this out will change it to the default human readable datetime format + } + + explore: { + try: { + border_color: {fg: "white"} + }, + status_bar_background: {fg: "#ebdbb2", bg: "#504945"}, + command_bar_text: {fg: "#ebdbb2"}, + highlight: {fg: "black", bg: "yellow"}, + status: { + error: {fg: "white", bg: "red"}, + warn: {} + info: {} + }, + table: { + split_line: {fg: "#404040"}, + selected_cell: {}, + selected_row: {}, + selected_column: {}, + show_cursor: true, + line_head_top: true, + line_head_bottom: true, + line_shift: true, + line_index: true, + }, + config: { + border_color: {fg: "white"} + cursor_color: {fg: "black", bg: "light_yellow"} + }, + } + + history: { + max_size: 100_000 # Session has to be reloaded for this to take effect + sync_on_enter: true # Enable to share history between multiple sessions, else you have to close the session to write history to file + file_format: "sqlite" # "sqlite" or "plaintext" + isolation: false # only available with sqlite file_format. true enables history isolation, false disables it. true will allow the history to be isolated to the current session using up/down arrows. false will allow the history to be shared across all sessions. + } + + completions: { + case_sensitive: false # set to true to enable case-sensitive completions + quick: true # set this to false to prevent auto-selecting completions when only one remains + partial: true # set this to false to prevent partial filling of the prompt + algorithm: "fuzzy" # prefix or fuzzy + external: { + enable: true # set to false to prevent nushell looking into $env.PATH to find more suggestions, `false` recommended for WSL users as this look up may be very slow + max_results: 100 # setting it lower can improve completion performance at the cost of omitting some options + completer: $carapace_completer # check 'carapace_completer' above as an example + } + } + + filesize: { + metric: true # true => KB, MB, GB (ISO standard), false => KiB, MiB, GiB (Windows standard) + format: "auto" # b, kb, kib, mb, mib, gb, gib, tb, tib, pb, pib, eb, eib, auto + } + + cursor_shape: { + emacs: line # block, underscore, line, blink_block, blink_underscore, blink_line (line is the default) + vi_insert: line # block, underscore, line , blink_block, blink_underscore, blink_line (block is the default) + vi_normal: block # block, underscore, line, blink_block, blink_underscore, blink_line (underscore is the default) + } + + color_config: $dark_theme # if you want a more interesting theme, you can replace the empty record with `$dark_theme`, `$light_theme` or another custom record + use_grid_icons: true + footer_mode: "25" # always, never, number_of_rows, auto + float_precision: 2 # the precision for displaying floats in tables + buffer_editor: "" # command that will be used to edit the current line buffer with ctrl+o, if unset fallback to $env.EDITOR and $env.VISUAL + use_ansi_coloring: true + bracketed_paste: true # enable bracketed paste, currently useless on windows + edit_mode: vi # emacs, vi + shell_integration: false # enables terminal shell integration. Off by default, as some terminals have issues with this. + render_right_prompt_on_last_line: false # true or false to enable or disable right prompt to be rendered on last line of the prompt. + + hooks: { + pre_prompt: [{ || + let direnv = (direnv export json | from json) + let direnv = if ($direnv | length) == 1 { $direnv } else { {} } + $direnv | load-env + }] # run before the prompt is shown + pre_execution: [{ null }] # run before the repl input is run + env_change: { + PWD: [{|before, after| null }] # run if the PWD environment is different since the last repl input + } + display_output: "if (term size).columns >= 100 { table -e } else { table }" # run to display the output of a pipeline + command_not_found: { null } # return an error message when a command is not found + } + + menus: [ + # Configuration for default nushell menus + # Note the lack of source parameter + { + name: completion_menu + only_buffer_difference: false + marker: "| " + type: { + layout: columnar + columns: 4 + col_width: 20 # Optional value. If missing all the screen width is used to calculate column width + col_padding: 2 + } + style: { + text: green + selected_text: green_reverse + description_text: yellow + } + } + { + name: history_menu + only_buffer_difference: true + marker: "? " + type: { + layout: list + page_size: 10 + } + style: { + text: green + selected_text: green_reverse + description_text: yellow + } + } + { + name: help_menu + only_buffer_difference: true + marker: "? " + type: { + layout: description + columns: 4 + col_width: 20 # Optional value. If missing all the screen width is used to calculate column width + col_padding: 2 + selection_rows: 4 + description_rows: 10 + } + style: { + text: green + selected_text: green_reverse + description_text: yellow + } + } + ] + + keybindings: [ + { + name: completion_menu + modifier: none + keycode: tab + mode: [emacs vi_normal vi_insert] + event: { + until: [ + { send: menu name: completion_menu } + { send: menunext } + ] + } + } + { + name: history_menu + modifier: control + keycode: char_r + mode: [emacs, vi_insert, vi_normal] + event: { send: menu name: history_menu } + } + { + name: help_menu + modifier: none + keycode: f1 + mode: [emacs, vi_insert, vi_normal] + event: { send: menu name: help_menu } + } + { + name: completion_previous_menu + modifier: shift + keycode: backtab + mode: [emacs, vi_normal, vi_insert] + event: { send: menuprevious } + } + { + name: next_page_menu + modifier: control + keycode: char_x + mode: emacs + event: { send: menupagenext } + } + { + name: undo_or_previous_page_menu + modifier: control + keycode: char_z + mode: emacs + event: { + until: [ + { send: menupageprevious } + { edit: undo } + ] + } + } + { + name: escape + modifier: none + keycode: escape + mode: [emacs, vi_normal, vi_insert] + event: { send: esc } # NOTE: does not appear to work + } + { + name: cancel_command + modifier: control + keycode: char_c + mode: [emacs, vi_normal, vi_insert] + event: { send: ctrlc } + } + { + name: quit_shell + modifier: control + keycode: char_d + mode: [emacs, vi_normal, vi_insert] + event: { send: ctrld } + } + { + name: clear_screen + modifier: control + keycode: char_l + mode: [emacs, vi_normal, vi_insert] + event: { send: clearscreen } + } + { + name: search_history + modifier: control + keycode: char_q + mode: [emacs, vi_normal, vi_insert] + event: { send: searchhistory } + } + { + name: open_command_editor + modifier: control + keycode: char_o + mode: [emacs, vi_normal, vi_insert] + event: { send: openeditor } + } + { + name: move_up + modifier: none + keycode: up + mode: [emacs, vi_normal, vi_insert] + event: { + until: [ + {send: menuup} + {send: up} + ] + } + } + { + name: move_down + modifier: none + keycode: down + mode: [emacs, vi_normal, vi_insert] + event: { + until: [ + {send: menudown} + {send: down} + ] + } + } + { + name: move_left + modifier: none + keycode: left + mode: [emacs, vi_normal, vi_insert] + event: { + until: [ + {send: menuleft} + {send: left} + ] + } + } + { + name: move_right_or_take_history_hint + modifier: none + keycode: right + mode: [emacs, vi_normal, vi_insert] + event: { + until: [ + {send: historyhintcomplete} + {send: menuright} + {send: right} + ] + } + } + { + name: move_one_word_left + modifier: control + keycode: left + mode: [emacs, vi_normal, vi_insert] + event: {edit: movewordleft} + } + { + name: move_one_word_right_or_take_history_hint + modifier: control + keycode: right + mode: [emacs, vi_normal, vi_insert] + event: { + until: [ + {send: historyhintwordcomplete} + {edit: movewordright} + ] + } + } + { + name: move_to_line_start + modifier: none + keycode: home + mode: [emacs, vi_normal, vi_insert] + event: {edit: movetolinestart} + } + { + name: move_to_line_start + modifier: control + keycode: char_a + mode: [emacs, vi_normal, vi_insert] + event: {edit: movetolinestart} + } + { + name: move_to_line_end_or_take_history_hint + modifier: none + keycode: end + mode: [emacs, vi_normal, vi_insert] + event: { + until: [ + {send: historyhintcomplete} + {edit: movetolineend} + ] + } + } + { + name: move_to_line_end_or_take_history_hint + modifier: control + keycode: char_e + mode: [emacs, vi_normal, vi_insert] + event: { + until: [ + {send: historyhintcomplete} + {edit: movetolineend} + ] + } + } + { + name: move_to_line_start + modifier: control + keycode: home + mode: [emacs, vi_normal, vi_insert] + event: {edit: movetolinestart} + } + { + name: move_to_line_end + modifier: control + keycode: end + mode: [emacs, vi_normal, vi_insert] + event: {edit: movetolineend} + } + { + name: move_up + modifier: control + keycode: char_p + mode: [emacs, vi_normal, vi_insert] + event: { + until: [ + {send: menuup} + {send: up} + ] + } + } + { + name: move_down + modifier: control + keycode: char_t + mode: [emacs, vi_normal, vi_insert] + event: { + until: [ + {send: menudown} + {send: down} + ] + } + } + { + name: delete_one_character_backward + modifier: none + keycode: backspace + mode: [emacs, vi_insert] + event: {edit: backspace} + } + { + name: delete_one_word_backward + modifier: control + keycode: backspace + mode: [emacs, vi_insert] + event: {edit: backspaceword} + } + { + name: delete_one_character_forward + modifier: none + keycode: delete + mode: [emacs, vi_insert] + event: {edit: delete} + } + { + name: delete_one_character_forward + modifier: control + keycode: delete + mode: [emacs, vi_insert] + event: {edit: delete} + } + { + name: delete_one_character_forward + modifier: control + keycode: char_h + mode: [emacs, vi_insert] + event: {edit: backspace} + } + { + name: delete_one_word_backward + modifier: control + keycode: char_w + mode: [emacs, vi_insert] + event: {edit: backspaceword} + } + { + name: move_left + modifier: none + keycode: backspace + mode: vi_normal + event: {edit: moveleft} + } + { + name: newline_or_run_command + modifier: none + keycode: enter + mode: emacs + event: {send: enter} + } + { + name: move_left + modifier: control + keycode: char_b + mode: emacs + event: { + until: [ + {send: menuleft} + {send: left} + ] + } + } + { + name: move_right_or_take_history_hint + modifier: control + keycode: char_f + mode: emacs + event: { + until: [ + {send: historyhintcomplete} + {send: menuright} + {send: right} + ] + } + } + { + name: redo_change + modifier: control + keycode: char_g + mode: emacs + event: {edit: redo} + } + { + name: undo_change + modifier: control + keycode: char_z + mode: emacs + event: {edit: undo} + } + { + name: paste_before + modifier: control + keycode: char_y + mode: emacs + event: {edit: pastecutbufferbefore} + } + { + name: cut_word_left + modifier: control + keycode: char_w + mode: emacs + event: {edit: cutwordleft} + } + { + name: cut_line_to_end + modifier: control + keycode: char_k + mode: emacs + event: {edit: cuttoend} + } + { + name: cut_line_from_start + modifier: control + keycode: char_u + mode: emacs + event: {edit: cutfromstart} + } + { + name: swap_graphemes + modifier: control + keycode: char_t + mode: emacs + event: {edit: swapgraphemes} + } + { + name: move_one_word_left + modifier: alt + keycode: left + mode: emacs + event: {edit: movewordleft} + } + { + name: move_one_word_right_or_take_history_hint + modifier: alt + keycode: right + mode: emacs + event: { + until: [ + {send: historyhintwordcomplete} + {edit: movewordright} + ] + } + } + { + name: move_one_word_left + modifier: alt + keycode: char_b + mode: emacs + event: {edit: movewordleft} + } + { + name: move_one_word_right_or_take_history_hint + modifier: alt + keycode: char_f + mode: emacs + event: { + until: [ + {send: historyhintwordcomplete} + {edit: movewordright} + ] + } + } + { + name: delete_one_word_forward + modifier: alt + keycode: delete + mode: emacs + event: {edit: deleteword} + } + { + name: delete_one_word_backward + modifier: alt + keycode: backspace + mode: emacs + event: {edit: backspaceword} + } + { + name: delete_one_word_backward + modifier: alt + keycode: char_m + mode: emacs + event: {edit: backspaceword} + } + { + name: cut_word_to_right + modifier: alt + keycode: char_d + mode: emacs + event: {edit: cutwordright} + } + { + name: upper_case_word + modifier: alt + keycode: char_u + mode: emacs + event: {edit: uppercaseword} + } + { + name: lower_case_word + modifier: alt + keycode: char_l + mode: emacs + event: {edit: lowercaseword} + } + { + name: capitalize_char + modifier: alt + keycode: char_c + mode: emacs + event: {edit: capitalizechar} + } + ] +} + + +# STOLEN FROM: https://www.grailbox.com/2023/07/autostart-zellij-in-nushell/ +# zellij +def start_zellij [] { + if 'ZELLIJ' not-in ($env | columns) { + if 'ZELLIJ_AUTO_ATTACH' in ($env | columns) and $env.ZELLIJ_AUTO_ATTACH == 'true' { + zellij attach -c + } else { + zellij + } + + if 'ZELLIJ_AUTO_EXIT' in ($env | columns) and $env.ZELLIJ_AUTO_EXIT == 'true' { + exit + } + } +} + +start_zellij + +alias gnix = cd ~/nix-configs; +alias grepo = cd ~/Documents/repos; +alias wh = wormhole-rs; diff --git a/other/remaps-catbook.toml b/other/remaps-catbook.toml new file mode 100644 index 0000000..6a6067f --- /dev/null +++ b/other/remaps-catbook.toml @@ -0,0 +1,22 @@ +device_name = "AT Translated Set 2 keyboard" + +[[remap]] +input = [ "KEY_Y" ] +output = [ "KEY_Z" ] + +[[remap]] +input = [ "KEY_Z" ] +output = [ "KEY_Y" ] + +[[remap]] +input = [ "KEY_LEFTALT" ] +output = [ "KEY_LEFTMETA" ] + +[[remap]] +input = [ "KEY_LEFTMETA" ] +output = [ "KEY_LEFTALT" ] + +[[dual_role]] +input = "KEY_CAPSLOCK" +hold = ["KEY_LEFTCTRL"] +tap = ["KEY_ESC"] diff --git a/other/scripts/desktop/desktopctl.nix b/other/scripts/desktop/desktopctl.nix index a2fbbb1..1161e38 100644 --- a/other/scripts/desktop/desktopctl.nix +++ b/other/scripts/desktop/desktopctl.nix @@ -1,38 +1,35 @@ { pkgs, ... }: pkgs.writeShellScriptBin "desktopctl" '' - run() { - case $@ in - "Lock Screen") - nohup sh -c "i3lock-fancy" > /dev/null & - exit 0 - ;; - "Log Out") - pkill xmonad - exit 0 - ;; - "Shut Down") - shutdown now - exit 0 - ;; - "Reboot") - systemctl reboot - exit 0 - ;; - esac +case $@ in + "Lock Screen") + nohup sh -c "i3lock-fancy" > /dev/null & + exit 0 + ;; + "Log Out") + pkill xmonad + exit 0 + ;; + "Shut Down") + shutdown now + exit 0 + ;; + "Reboot") + systemctl reboot + exit 0 + ;; +esac - # resizes grid - echo -en "\0theme\x1flistview,inputbar,message{columns:4;lines:1;}\n" - # resizes window, moves it to top of screen, adjusts rounded corners - echo -en "\0theme\x1fwindow{width:800px;location:north;y-offset:24px;border-radius:0 0 12px 12px;}\n" - # swaps grid and input bar - echo -en "\0theme\x1fmainbox{children:[listview,inputbar];}\n" - # fixes brown line below input bar - echo -en "\0theme\x1finputbar{margin:0;}\n" +# resizes grid +echo -en "\0theme\x1flistview,inputbar,message{columns:4;lines:1;}\n" +# resizes window, moves it to top of screen, adjusts rounded corners +echo -en "\0theme\x1fwindow{width:800px;location:north;y-offset:24px;border-radius:0 0 12px 12px;}\n" +# swaps grid and input bar +echo -en "\0theme\x1fmainbox{children:[listview,inputbar];}\n" +# fixes brown line below input bar +echo -en "\0theme\x1finputbar{margin:0;}\n" - echo -en "Lock Screen\0icon\x1f${../../../other/assets/desktopctl/lock-screen.svg}\n" - echo -en "Log Out\0icon\x1f${../../../other/assets/desktopctl/logout.svg}\n" - echo -en "Shut Down\0icon\x1f${../../../other/assets/desktopctl/shutdown.svg}\n" - echo -en "Reboot\0icon\x1f${../../../other/assets/desktopctl/reboot.svg}\n" - } - rofi -show "desktopctl" -modes "desktopctl:run" +echo -en "Lock Screen\0icon\x1f${../../../other/assets/desktopctl/lock-screen.svg}\n" +echo -en "Log Out\0icon\x1f${../../../other/assets/desktopctl/logout.svg}\n" +echo -en "Shut Down\0icon\x1f${../../../other/assets/desktopctl/shutdown.svg}\n" +echo -en "Reboot\0icon\x1f${../../../other/assets/desktopctl/reboot.svg}\n" '' diff --git a/other/scripts/desktop/searchwolf.sh b/other/scripts/desktop/searchwolf.sh index 056c689..58dbafe 100755 --- a/other/scripts/desktop/searchwolf.sh +++ b/other/scripts/desktop/searchwolf.sh @@ -12,7 +12,7 @@ case $ROFI_RETV in exit 0 ;; 2) - ddgrout=$(ddgr --json --num=25 "$@") + ddgrout=$(ddgr --json --num=25 "$@" --url-handler 'librewolf') for i in $(echo $ddgrout | jq -r 'keys | @sh'); do title=$(echo $ddgrout | jq -r .[$i].title)