From 5952e1c217d9af4c531b86d2619f8f3a7053d6fc Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Thu, 5 Dec 2024 09:03:30 +0000 Subject: [PATCH] Delete some unused files --- system/home/plasma.nix | 360 ------------------ system/home/sway.nix | 202 ---------- system/home/zathura/default.nix | 15 - .../home/zathura/emacs-keys-for-zathura.txt | 208 ---------- 4 files changed, 785 deletions(-) delete mode 100644 system/home/plasma.nix delete mode 100644 system/home/sway.nix delete mode 100644 system/home/zathura/default.nix delete mode 100644 system/home/zathura/emacs-keys-for-zathura.txt diff --git a/system/home/plasma.nix b/system/home/plasma.nix deleted file mode 100644 index 8629bb09..00000000 --- a/system/home/plasma.nix +++ /dev/null @@ -1,360 +0,0 @@ -{ - config, - pkgs, - inputs, - osConfig, - ... -}: -{ - stylix.targets.kde.enable = false; - imports = [ inputs.plasma-manager.homeManagerModules.plasma-manager ]; - home.packages = with pkgs; [ - protonmail-bridge-gui - libreoffice-qt-fresh - rc2nix - wl-clipboard - ]; - services.gpg-agent.pinentryPackage = pkgs.pinentry-qt; - programs.plasma = { - enable = true; - overrideConfig = true; - - workspace = { - iconTheme = config.gtk.iconTheme.name; - cursor = { - inherit (config.home.pointerCursor) size; - theme = config.home.pointerCursor.name; - }; - wallpaper = config.stylix.image; - }; - - fonts = - let - general = { - family = config.stylix.fonts.sansSerif.name; - pointSize = 12; - }; - small = { - inherit (general) family; - pointSize = general.pointSize - 2; - }; - fixedWidth = { - family = config.stylix.fonts.monospace.name; - pointSize = 12; - }; - in - { - inherit general small fixedWidth; - menu = general; - toolbar = general; - windowTitle = small; - }; - - hotkeys.commands = { - "launch-alacritty" = { - name = "Launch Alacritty terminal emulator"; - key = "Ctrl+Alt+T"; - command = "alacritty"; - }; - "launch-emacs" = { - name = "Launch Emacs Client Window"; - key = "Meta+Alt+X"; - command = "emacsclient -c"; - }; - }; - - panels = [ - { - height = 32; - lengthMode = "fill"; - location = "bottom"; - alignment = "center"; - hiding = "normalpanel"; - floating = true; - screen = "all"; - widgets = [ - { - name = "org.kde.plasma.kicker"; - config.General = { - icon = "nix-snowflake"; - appNameFormat = 0; - limitDepth = true; - alphaSort = true; - recentOrdering = 0; - showRecentApps = true; - showRecentDocs = true; - showIconsRootLevel = true; - }; - } - "org.kde.plasma.marginsseparator" - { - name = "org.kde.plasma.pager"; - config.General = { - showWindowIcons = "true"; - showOnlyCurrentScreen = "false"; - wrapPage = "true"; - }; - } - "org.kde.plasma.panelspacer" - { - name = "org.kde.plasma.icontasks"; - config.General = { - maxStripes = "1"; - showToolTips = "true"; - launchers = [ - "preferred://filemanager" - "preferred://browser" - "applications:emacs.desktop" - "applications:Alacritty.desktop" - "applications:writer.desktop" - "applications:calc.desktop" - "applications:impress.desktop" - "applications:org.kde.okular.desktop" - "applications:org.kde.elisa.desktop" - "applications:org.kde.plasma-systemmonitor.desktop" - "applications:systemsettings.desktop" - ]; - }; - } - "org.kde.plasma.panelspacer" - "org.kde.plasma.marginsseparator" - "org.kde.plasma.keyboardindicator" - "org.kde.plasma.cameraindicator" - { - systemTray = { - icons = { - spacing = "small"; - scaleToFit = false; - }; - }; - } - { - digitalClock = { - date = { - enable = true; - format = "isoDate"; - position = "besideTime"; - }; - time = { - format = "24h"; - showSeconds = "onlyInTooltip"; - }; - calendar.showWeekNumbers = true; - }; - } - { - name = "org.kde.plasma.userswitcher"; - config.General = { - showFace = "true"; - showName = "false"; - showFullName = "true"; - showTechnicalInfo = "true"; - }; - } - ]; - } - ]; - - shortcuts = { - ksmserver = { - "Lock Session" = [ - "Screensaver" - "Meta+Alt+L" - ]; - }; - kwin = { - "Walk Through Windows of Current Application" = "Alt+`"; - "Walk Through Windows of Current Application (Reverse)" = "Alt+¬"; - "ToggleMouseClick" = "Meta+*"; - "Expose" = "Meta+,"; - "Switch Window Down" = "Meta+J"; - "Switch Window Left" = "Meta+H"; - "Switch Window Right" = "Meta+L"; - "Switch Window Up" = "Meta+K"; - "Invert" = "Meta+Ctrl+I"; - "InvertWindow" = "Meta+Ctrl+U"; - "Invert Screen Colors" = [ ]; - }; - "services/org.kde.konsole.desktop"."_launch" = [ ]; - "services/org.kde.krunner.desktop"."_launch" = [ - "Meta+Space" - "Search" - "Alt+F2" - ]; - }; - - kwin = { - virtualDesktops = { - rows = 1; - number = 4; - }; - effects = { - translucency.enable = true; - blur.enable = true; - cube.enable = true; - dimAdminMode.enable = true; - }; - }; - - powerdevil = - let - powerButtonAction = "turnOffScreen"; - whenSleepingEnter = "standbyThenHibernate"; - whenLaptopLidClosed = "sleep"; - in - { - AC = { - inherit powerButtonAction whenSleepingEnter whenLaptopLidClosed; - autoSuspend = { - action = "sleep"; - idleTimeout = 7200; - }; - dimDisplay = { - enable = true; - # idleTimeOut = 300; - }; - turnOffDisplay = { - idleTimeout = 1800; - idleTimeoutWhenLocked = 120; - }; - }; - battery = { - inherit powerButtonAction whenSleepingEnter whenLaptopLidClosed; - autoSuspend = { - action = "sleep"; - idleTimeout = 900; - }; - dimDisplay = { - enable = true; - # idleTimeOut = 120; - }; - turnOffDisplay = { - idleTimeout = 300; - idleTimeoutWhenLocked = 60; - }; - }; - lowBattery = { - inherit powerButtonAction whenSleepingEnter whenLaptopLidClosed; - autoSuspend = { - action = "hibernate"; - idleTimeout = 300; - }; - dimDisplay = { - enable = true; - # idleTimeOut = 60; - }; - turnOffDisplay = { - idleTimeout = 120; - idleTimeoutWhenLocked = "immediately"; - }; - }; - }; - - configFile = { - baloofilerc."Basic Settings"."Indexing-Enabled" = false; - kwalletrc."org.freedesktop.secrets".apiEnabled = true; - kcminputrc.Keyboard.NumLock = 1; - plasmanotifyrc = { - Notifications = { - NormalAlwaysOnTop = true; - }; - }; - krunnerrc = { - General = { - ActivateWhenTypingOnDesktop = false; - FreeFloating = true; - }; - }; - kscreenlockerrc = { - Daemon.Timeout = 15; - Greeter.WallpaperPlugin = "org.kde.potd"; - }; - klipperrc = { - General = { - SyncClipboards = true; - MaxClipItems = 5; - IgnoreImages = false; - KeepClipboardContents = false; - }; - }; - kdeglobals = { - General = - let - AccentColor = - let - r = config.lib.stylix.scheme."base0E-rgb-r"; - g = config.lib.stylix.scheme."base0E-rgb-g"; - b = config.lib.stylix.scheme."base0E-rgb-b"; - in - "${r}, ${g}, ${b}"; - in - { - inherit AccentColor; - LastUsedCustomAccentColor = AccentColor; - TerminalApplication = "alacritty"; - TerminalService = "Alacritty.desktop"; - }; - WM = { - # TODO convert to base16 colours at some point - activeBackground = "227,229,231"; - activeBlend = "227,229,231"; - activeForeground = "35,38,41"; - inactiveBackground = "239,240,241"; - inactiveBlend = "239,240,241"; - inactiveForeground = "112,125,138"; - }; - }; - breezerc = { - Common = { - OutlineClassButton = true; - OutlineCloseButtone = true; - ShadowSize = "ShadowVeryLarge"; - ShadowStrength = "128"; - }; - Style = { - MenuOpacity = "100"; - }; - }; - dolphinrc = { - ContentDisplay = { - UsePermissionsFormat = "CombinedFormat"; - }; - General = { - BrowseThroughArchives = true; - OpenNewTabAfterLastTab = true; - RememberOpenedTabs = false; - }; - }; - kwinrc = { - Plugins = { - frozenappEnabled = false; - mouseclickEnabled = true; - shakecursorEnabled = false; - invertEnabled = true; - }; - Windows = { - FocusPolicy = "FocusFollowsMouse"; - RollOverDesktops = true; - }; - NightColor = { - Active = true; - Mode = "Location"; - LatitudeFixed = "${osConfig.location.latitude}"; - LongitudeFixed = "${osConfig.location.longitude}"; - }; - "Effect-translucency" = { - Inactive = 100; - MoveResize = 100; - Dialogs = 100; - ComboboxPopups = 100; - Menus = 100; - }; - "org.kde.kdecoration2" = { - BorderSize = "None"; - BorderSizeAuto = "false"; - }; - }; - }; - }; - xdg.configFile."autostart/proton-bridge-gui.desktop".source = "${pkgs.protonmail-bridge-gui}/share/applications/proton-bridge-gui.desktop"; -} diff --git a/system/home/sway.nix b/system/home/sway.nix deleted file mode 100644 index 86fa9bc4..00000000 --- a/system/home/sway.nix +++ /dev/null @@ -1,202 +0,0 @@ -{ - config, - lib, - pkgs, - osConfig, - ... -}: -{ - imports = [ - ./waybar.nix - ./fuzzel.nix - ./mako.nix - ]; - stylix.targets.swaylock.useImage = false; # Using swaylock-effects instead - home.packages = with pkgs; [ - libreoffice-fresh - ffmpeg - grim - slurp - swappy - wl-clipboard - swayimg - swaybg - (writeShellScriptBin "swaylockfx" '' - ${swaylock-effects}/bin/swaylock --screenshots --clock --indicator --effect-blur 7x5 --effect-vignette 0.5:0.5 - '') - (writeShellScriptBin "protonmail-setup-bridge" '' - pkill -9 -f protonmail-bridge - ${protonmail-bridge}/bin/protonmail-bridge -c - swaymsg exec "${protonmail-bridge}/bin/protonmail-bridge -n" - '') - ]; - programs = { - waybar.systemd.target = "sway-session.target"; - swaylock = { - enable = true; - package = pkgs.swaylock-effects; - }; - }; - services = { - kanshi.systemdTarget = "sway-session.target"; - gpg-agent.pinentryPackage = pkgs.pinentry-gnome3; - avizo = { - enable = true; - settings.default.image-opacity = lib.mkForce "1.0"; - }; - kdeconnect = { - enable = true; - indicator = true; - }; - swayidle = { - enable = true; - timeouts = [ - { - timeout = 60 * 15; # 15 minutes - command = "swaylockfx"; - } - ]; - }; - udiskie = { - enable = true; - notify = true; - automount = true; - tray = "never"; - }; - }; - wayland.windowManager.sway = { - enable = true; - package = pkgs.swayfx.overrideAttrs (old: { - passthru.providedSessions = [ "sway" ]; - }); - swaynag.enable = true; - systemd.enable = true; - xwayland = true; - checkConfig = false; - config = { - input = { - "*" = { - xkb_layout = osConfig.services.xserver.xkb.layout; - }; - "type:touchpad" = { - tap = "enabled"; - natural_scroll = "enabled"; - }; - }; - seat = { - "seat0" = { - xcursor_theme = "${config.gtk.cursorTheme.name} ${toString config.gtk.cursorTheme.size}"; - }; - }; - modifier = "Mod4"; - terminal = "${config.programs.alacritty.package}/bin/alacritty"; - menu = "${config.programs.fuzzel.package}/bin/fuzzel"; - workspaceAutoBackAndForth = true; - bars = [ ]; - gaps = { - inner = 5; - outer = 0; - }; - startup = [ - { command = "${pkgs.libsForQt5.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1"; } - { command = "${pkgs.protonmail-bridge}/bin/protonmail-bridge -n"; } - { command = "${pkgs.dex}/bin/dex -a"; } - { command = "${config.services.mako.package}/bin/mako"; } - ]; - window = { - border = 1; - titlebar = false; - commands = [ - { - criteria.window_role = "(?:pop-up|bubble|dialog)"; - command = "floating enable"; - } - { - criteria.app_id = "(?:org\.kde\.polkit-kde-authentication-agent-1|Pinentry|pavucontrol|\.blueman-manager-wrapped|nm-connection-editor)"; - command = "floating enable"; - } - { - criteria.class = "(?:[Mm]atplotlib|.*\.py|Idl)"; - command = "floating enable"; - } - { - # Catch-all for file dialog windows - criteria.title = "(?:Open|Save) (?:File|Folder|As)"; - command = "floating enable, resize set width 1030 height 710"; - } - { - # Inhibit idle when watching vidoes - criteria.app_id = "(?:firefox|mpv)"; - command = "inhibit_idle fullscreen"; - } - { - # Window rules for game sessions. - # Note: controllers don't reset idle timer - criteria.class = "(?:steam_app|Minecraft).*"; - command = "floating enable, fullscreen enable, inhibit_idle focus"; - } - ]; - }; - floating.border = 1; - keybindings = - let - modifier = config.wayland.windowManager.sway.config.modifier; - in - lib.mkOptionDefault { - # Movement - "${modifier}+comma" = "workspace prev"; - "${modifier}+period" = "workspace next"; - "${modifier}+shift+comma" = "move workspace prev"; - "${modifier}+shift+period" = "move workspace next"; - "${modifier}+bracketleft" = "move workspace to output left"; - "${modifier}+bracketright" = "move workspace to output right"; - - # Function keys - ## Screenshot - "Print" = "exec ${pkgs.grim}/bin/grim -g \"$(${pkgs.slurp}/bin/slurp)\" - | ${pkgs.swappy}/bin/swappy -f -"; - - ## Sound - "XF86AudioMute" = "exec ${config.services.avizo.package}/bin/volumectl %"; - "XF86AudioMicMute" = "exec ${config.services.avizo.package}/bin/volumectl -m %"; - "XF86AudioRaiseVolume" = "exec ${config.services.avizo.package}/bin/volumectl -u + 5"; - "XF86AudioLowerVolume" = "exec ${config.services.avizo.package}/bin/volumectl -u - 5"; - - ## Playback - "XF86AudioPlay" = "exec ${pkgs.playerctl}/bin/playerctl play-pause"; - "XF86AudioStop" = "exec ${pkgs.playerctl}/bin/playerctl play-pause"; - "XF86AudioPrev" = "exec ${pkgs.playerctl}/bin/playerctl previous"; - "XF86AudioNext" = "exec ${pkgs.playerctl}/bin/playerctl next"; - - ## Brightness - "XF86MonBrightnessUp" = "exec ${config.services.avizo.package}/bin/lightctl + 5"; - "XF86MonBrightnessDown" = "exec ${config.services.avizo.package}/bin/lightctl - 5"; - - # System utilities - "Mod4+Mod1+l" = "exec swaylockfx"; - "${modifier}+z" = "exec ${config.services.mako.package}/bin/makoctl restore"; - "${modifier}+Shift+z" = "exec ${config.services.mako.package}/bin/makoctl dismiss -a"; - "${modifier}+Shift+Return" = "exec ${config.programs.emacs.finalPackage}/bin/emacsclient -c"; - }; - }; - extraConfig = '' - bindgesture swipe:right workspace prev - bindgesture swipe:left workspace next - corner_radius 5 - blur enable - blur_xray disable - blur_passes 3 - blur_radius 5 - shadows enable - shadow_blur_radius 5 - layer_effects "system-menu" blur enable; blur_ignore_transparent enable; shadows enable - layer_effects "gtk-layer-shell" blur enable; blur_ignore_transparent enable; shadows enable - layer_effects "notifications" blur enable; blur_ignore_transparent enable; shadows enable - layer_effects "launcher" blur enable; blur_ignore_transparent enable; shadows enable - layer_effects "logout_dialog" blur enable; blur_ignore_transparent enable; shadows enable - layer_effects "waybar" blur enable; blur_ignore_transparent enable; shadows enable - layer_effects "avizo" blur enable; blur_ignore_transparent enable; shadows enable - titlebar_separator enable - ''; - }; - xdg.configFile."swappy/config".source = ./swappy.conf; -} diff --git a/system/home/zathura/default.nix b/system/home/zathura/default.nix deleted file mode 100644 index 502f0e3d..00000000 --- a/system/home/zathura/default.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ ... }: -{ - # TODO add emacs keybinds - programs.zathura = { - enable = true; - options = { - adjust-open = "best-fit"; - database = "null"; - dbus-service = true; - sandbox = "normal"; - scroll-page-aware = true; - synctex = true; - }; - }; -} diff --git a/system/home/zathura/emacs-keys-for-zathura.txt b/system/home/zathura/emacs-keys-for-zathura.txt deleted file mode 100644 index 276da37a..00000000 --- a/system/home/zathura/emacs-keys-for-zathura.txt +++ /dev/null @@ -1,208 +0,0 @@ -# Being an Emacs user, it is natural for me to use emacs-like and info-like keybindings for zathura. -# -# Zathura configuration documentation is available at -# https://git.pwmt.org/pwmt/zathura/-/blob/e5d2ca487147e79d0bb7acbf5174cd9dcc92a86c/doc/man/zathurarc.5.rst -# A full list of available functions and default keybindings is available at -# https://git.pwmt.org/pwmt/zathura/-/blob/e5d2ca487147e79d0bb7acbf5174cd9dcc92a86c/zathura/config.c#L301 -# -# If you want to integrate Zathura with Emacs AUCTeX mode, see -# [emacs wiki](https://www.emacswiki.org/emacs/AUCTeX). -# -# Put the following inside `$XDG_CONFIG_HOME/zathura/zathurarc - -## niceties -# when selecting text with mouse, -# copy to clipboard -set selection-clipboard clipboard - -# keep several lines of text when -# scrolling a screenful -set scroll-full-overlap 0.2 - -# see documentation for details -set scroll-page-aware true -set window-title-basename true -set adjust-open width -set statusbar-home-tilde true -set vertical-center true -set synctex true -# large bold font easier on the eyes in index mode -# status bar can be disabled with A-s -set font "FreeSans bold 16" -set zoom-step 3 - -map [normal] scroll left -map [normal] scroll down -map [normal] scroll up -map [normal] scroll right -map [normal] abort -map [insert] abort -map [normal] abort -map [normal] goto top -map [normal] > goto bottom -map [normal] a adjust_window best-fit -map [normal] s adjust_window width -map [normal] F display_link -map [normal] copy_link -map [normal] f follow -map [normal] m mark_add -map [normal] \' mark_evaluate -map [normal] \, navigate next -map [normal] \. navigate previous -map [normal] navigate next -map [normal] navigate previous -map [normal] scroll full-down -map [normal] scroll full-up -map [normal] print -map [normal] c recolor -map [normal] R reload -map [normal] v rotate rotate_cw -map [normal] V rotate rotate_ccw -map [normal] scroll left -map [normal] scroll up -map [normal] scroll down -map [normal] scroll right -map [normal] scroll half-left -map [normal] scroll half-down -map [normal] scroll half-up -map [normal] scroll half-right -map [normal] scroll full-left -map [normal] scroll full-down -map [normal] scroll full-down -map [normal] scroll full-up -map [normal] scroll full-right -map [normal] scroll full-down -map [normal] scroll full-up -map [normal] scroll full-up -map [normal] scroll full-up -map [normal] l jumplist backward -map [normal] r jumplist forward -map [normal] bisect forward -map [normal] bisect backward -# still need to use '/' to trigger search -map [normal] search forward -map [normal] search backward -map [normal] p snap_to_page -map [normal] toggle_index -map [normal] i toggle_index -map [normal] toggle_index -map [normal] toggle_statusbar -map [normal] focus_inputbar -map [normal] d toggle_page_mode -map [normal] q quit -map [normal] + zoom in -map [normal] - zoom out -map [normal] = zoom in -map [normal] toggle_presentation -map [normal] toggle_fullscreen -map [normal] j toggle_fullscreen -map [fullscreen] j toggle_fullscreen -map [fullscreen] q toggle_fullscreen -map [fullscreen] scroll left -map [fullscreen] scroll down -map [fullscreen] scroll up -map [fullscreen] scroll right -map [fullscreen] abort -map [fullscreen] abort -map [fullscreen] goto top -map [fullscreen] > goto bottom -map [fullscreen] a adjust_window best-fit -map [fullscreen] s adjust_window width -map [fullscreen] F display_link -map [fullscreen] copy_link -map [fullscreen] f follow -map [fullscreen] m mark_add -map [fullscreen] \' mark_evaluate -map [fullscreen] \, navigate next -map [fullscreen] \. navigate previous -map [fullscreen] navigate next -map [fullscreen] navigate previous -map [fullscreen] scroll full-down -map [fullscreen] scroll full-up -map [fullscreen] print -map [fullscreen] c recolor -map [fullscreen] R reload -map [fullscreen] v rotate rotate_cw -map [fullscreen] V rotate rotate_ccw -map [fullscreen] scroll left -map [fullscreen] scroll up -map [fullscreen] scroll down -map [fullscreen] scroll right -map [fullscreen] scroll half-left -map [fullscreen] scroll half-down -map [fullscreen] scroll half-up -map [fullscreen] scroll half-right -map [fullscreen] scroll full-left -map [fullscreen] scroll full-down -map [fullscreen] scroll full-down -map [fullscreen] scroll full-up -map [fullscreen] scroll full-right -map [fullscreen] scroll full-down -map [fullscreen] scroll full-up -map [fullscreen] scroll full-up -map [fullscreen] scroll full-up -map [fullscreen] l jumplist backward -map [fullscreen] r jumplist forward -map [fullscreen] bisect forward -map [fullscreen] bisect backward -map [fullscreen] search forward -map [fullscreen] search backward -map [fullscreen] p snap_to_page -map [fullscreen] i toggle_index -map [fullscreen] toggle_index -map [fullscreen] toggle_index -map [fullscreen] toggle_statusbar -map [fullscreen] focus_inputbar -map [fullscreen] d toggle_page_mode -map [fullscreen] + zoom in -map [fullscreen] - zoom out -map [fullscreen] = zoom in -# status bar will obscure last item in index mode -map [index] toggle_statusbar -map [index] q toggle_index -map [index] i toggle_index -map [index] navigate_index up -map [index] navigate_index up -map [index] navigate_index up -map [index] navigate_index down -map [index] navigate_index up -map [index] navigate_index down -map [index] \< navigate_index top -map [index] \> navigate_index bottom -map [index] navigate_index top -map [index] > navigate_index bottom -map [index] navigate_index collapse -map [index] navigate_index expand -map [index] navigate_index expand-all -map [index] navigate_index collapse-all -map [index] navigate_index up -map [index] navigate_index down -map [index] navigate_index collapse -map [index] navigate_index expand -map [index] navigate_index select -map [index] navigate_index select -map [index] navigate_index select -map [index] navigate_index select -map [index] toggle_index -map [index] toggle_index -map [index] toggle_index -map [index] toggle_index -map [presentation] i toggle_index -map [presentation] r navigate next -map [presentation] navigate next -map [presentation] navigate next -map [presentation] navigate next -map [presentation] navigate next -map [presentation] l navigate previous -map [presentation] navigate previous -map [presentation] navigate previous -map [presentation] navigate previous -map [presentation] navigate previous -map [presentation] navigate previous -map [presentation] toggle_presentation -map [presentation] q toggle_presentation -map [presentation] navigate previous -map [presentation] navigate previous -map [presentation] navigate next -map [presentation] goto top -map [presentation] > goto bottom