diff options
Diffstat (limited to 'users/ryan/linux')
28 files changed, 1520 insertions, 0 deletions
diff --git a/users/ryan/linux/alacritty/alacritty.yml b/users/ryan/linux/alacritty/alacritty.yml new file mode 100644 index 0000000..4fbd991 --- /dev/null +++ b/users/ryan/linux/alacritty/alacritty.yml | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | window: | ||
| 2 | opacity: 0.70 | ||
| 3 | font: | ||
| 4 | size: 15 | ||
| 5 | normal: | ||
| 6 | family: "Monofur Nerd Font Mono" | ||
| 7 | style: Regular | ||
| 8 | |||
| 9 | bold: | ||
| 10 | family: "Monofur Nerd Font Mono" | ||
| 11 | style: Bold | ||
| 12 | |||
| 13 | italic: | ||
| 14 | family: "Monofur Nerd Font Mono" | ||
| 15 | style: Italic | ||
diff --git a/users/ryan/linux/firefox-nightly/default.nix b/users/ryan/linux/firefox-nightly/default.nix new file mode 100644 index 0000000..5c3fce7 --- /dev/null +++ b/users/ryan/linux/firefox-nightly/default.nix | |||
| @@ -0,0 +1,193 @@ | |||
| 1 | { config, pkgs, ... }: | ||
| 2 | |||
| 3 | { | ||
| 4 | programs.firefox = { | ||
| 5 | enable = true; | ||
| 6 | policies = import ./policies.nix; | ||
| 7 | #package = zen-browser.packages.${pkgs.system}.default.unwrapped; | ||
| 8 | |||
| 9 | profiles.${config.home.username} = { | ||
| 10 | name = "${config.home.username}"; | ||
| 11 | isDefault = true; | ||
| 12 | containersForce = true; | ||
| 13 | containers = { | ||
| 14 | rit = { | ||
| 15 | name = "RIT"; | ||
| 16 | color = "orange"; | ||
| 17 | icon = "dollar"; | ||
| 18 | id = 1; | ||
| 19 | }; | ||
| 20 | ritwork = { | ||
| 21 | name = "RIT Work"; | ||
| 22 | color = "green"; | ||
| 23 | icon = "briefcase"; | ||
| 24 | id = 2; | ||
| 25 | }; | ||
| 26 | other = { | ||
| 27 | name = "Other"; | ||
| 28 | color = "blue"; | ||
| 29 | icon = "fingerprint"; | ||
| 30 | id = 3; | ||
| 31 | }; | ||
| 32 | }; | ||
| 33 | search = { | ||
| 34 | force = true; | ||
| 35 | default = "ddg"; | ||
| 36 | order = ["ddg" "google"]; | ||
| 37 | engines = { | ||
| 38 | "Nix Packages" = { | ||
| 39 | urls = [ | ||
| 40 | { | ||
| 41 | template = "https://search.nixos.org/packages"; | ||
| 42 | params = [ | ||
| 43 | { | ||
| 44 | name = "type"; | ||
| 45 | value = "packages"; | ||
| 46 | } | ||
| 47 | { | ||
| 48 | name = "channel"; | ||
| 49 | value = "unstable"; | ||
| 50 | } | ||
| 51 | { | ||
| 52 | name = "query"; | ||
| 53 | value = "{searchTerms}"; | ||
| 54 | } | ||
| 55 | ]; | ||
| 56 | } | ||
| 57 | ]; | ||
| 58 | icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; | ||
| 59 | definedAliases = ["@np"]; | ||
| 60 | }; | ||
| 61 | }; | ||
| 62 | }; | ||
| 63 | userChrome = " | ||
| 64 | #main-window .toolbar-items { | ||
| 65 | overflow: hidden; | ||
| 66 | transition: height 0.3s 0.3s !important; | ||
| 67 | } | ||
| 68 | /* Default state: Set initial height to enable animation */ | ||
| 69 | #main-window .toolbar-items { height: 3em !important; } | ||
| 70 | #main-window .titlebar-button { height: 3em !important; } | ||
| 71 | #main-window[uidensity=\"touch\"] .toolbar-items { height: 3.35em !important; } | ||
| 72 | #main-window[uidensity=\"compact\"] .toolbar-items { height: 2.7em !important; } | ||
| 73 | /* Hidden state: Hide native tabs strip */ | ||
| 74 | #main-window[titlepreface*=\"\"] .toolbar-items { height: 0 !important; } | ||
| 75 | #main-window[titlepreface*=\"\"] .titlebar-button { height: 0 !important; } | ||
| 76 | /* Hidden state: Fix z-index of active pinned tabs */ | ||
| 77 | #main-window[titlepreface*=\"\"] #tabbrowser-tabs { z-index: 0 !important; } | ||
| 78 | |||
| 79 | /* Sidebery expand on mouse-over and hide otherwise */ | ||
| 80 | |||
| 81 | /* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/autohide_sidebar.css made available under Mozilla Public License v. 2.0 | ||
| 82 | See the above repository for updates as well as full license text. */ | ||
| 83 | |||
| 84 | /* Show sidebar only when the cursor is over it */ | ||
| 85 | /* The border controlling sidebar width will be removed so you'll need to modify these values to change width */ | ||
| 86 | |||
| 87 | #sidebar-box{ | ||
| 88 | --uc-sidebar-width: 60px; | ||
| 89 | --uc-sidebar-hover-width: 230px; | ||
| 90 | --uc-autohide-sidebar-delay: 200ms; /* Wait 0.2s before hiding sidebar */ | ||
| 91 | --uc-autohide-transition-duration: 115ms; | ||
| 92 | --uc-autohide-transition-type: linear; | ||
| 93 | --browser-area-z-index-sidebar: 3; | ||
| 94 | position: relative; | ||
| 95 | min-width: var(--uc-sidebar-width) !important; | ||
| 96 | width: var(--uc-sidebar-width) !important; | ||
| 97 | max-width: var(--uc-sidebar-width) !important; | ||
| 98 | z-index: var(--browser-area-z-index-sidebar,3); | ||
| 99 | } | ||
| 100 | #sidebar-box[positionend]{ direction: rtl } | ||
| 101 | #sidebar-box[positionend] > *{ direction: ltr } | ||
| 102 | |||
| 103 | #sidebar-box[positionend]:-moz-locale-dir(rtl){ direction: ltr } | ||
| 104 | #sidebar-box[positionend]:-moz-locale-dir(rtl) > *{ direction: rtl } | ||
| 105 | |||
| 106 | #main-window[sizemode=\"fullscreen\"] #sidebar-box{ --uc-sidebar-width: 1px; } | ||
| 107 | |||
| 108 | #sidebar-splitter{ display: none } | ||
| 109 | |||
| 110 | #sidebar-header{ | ||
| 111 | overflow: hidden; | ||
| 112 | color: var(--chrome-color, inherit) !important; | ||
| 113 | padding-inline: 0 !important; | ||
| 114 | } | ||
| 115 | |||
| 116 | #sidebar-header::before, | ||
| 117 | #sidebar-header::after{ | ||
| 118 | content: \"\"; | ||
| 119 | display: flex; | ||
| 120 | padding-left: 8px; | ||
| 121 | } | ||
| 122 | |||
| 123 | #sidebar-header, | ||
| 124 | #sidebar{ | ||
| 125 | transition: min-width var(--uc-autohide-transition-duration) var(--uc-autohide-transition-type) var(--uc-autohide-sidebar-delay) !important; | ||
| 126 | min-width: var(--uc-sidebar-width) !important; | ||
| 127 | will-change: min-width; | ||
| 128 | } | ||
| 129 | #sidebar-box:hover > #sidebar-header, | ||
| 130 | #sidebar-box:hover > #sidebar{ | ||
| 131 | min-width: var(--uc-sidebar-hover-width) !important; | ||
| 132 | transition-delay: 0ms !important; | ||
| 133 | } | ||
| 134 | |||
| 135 | .sidebar-panel{ | ||
| 136 | background-color: transparent !important; | ||
| 137 | color: var(--newtab-text-primary-color) !important; | ||
| 138 | } | ||
| 139 | |||
| 140 | .sidebar-panel #search-box{ | ||
| 141 | -moz-appearance: none !important; | ||
| 142 | background-color: rgba(249,249,250,0.1) !important; | ||
| 143 | color: inherit !important; | ||
| 144 | } | ||
| 145 | |||
| 146 | /* Add sidebar divider and give it background */ | ||
| 147 | |||
| 148 | #sidebar, | ||
| 149 | #sidebar-header{ | ||
| 150 | background-color: inherit !important; | ||
| 151 | border-inline: 1px solid rgb(80,80,80); | ||
| 152 | border-inline-width: 0px 1px; | ||
| 153 | } | ||
| 154 | |||
| 155 | #sidebar-box:not([positionend]) > :-moz-locale-dir(rtl), | ||
| 156 | #sidebar-box[positionend] > *{ | ||
| 157 | border-inline-width: 1px 0px; | ||
| 158 | } | ||
| 159 | |||
| 160 | /* Move statuspanel to the other side when sidebar is hovered so it doesn't get covered by sidebar */ | ||
| 161 | |||
| 162 | #sidebar-box:not([positionend]):hover ~ #appcontent #statuspanel{ | ||
| 163 | inset-inline: auto 0px !important; | ||
| 164 | } | ||
| 165 | #sidebar-box:not([positionend]):hover ~ #appcontent #statuspanel-label{ | ||
| 166 | margin-inline: 0px !important; | ||
| 167 | border-left-style: solid !important; | ||
| 168 | } | ||
| 169 | |||
| 170 | /* Remove the tabs label and move the Sidebary icon to the center of the box */ | ||
| 171 | #sidebar-box:hover [id=\"sidebar-icon\"] { | ||
| 172 | transform: translateX(0px) !important; | ||
| 173 | transition-delay: 0ms !important; | ||
| 174 | } | ||
| 175 | |||
| 176 | #sidebar-box [id=\"sidebar-icon\"] { | ||
| 177 | transform: translateX(9px); | ||
| 178 | transition: transform var(--uc-autohide-transition-duration) var(--uc-autohide-transition-type) var(--uc-autohide-sidebar-delay) !important; | ||
| 179 | } | ||
| 180 | |||
| 181 | #sidebar-box [id=\"sidebar-title\"] { | ||
| 182 | visibility: hidden !important; | ||
| 183 | transition: visibility var(--uc-autohide-transition-duration) var(--uc-autohide-transition-type) var(--uc-autohide-sidebar-delay) !important; | ||
| 184 | } | ||
| 185 | |||
| 186 | #sidebar-box:hover [id=\"sidebar-title\"] { | ||
| 187 | visibility: visible !important; | ||
| 188 | transition-delay: 0ms !important; | ||
| 189 | } | ||
| 190 | "; | ||
| 191 | }; | ||
| 192 | }; | ||
| 193 | } | ||
diff --git a/users/ryan/linux/firefox-nightly/policies.nix b/users/ryan/linux/firefox-nightly/policies.nix new file mode 100644 index 0000000..136b8b9 --- /dev/null +++ b/users/ryan/linux/firefox-nightly/policies.nix | |||
| @@ -0,0 +1,130 @@ | |||
| 1 | let | ||
| 2 | lock-false = { | ||
| 3 | Value = false; | ||
| 4 | Status = "locked"; | ||
| 5 | }; | ||
| 6 | lock-true = { | ||
| 7 | Value = true; | ||
| 8 | Status = "locked"; | ||
| 9 | }; | ||
| 10 | in | ||
| 11 | { | ||
| 12 | |||
| 13 | EnableTrackingProtection = { | ||
| 14 | Value = true; | ||
| 15 | Locked = true; | ||
| 16 | Cryptomining = true; | ||
| 17 | Fingerprinting = true; | ||
| 18 | EmailTracking = true; | ||
| 19 | }; | ||
| 20 | UserMessaging = { | ||
| 21 | WhatsNew = false; | ||
| 22 | ExtensionRecommendations = false; | ||
| 23 | FeatureRecommendations = false; | ||
| 24 | UrlbarInterventions = false; | ||
| 25 | SkipOnboarding = true; | ||
| 26 | MoreFromMozilla = false; | ||
| 27 | Labs = false; | ||
| 28 | Locked = true; | ||
| 29 | }; | ||
| 30 | DisableAppUpdate = true; | ||
| 31 | DisableAccounts = true; | ||
| 32 | DisableFirefoxAccounts = true; | ||
| 33 | DisableFirefoxStudies = true; | ||
| 34 | DisablePocket = true; | ||
| 35 | DisableTelemetry = true; | ||
| 36 | AutofillAddressEnabled = false; | ||
| 37 | AutofillCreditCardEnabled = false; | ||
| 38 | DisableMasterPasswordCreation = true; | ||
| 39 | PasswordManagerEnabled = false; | ||
| 40 | PrimaryPassword = false; | ||
| 41 | OfferToSaveLogins = false; | ||
| 42 | NoDefaultBookmarks = true; | ||
| 43 | OverrideFirstRunPage = ""; | ||
| 44 | OverridePostUpdatePage = ""; | ||
| 45 | FirefoxHome = { | ||
| 46 | Search = true; | ||
| 47 | TopSites = true; | ||
| 48 | SponsoredTopSites = false; | ||
| 49 | Highlights = false; | ||
| 50 | Pocket = false; | ||
| 51 | SponsoredPocket = false; | ||
| 52 | Snippets = false; | ||
| 53 | Locked = true; | ||
| 54 | }; | ||
| 55 | SearchSuggestEnabled = true; | ||
| 56 | FirefoxSuggest = { | ||
| 57 | WebSuggestions = true; | ||
| 58 | SponsoredSuggestions = false; | ||
| 59 | ImproveSuggest = false; | ||
| 60 | Locked = true; | ||
| 61 | }; | ||
| 62 | PictureInPicture = lock-true; | ||
| 63 | HardwareAcceleration = true; | ||
| 64 | Certificates = { | ||
| 65 | ImportEnterpriseRoots = true; | ||
| 66 | }; | ||
| 67 | ExtensionSettings = { | ||
| 68 | #"*".installation_mode = "blocked"; | ||
| 69 | # uBlock Origin | ||
| 70 | "uBlock0@raymondhill.net" = { | ||
| 71 | install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"; | ||
| 72 | installation_mode = "force_installed"; | ||
| 73 | }; | ||
| 74 | # Bitwarden | ||
| 75 | "{446900e4-71c2-419f-a6a7-df9c091e268b}" = { | ||
| 76 | install_url = "https://addons.mozilla.org/firefox/downloads/latest/bitwarden-password-manager/latest.xpi"; | ||
| 77 | installation_mode = "normal_installed"; | ||
| 78 | }; | ||
| 79 | # SponsorBlock | ||
| 80 | "sponsorBlocker@ajay.app" = { | ||
| 81 | install_url = "https://addons.mozilla.org/firefox/downloads/latest/sponsorblock/latest.xpi"; | ||
| 82 | installation_mode = "force_installed"; | ||
| 83 | }; | ||
| 84 | # DeArrow | ||
| 85 | "deArrow@ajay.app" = { | ||
| 86 | install_url = "https://addons.mozilla.org/firefox/downloads/latest/dearrow/latest.xpi"; | ||
| 87 | installation_mode = "force_installed"; | ||
| 88 | }; | ||
| 89 | # Return Youtube Dislike | ||
| 90 | "{762f9885-5a13-4abd-9c77-433dcd38b8fd}" = { | ||
| 91 | install_url = "https://addons.mozilla.org/firefox/downloads/latest/return-youtube-dislikes/latest.xpi"; | ||
| 92 | installation_mode = "force_installed"; | ||
| 93 | }; | ||
| 94 | # Youtube Nonstop | ||
| 95 | "{0d7cafdd-501c-49ca-8ebb-e3341caaa55e}" = { | ||
| 96 | install_url = "https://addons.mozilla.org/firefox/downloads/latest/youtube-nonstop/latest.xpi"; | ||
| 97 | installation_mode = "force_installed"; | ||
| 98 | }; | ||
| 99 | # Sidebery | ||
| 100 | "{3c078156-979c-498b-8990-85f7987dd929}" = { | ||
| 101 | install_url = "https://addons.mozilla.org/firefox/downloads/latest/sidebery/latest.xpi"; | ||
| 102 | installation_mode = "normal_installed"; | ||
| 103 | }; | ||
| 104 | # TamperMonkey | ||
| 105 | "firefox@tampermonkey.net" = { | ||
| 106 | install_url = "https://addons.mozilla.org/firefox/downloads/latest/tampermonkey/latest.xpi"; | ||
| 107 | installation_mode = "force_installed"; | ||
| 108 | }; | ||
| 109 | # Floccus | ||
| 110 | "floccus@handmadeideas.org" = { | ||
| 111 | install_url = "https://addons.mozilla.org/firefox/downloads/latest/floccus/latest.xpi"; | ||
| 112 | installation_mode = "force_installed"; | ||
| 113 | }; | ||
| 114 | }; | ||
| 115 | Preferences = { | ||
| 116 | "browser.startup.homepage" = "https://d.in.rschanz.org"; | ||
| 117 | "extensions.activeThemeID" = { | ||
| 118 | Value = "firefox-compact-dark@mozilla.org"; | ||
| 119 | Status = "locked"; | ||
| 120 | }; | ||
| 121 | "toolkit.legacyUserProfileCustomizations.stylesheets" = lock-true; | ||
| 122 | "xpinstall.whitelist.required" = lock-true; | ||
| 123 | "dom.webgpu.enabled" = lock-true; | ||
| 124 | "media.eme.enabled" = lock-true; | ||
| 125 | "general.autoScroll" = lock-true; | ||
| 126 | "general.smoothScroll" = lock-true; | ||
| 127 | "browser.crashReports.unsubmittedCheck.autoSubmit2" = lock-false; | ||
| 128 | "browser.aboutConfig.showWarning" = lock-false; | ||
| 129 | }; | ||
| 130 | } | ||
diff --git a/users/ryan/linux/foot/foot.ini b/users/ryan/linux/foot/foot.ini new file mode 100644 index 0000000..50cb3fa --- /dev/null +++ b/users/ryan/linux/foot/foot.ini | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | font=Lilex Nerd Font Mono:size=14,FiraCode Nerd Font Mono:size=14 | ||
| 2 | |||
| 3 | [desktop-notifications] | ||
| 4 | command=notify-send -a ${app-id} -i ${app-id} ${title} ${body} | ||
| 5 | |||
| 6 | [colors-dark] | ||
| 7 | alpha=0.75 | ||
diff --git a/users/ryan/linux/hypr/family_guy.mp4 b/users/ryan/linux/hypr/family_guy.mp4 new file mode 100644 index 0000000..077fe49 --- /dev/null +++ b/users/ryan/linux/hypr/family_guy.mp4 | |||
| Binary files differ | |||
diff --git a/users/ryan/linux/hypr/hypridle.conf b/users/ryan/linux/hypr/hypridle.conf new file mode 100644 index 0000000..72688da --- /dev/null +++ b/users/ryan/linux/hypr/hypridle.conf | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | general { | ||
| 2 | lock_cmd = pidof hyprlock || hyprlock | ||
| 3 | before_sleep_cmd = loginctl lock-session | ||
| 4 | after_sleep_cmd = hyprctl dispatch dpms on | ||
| 5 | } | ||
| 6 | |||
| 7 | listener { | ||
| 8 | timeout = 300 | ||
| 9 | on-timeout = loginctl lock-session | ||
| 10 | } | ||
| 11 | |||
| 12 | listener { | ||
| 13 | timeout = 600 | ||
| 14 | on-timeout = hyprctl dispatch dpms off | ||
| 15 | on-resume = hyprctl dispatch dpms on | ||
| 16 | } | ||
diff --git a/users/ryan/linux/hypr/hyprland.conf b/users/ryan/linux/hypr/hyprland.conf new file mode 100644 index 0000000..e51b54c --- /dev/null +++ b/users/ryan/linux/hypr/hyprland.conf | |||
| @@ -0,0 +1,336 @@ | |||
| 1 | exec-once = dbus-update-activation-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP=Hyprland | ||
| 2 | |||
| 3 | # | ||
| 4 | # Please note not all available settings / options are set here. | ||
| 5 | # For a full list, see the wiki | ||
| 6 | # | ||
| 7 | |||
| 8 | # See https://wiki.hyprland.org/Configuring/Monitors/ | ||
| 9 | monitor=,preferred,auto,1 | ||
| 10 | |||
| 11 | # Cursor theme is set via home.pointerCursor in linux.nix (pkgs.bibata-cursors, | ||
| 12 | # theme "Bibata-Modern-Classic"). The old vendored theme used | ||
| 13 | # hyprcursor/daed9-versioned names that only existed in the manually-packaged | ||
| 14 | # asset; nixpkgs' build uses the plain name below for both HYPRCURSOR_THEME | ||
| 15 | # and XCURSOR_THEME. | ||
| 16 | env = HYPRCURSOR_THEME,Bibata-Modern-Classic | ||
| 17 | env = HYPRCURSOR_SIZE,24 | ||
| 18 | env = XCURSOR_THEME,Bibata-Modern-Classic | ||
| 19 | env = XCURSOR_SIZE,24 | ||
| 20 | |||
| 21 | env = AQ_NO_MODIFIERS,1 | ||
| 22 | |||
| 23 | render { | ||
| 24 | expand_undersized_textures = false | ||
| 25 | } | ||
| 26 | |||
| 27 | ecosystem { | ||
| 28 | no_update_news = true | ||
| 29 | } | ||
| 30 | |||
| 31 | |||
| 32 | # See https://wiki.hyprland.org/Configuring/Keywords/ for more | ||
| 33 | |||
| 34 | # Execute your favorite apps at launch | ||
| 35 | # exec-once = waybar & hyprpaper & firefox | ||
| 36 | |||
| 37 | # Source a file (multi-file configs) | ||
| 38 | source = ~/.config/hypr/monitors.conf | ||
| 39 | |||
| 40 | # Some default env vars. | ||
| 41 | env = XCURSOR_SIZE,24 | ||
| 42 | |||
| 43 | debug { | ||
| 44 | disable_logs = false | ||
| 45 | enable_stdout_logs = true | ||
| 46 | } | ||
| 47 | |||
| 48 | # For all categories, see https://wiki.hyprland.org/Configuring/Variables/ | ||
| 49 | input { | ||
| 50 | kb_layout = us | ||
| 51 | kb_variant = | ||
| 52 | kb_model = | ||
| 53 | kb_options = | ||
| 54 | kb_rules = | ||
| 55 | numlock_by_default = true | ||
| 56 | |||
| 57 | follow_mouse = 1 | ||
| 58 | |||
| 59 | touchpad { | ||
| 60 | natural_scroll = no | ||
| 61 | middle_button_emulation = true | ||
| 62 | clickfinger_behavior = true | ||
| 63 | } | ||
| 64 | |||
| 65 | sensitivity = 0 # -1.0 - 1.0, 0 means no modification. | ||
| 66 | } | ||
| 67 | |||
| 68 | general { | ||
| 69 | # See https://wiki.hyprland.org/Configuring/Variables/ for more | ||
| 70 | |||
| 71 | gaps_in = 5 | ||
| 72 | gaps_out = 10 | ||
| 73 | border_size = 2 | ||
| 74 | col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg | ||
| 75 | col.inactive_border = rgba(595959aa) | ||
| 76 | |||
| 77 | layout = dwindle | ||
| 78 | } | ||
| 79 | |||
| 80 | decoration { | ||
| 81 | # See https://wiki.hyprland.org/Configuring/Variables/ for more | ||
| 82 | |||
| 83 | rounding = 5 | ||
| 84 | blur { | ||
| 85 | enabled = yes | ||
| 86 | size = 3 | ||
| 87 | passes = 1 | ||
| 88 | new_optimizations = on | ||
| 89 | } | ||
| 90 | |||
| 91 | shadow { | ||
| 92 | enabled = true | ||
| 93 | range = 4 | ||
| 94 | render_power = 3 | ||
| 95 | color = rgba(1a1a1aee) | ||
| 96 | } | ||
| 97 | } | ||
| 98 | |||
| 99 | animations { | ||
| 100 | enabled = yes | ||
| 101 | |||
| 102 | # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more | ||
| 103 | |||
| 104 | bezier = myBezier, 0.05, 0.9, 0.1, 1.05 | ||
| 105 | |||
| 106 | animation = windows, 1, 7, myBezier | ||
| 107 | animation = windowsOut, 1, 7, default, popin 80% | ||
| 108 | animation = border, 1, 10, default | ||
| 109 | animation = borderangle, 1, 8, default | ||
| 110 | animation = fade, 1, 7, default | ||
| 111 | animation = workspaces, 1, 6, default | ||
| 112 | } | ||
| 113 | |||
| 114 | dwindle { | ||
| 115 | # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more | ||
| 116 | pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below | ||
| 117 | preserve_split = yes # you probably want this | ||
| 118 | } | ||
| 119 | |||
| 120 | #master { | ||
| 121 | # # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more | ||
| 122 | # new_is_master = true | ||
| 123 | #} | ||
| 124 | |||
| 125 | # Example per-device config | ||
| 126 | # See https://wiki.hyprland.org/Configuring/Keywords/#executing for more | ||
| 127 | device { | ||
| 128 | name = epic-mouse-v1 | ||
| 129 | sensitivity = -0.5 | ||
| 130 | } | ||
| 131 | |||
| 132 | # Example windowrule v1 | ||
| 133 | # windowrule = float, ^(kitty)$ | ||
| 134 | # Example windowrule v2 | ||
| 135 | # windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ | ||
| 136 | # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more | ||
| 137 | |||
| 138 | |||
| 139 | # See https://wiki.hyprland.org/Configuring/Keywords/ for more | ||
| 140 | $mainMod = SUPER | ||
| 141 | |||
| 142 | # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more | ||
| 143 | bind = $mainMod, Return, exec, foot | ||
| 144 | bind = $mainMod CTRL, Return, exec, foot -a float-foot | ||
| 145 | bind = $mainMod SHIFT, Q, killactive | ||
| 146 | bind = $mainMod SHIFT, E, exit | ||
| 147 | bind = $mainMod SHIFT, Space, togglefloating | ||
| 148 | bind = $mainMod SHIFT, Return, pin, active | ||
| 149 | bind = $mainMod, D, exec, fuzzel --width=35 --font='Hack:weight=bold:size=12' --background-color='282a36fa' --selection-color='3d4460fa' --line-height=20 --border-radius=20 | ||
| 150 | bind = $mainMod, P, pseudo, # dwindle | ||
| 151 | bind = $mainMod, J, togglesplit, # dwindle | ||
| 152 | bind = $mainMod, F, fullscreen, 1 | ||
| 153 | bind = $mainMod SHIFT, F, fullscreen | ||
| 154 | bind = ,XF86MonBrightnessUp, exec, light -A 10 | ||
| 155 | bind = ,XF86MonBrightnessDown, exec, light -U 10 | ||
| 156 | bind = ,XF86AudioRaiseVolume, exec, pamixer -i 5 | ||
| 157 | bind = ,XF86AudioLowerVolume, exec, pamixer -d 5 | ||
| 158 | bind = ,XF86AudioMute, exec, pamixer -t | ||
| 159 | bind = ,XF86AudioPlay, exec, playerctl play-pause | ||
| 160 | bind = ,XF86AudioPause, exec, playerctl play-pause | ||
| 161 | bind = ,XF86AudioNext, exec, playerctl next | ||
| 162 | bind = ,XF86AudioPrev, exec, playerctl previous | ||
| 163 | bind = ,XF86AudioStop, exec, playerctl stop | ||
| 164 | |||
| 165 | # "Auto-connect headphones" | ||
| 166 | bind = $mainMod, H, exec, bluetoothctl connect AC:80:0A:1C:D6:C7 | ||
| 167 | |||
| 168 | # Move workspace between monitors | ||
| 169 | bind = $mainMod CTRL SHIFT, left, movecurrentworkspacetomonitor, l | ||
| 170 | bind = $mainMod CTRL SHIFT, right, movecurrentworkspacetomonitor, r | ||
| 171 | bind = $mainMod CTRL SHIFT, up, movecurrentworkspacetomonitor, u | ||
| 172 | bind = $mainMod CTRL SHIFT, down, movecurrentworkspacetomonitor, d | ||
| 173 | |||
| 174 | # Move focus with mainMod + arrow keys | ||
| 175 | bind = $mainMod, left, movefocus, l | ||
| 176 | bind = $mainMod, right, movefocus, r | ||
| 177 | bind = $mainMod, up, movefocus, u | ||
| 178 | bind = $mainMod, down, movefocus, d | ||
| 179 | |||
| 180 | # Move window with mainMod + SHIFT + arrow keys | ||
| 181 | bind = $mainMod SHIFT, left, movewindow, l | ||
| 182 | bind = $mainMod SHIFT, right, movewindow, r | ||
| 183 | bind = $mainMod SHIFT, up, movewindow, u | ||
| 184 | bind = $mainMod SHIFT, down, movewindow, d | ||
| 185 | |||
| 186 | # Switch workspaces with mainMod + [0-9] | ||
| 187 | bind = $mainMod, 1, workspace, 1 | ||
| 188 | bind = $mainMod, 2, workspace, 2 | ||
| 189 | bind = $mainMod, 3, workspace, 3 | ||
| 190 | bind = $mainMod, 4, workspace, 4 | ||
| 191 | bind = $mainMod, 5, workspace, 5 | ||
| 192 | bind = $mainMod, 6, workspace, 6 | ||
| 193 | bind = $mainMod, 7, workspace, 7 | ||
| 194 | bind = $mainMod, 8, workspace, 8 | ||
| 195 | bind = $mainMod, 9, workspace, 9 | ||
| 196 | bind = $mainMod, 0, workspace, 10 | ||
| 197 | |||
| 198 | # Move active window to a workspace with mainMod + SHIFT + [0-9] | ||
| 199 | bind = $mainMod SHIFT, 1, movetoworkspace, 1 | ||
| 200 | bind = $mainMod SHIFT, 2, movetoworkspace, 2 | ||
| 201 | bind = $mainMod SHIFT, 3, movetoworkspace, 3 | ||
| 202 | bind = $mainMod SHIFT, 4, movetoworkspace, 4 | ||
| 203 | bind = $mainMod SHIFT, 5, movetoworkspace, 5 | ||
| 204 | bind = $mainMod SHIFT, 6, movetoworkspace, 6 | ||
| 205 | bind = $mainMod SHIFT, 7, movetoworkspace, 7 | ||
| 206 | bind = $mainMod SHIFT, 8, movetoworkspace, 8 | ||
| 207 | bind = $mainMod SHIFT, 9, movetoworkspace, 9 | ||
| 208 | bind = $mainMod SHIFT, 0, movetoworkspace, 10 | ||
| 209 | |||
| 210 | # Scroll through existing workspaces with mainMod + scroll | ||
| 211 | bind = $mainMod, mouse_down, workspace, e+1 | ||
| 212 | bind = $mainMod, mouse_up, workspace, e-1 | ||
| 213 | |||
| 214 | # Move/resize windows with mainMod + LMB/RMB and dragging | ||
| 215 | bindm = $mainMod, mouse:272, movewindow | ||
| 216 | bindm = $mainMod, mouse:273, resizewindow | ||
| 217 | |||
| 218 | # Bind mainMod + L to screenlocker | ||
| 219 | bind = $mainMod, L, exec, hyprlock | ||
| 220 | bind = $mainMod SHIFT, L, exec, loginctl suspend | ||
| 221 | |||
| 222 | # Keybind to toggle "performance mode" (toggles GPU intensive things) | ||
| 223 | bind = $mainMod, F1, exec, ~/.config/hypr/scripts/perf_mode.sh | ||
| 224 | |||
| 225 | bind = $mainMod SHIFT, Z, exec, pypr zoom | ||
| 226 | |||
| 227 | # Keybind for screenshot (satty) | ||
| 228 | bind = $mainMod SHIFT, S, exec, grimblast save output - | satty --fullscreen --copy-command 'wl-copy' --filename - | ||
| 229 | bind = $mainMod, S, exec, grimblast copy area | ||
| 230 | bind = $mainMod, Print, exec, export TEMP=$(mktemp) && grimblast copy area && wl-paste > $TEMP && imv $TEMP && rm $TEMP | ||
| 231 | |||
| 232 | # Keybind for screenshot (old) | ||
| 233 | # bind = $mainMod SHIFT, S, exec, grimblast copy area | ||
| 234 | # bind = $mainMod SHIFT, Print, exec, grimblast edit area | ||
| 235 | # bind = $mainMod, S, exec, imv <(grimblast save area -) | ||
| 236 | |||
| 237 | # Keybind for screenshot (flameshot) | ||
| 238 | #bind = $mainMod SHIFT, S, exec, flameshot gui --raw | wl-copy | ||
| 239 | #bind = $mainMod SHIFT CTRL, S, exec, flameshot gui --raw -d $(( 1000 * $(fuzzel -l0 --dmenu -p"Delay> ") )) | wl-copy | ||
| 240 | #bind = $mainMod, S, exec, flameshot gui | ||
| 241 | |||
| 242 | # Notifications keybinds | ||
| 243 | bind = $mainMod, N, exec, makoctl dismiss | ||
| 244 | bind = $mainMod SHIFT, N, exec, makoctl dismiss -a | ||
| 245 | |||
| 246 | # Color picker | ||
| 247 | bind = $mainMod SHIFT, C, exec, hyprpicker -a | ||
| 248 | |||
| 249 | # LinkedIn Joke (very serious) | ||
| 250 | bind = $mainMod SHIFT CTRL ALT, L, exec, xdg-open https://linkedin.com | ||
| 251 | |||
| 252 | # Window Rules | ||
| 253 | |||
| 254 | # Firefox PiP | ||
| 255 | windowrulev2 = float, class:^(zen-beta)$, title:^(Picture-in-Picture)$ | ||
| 256 | windowrulev2 = pin, class:^(zen-beta)$, title:^(Picture-in-Picture)$ | ||
| 257 | windowrulev2 = size 22% 22%, class:^(zen-beta)$, title:^(Picture-in-Picture)$ | ||
| 258 | windowrulev2 = move 76% 8%, class:^(zen-beta)$, title:^(Picture-in-Picture)$ | ||
| 259 | |||
| 260 | # Firefox Sharing Indicator | ||
| 261 | windowrulev2 = float, class:^(firefox)$, title:^(Firefox — Sharing Indicator)$ | ||
| 262 | windowrulev2 = size 56 31, class:^(firefox)$, title:^(Firefox — Sharing Indicator)$ | ||
| 263 | windowrulev2 = move 50% 0, class:^(firefox)$, title:^(Firefox — Sharing Indicator)$ | ||
| 264 | windowrulev2 = suppressevent fullscreen maximize, class:^(firefox)$, title:^(Firefox — Sharing Indicator)$ | ||
| 265 | |||
| 266 | # Weather | ||
| 267 | windowrulev2 = float,class:^(ala-wttr)$ | ||
| 268 | windowrulev2 = size 822 1026, class:^(ala-wttr)$ | ||
| 269 | |||
| 270 | # Floating terminal | ||
| 271 | windowrulev2 = float,class:^(float-foot)$ | ||
| 272 | windowrulev2 = size 930 680,class:^(float-foot)$ | ||
| 273 | windowrulev2 = center,class:^(float-foot)$ | ||
| 274 | |||
| 275 | # Change color of pinned windows | ||
| 276 | windowrulev2 = bordercolor rgba(bf0000ee) rgba(ab00adee) 45deg,pinned:1 | ||
| 277 | |||
| 278 | # Fun Keybinds | ||
| 279 | # Subway surfer | ||
| 280 | bind = $mainMod CTRL SHIFT, S, exec, mpv ~/.config/hypr/subwaysurfer.webm | ||
| 281 | windowrulev2 = float,class:^(mpv)$, title:^(subwaysurfer.webm - mpv)$ | ||
| 282 | windowrulev2 = size 310 554,class:^(mpv)$, title:^(subwaysurfer.webm - mpv)$ | ||
| 283 | windowrulev2 = move 81% 46% ,class:^(mpv)$, title:^(subwaysurfer.webm - mpv)$ | ||
| 284 | windowrulev2 = pin,class:^(mpv)$, title:^(subwaysurfer.webm - mpv)$ | ||
| 285 | |||
| 286 | # Family guy funny moments | ||
| 287 | bind = $mainMod CTRL SHIFT, F, exec, mpv ~/.config/hypr/family_guy.mp4 | ||
| 288 | windowrulev2 = float,class:^(mpv)$, title:^(family_guy.mp4 - mpv)$ | ||
| 289 | windowrulev2 = size 595 336,class:^(mpv)$, title:^(family_guy.mp4 - mpv)$ | ||
| 290 | windowrulev2 = move 67% 5% ,class:^(mpv)$, title:^(family_guy.mp4 - mpv)$ | ||
| 291 | windowrulev2 = pin,class:^(mpv)$, title:^(family_guy.mp4 - mpv)$ | ||
| 292 | |||
| 293 | # Satty windowrules | ||
| 294 | windowrulev2 = fullscreen,class:^(com.gabm.satty)$ | ||
| 295 | |||
| 296 | exec-once = ~/.config/hypr/scripts/autostart.sh | ||
| 297 | |||
| 298 | misc { | ||
| 299 | disable_hyprland_logo = true | ||
| 300 | force_default_wallpaper = 0 | ||
| 301 | } | ||
| 302 | |||
| 303 | # Cursors! | ||
| 304 | plugin:dynamic-cursors { | ||
| 305 | enabled = true | ||
| 306 | mode = tilt | ||
| 307 | threshold = 2 | ||
| 308 | tilt { | ||
| 309 | limit = 5000 | ||
| 310 | function = negative_quadratic | ||
| 311 | } | ||
| 312 | |||
| 313 | shake { | ||
| 314 | enabled = true | ||
| 315 | nearest = true | ||
| 316 | threshold = 6.0 | ||
| 317 | base = 4.0 | ||
| 318 | speed = 4.0 | ||
| 319 | influence = 0.0 | ||
| 320 | |||
| 321 | limit = 0.0 | ||
| 322 | |||
| 323 | timeout = 2000 | ||
| 324 | |||
| 325 | effects = true | ||
| 326 | |||
| 327 | ipc = false | ||
| 328 | } | ||
| 329 | |||
| 330 | hyprcursor { | ||
| 331 | nearest = true | ||
| 332 | enabled = true | ||
| 333 | resolution = -1 | ||
| 334 | fallback = clientside | ||
| 335 | } | ||
| 336 | } | ||
diff --git a/users/ryan/linux/hypr/hyprlock.conf b/users/ryan/linux/hypr/hyprlock.conf new file mode 100644 index 0000000..5c63fad --- /dev/null +++ b/users/ryan/linux/hypr/hyprlock.conf | |||
| @@ -0,0 +1,57 @@ | |||
| 1 | background { | ||
| 2 | monitor = | ||
| 3 | #path = /home/ryan/.config/hypr/Wallpapers/static/autumn1.png | ||
| 4 | path = screenshot | ||
| 5 | |||
| 6 | # all these options are taken from hyprland, see https://wiki.hyprland.org/Configuring/Variables/#blur for explanations | ||
| 7 | blur_passes = 2 # 0 disables blurring | ||
| 8 | blur_size = 7 | ||
| 9 | noise = 0.2 | ||
| 10 | contrast = 0.8916 | ||
| 11 | brightness = 0.8172 | ||
| 12 | vibrancy = 0.1696 | ||
| 13 | vibrancy_darkness = 0.0 | ||
| 14 | } | ||
| 15 | |||
| 16 | input-field { | ||
| 17 | monitor = | ||
| 18 | size = 200, 50 | ||
| 19 | outline_thickness = 3 | ||
| 20 | dots_size = 0.33 # Scale of input-field height, 0.2 - 0.8 | ||
| 21 | dots_spacing = 0.15 # Scale of dots' absolute size, 0.0 - 1.0 | ||
| 22 | dots_center = false | ||
| 23 | dots_rounding = -1 # -1 default circle, -2 follow input-field rounding | ||
| 24 | outer_color = rgb(151515) | ||
| 25 | inner_color = rgb(200, 200, 200) | ||
| 26 | font_color = rgb(10, 10, 10) | ||
| 27 | fade_on_empty = true | ||
| 28 | fade_timeout = 1000 # Milliseconds before fade_on_empty is triggered. | ||
| 29 | placeholder_text = <i>Input Password...</i> # Text rendered in the input box when it's empty. | ||
| 30 | hide_input = false | ||
| 31 | rounding = -1 # -1 means complete rounding (circle/oval) | ||
| 32 | check_color = rgb(204, 136, 34) | ||
| 33 | fail_color = rgb(204, 34, 34) # if authentication failed, changes outer_color and fail message color | ||
| 34 | fail_text = <i>$FAIL <b>($ATTEMPTS)</b></i> # can be set to empty | ||
| 35 | fail_timeout = 2000 # milliseconds before fail_text and fail_color disappears | ||
| 36 | fail_transition = 300 # transition time in ms between normal outer_color and fail_color | ||
| 37 | capslock_color = -1 | ||
| 38 | numlock_color = -1 | ||
| 39 | bothlock_color = -1 # when both locks are active. -1 means don't change outer color (same for above) | ||
| 40 | invert_numlock = false # change color if numlock is off | ||
| 41 | swap_font_color = false # see below | ||
| 42 | |||
| 43 | position = 0, -20 | ||
| 44 | halign = center | ||
| 45 | valign = center | ||
| 46 | } | ||
| 47 | |||
| 48 | label { | ||
| 49 | monitor = | ||
| 50 | text = cmd[update:1000] echo "$(date +"%-H:%M:%S")" | ||
| 51 | #color = rgba(255, 255, 255, 0.6) | ||
| 52 | font_size = 80 | ||
| 53 | position = 0, 300 | ||
| 54 | halign = center | ||
| 55 | valign = center | ||
| 56 | font_family = Lilex Nerd Font | ||
| 57 | } | ||
diff --git a/users/ryan/linux/hypr/kanshi.conf b/users/ryan/linux/hypr/kanshi.conf new file mode 100644 index 0000000..52c3c0f --- /dev/null +++ b/users/ryan/linux/hypr/kanshi.conf | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | profile { | ||
| 2 | output "AU Optronics 0x103D Unknown" enable | ||
| 3 | } | ||
| 4 | |||
| 5 | profile emilydesk { | ||
| 6 | output "AU Optronics 0x103D Unknown" disable | ||
| 7 | output "Dell Inc. DELL U2422H JN4SF83" position 0,0 mode 1920x1080 | ||
| 8 | output "Dell Inc. DELL U2414H R9F1P5C59WDL" position 1920,0 mode 1920x1080 | ||
| 9 | output "Dell Inc. DELL U2422H 5S9SF83" position 3840,0 mode 1920x1080 | ||
| 10 | } | ||
| 11 | |||
| 12 | profile justindesk { | ||
| 13 | output "AU Optronics 0x103D Unknown" position 0,0 mode 1920x1080 | ||
| 14 | output "Dell Inc. DELL U2417H XVNNT7CDC80L" position 1920,0 mode 1920x1080 | ||
| 15 | output "Dell Inc. DELL U2417H XVNNT82M978L" position 3840,0 mode 1920x1080 | ||
| 16 | } | ||
| 17 | |||
| 18 | profile homedesk { | ||
| 19 | output "AU Optronics 0x103D Unknown" disable | ||
| 20 | output "Samsung Electric Company C27F390 H1AK500000" position 0,0 mode 1920x1080 | ||
| 21 | output "Samsung Electric Company S22R35x H4TNA01683" position 1920,0 mode 1920x1080 | ||
| 22 | } | ||
diff --git a/users/ryan/linux/hypr/monitors.conf b/users/ryan/linux/hypr/monitors.conf new file mode 100644 index 0000000..7b3b503 --- /dev/null +++ b/users/ryan/linux/hypr/monitors.conf | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | monitor=eDP-1,1920x1080, 0x0, 1 | ||
| 2 | monitor=HDMI-A-1,1920x1080, 1920x0, 1 | ||
diff --git a/users/ryan/linux/hypr/pyprland.toml b/users/ryan/linux/hypr/pyprland.toml new file mode 100644 index 0000000..cd081fe --- /dev/null +++ b/users/ryan/linux/hypr/pyprland.toml | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | [pyprland] | ||
| 2 | plugins = ["magnify"] | ||
| 3 | |||
| 4 | [magnify] | ||
| 5 | factor = 2.5 | ||
diff --git a/users/ryan/linux/hypr/scripts/autostart.sh b/users/ryan/linux/hypr/scripts/autostart.sh new file mode 100755 index 0000000..706f82f --- /dev/null +++ b/users/ryan/linux/hypr/scripts/autostart.sh | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | #!/usr/bin/env bash | ||
| 2 | |||
| 3 | waybar & | ||
| 4 | |||
| 5 | mako & | ||
| 6 | |||
| 7 | #swaybg -i ~/.config/hypr/Wallpapers/above-clouds.jpg & | ||
| 8 | |||
| 9 | nice -n13 swww init & | ||
| 10 | |||
| 11 | #~/.config/hypr/wallpaper-daemon.sh & | ||
| 12 | wpaperd -d & | ||
| 13 | |||
| 14 | pypr & | ||
| 15 | |||
| 16 | #swayidle -w timeout 300 'swaylock --screenshots --clock --indicator --grace 3 --fade-in 1 --effect-blur 7x5 --effect-greyscale' timeout 600 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' before-sleep 'swaylock -f -c 000000' & | ||
| 17 | |||
| 18 | hypridle & | ||
| 19 | |||
| 20 | syncthing serve --no-browser & | ||
| 21 | |||
| 22 | # Kill any orphans of this | ||
| 23 | killall wl-clip-persist | ||
| 24 | wl-clip-persist -c regular --reconnect-tries 5 & | ||
| 25 | |||
| 26 | kanshi -c ~/.config/hypr/kanshi.conf & | ||
| 27 | |||
| 28 | # Start the portals | ||
| 29 | |||
| 30 | sleep 0.5 | ||
| 31 | killall -e xdg-desktop-portal-hyprland | ||
| 32 | killall xdg-desktop-portal-gtk | ||
| 33 | killall xdk-desktop-portal | ||
| 34 | |||
| 35 | ~/.nix-profile/libexec/xdg-desktop-portal-hyprland & | ||
| 36 | ~/.nix-profile/libexec/xdg-desktop-portal-gtk & | ||
| 37 | sleep 2 | ||
| 38 | XDG_DESKTOP_PORTAL_DIR="/home/ryan/.nix-profile/share/xdg-desktop-portal/portals" ~/.nix-profile/libexec/xdg-desktop-portal & | ||
| 39 | |||
| 40 | #flameshot & | ||
diff --git a/users/ryan/linux/hypr/scripts/perf_mode.sh b/users/ryan/linux/hypr/scripts/perf_mode.sh new file mode 100755 index 0000000..c195688 --- /dev/null +++ b/users/ryan/linux/hypr/scripts/perf_mode.sh | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | #!/usr/bin/env bash | ||
| 2 | HYPRGAMEMODE=$(hyprctl getoption animations:enabled | awk 'NR==1{print $2}') | ||
| 3 | if [ "$HYPRGAMEMODE" = 1 ] ; then | ||
| 4 | hyprctl --batch "\ | ||
| 5 | keyword animations:enabled 0;\ | ||
| 6 | keyword decoration:drop_shadow 0;\ | ||
| 7 | keyword decoration:blur:enabled 0;\ | ||
| 8 | keyword general:gaps_in 0;\ | ||
| 9 | keyword general:gaps_out 0;\ | ||
| 10 | keyword general:border_size 1;\ | ||
| 11 | keyword decoration:rounding 0" | ||
| 12 | exit | ||
| 13 | fi | ||
| 14 | hyprctl reload | ||
diff --git a/users/ryan/linux/hypr/subwaysurfer.webm b/users/ryan/linux/hypr/subwaysurfer.webm new file mode 100644 index 0000000..594e1c0 --- /dev/null +++ b/users/ryan/linux/hypr/subwaysurfer.webm | |||
| Binary files differ | |||
diff --git a/users/ryan/linux/mailvelope/gpgmejson.json b/users/ryan/linux/mailvelope/gpgmejson.json new file mode 100644 index 0000000..7ad8586 --- /dev/null +++ b/users/ryan/linux/mailvelope/gpgmejson.json | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | { | ||
| 2 | "name": "gpgmejson", | ||
| 3 | "description": "JavaScript binding for GnuPG", | ||
| 4 | "path": "/home/ryan/.local/share/mailvelope/start.sh", | ||
| 5 | "type": "stdio", | ||
| 6 | "allowed_extensions": ["jid1-AQqSMBYb0a8ADg@jetpack"] | ||
| 7 | } | ||
diff --git a/users/ryan/linux/mailvelope/start.sh b/users/ryan/linux/mailvelope/start.sh new file mode 100755 index 0000000..01b3ee2 --- /dev/null +++ b/users/ryan/linux/mailvelope/start.sh | |||
| @@ -0,0 +1,4 @@ | |||
| 1 | #!/usr/bin/env bash | ||
| 2 | |||
| 3 | # Wrap for gpgme-json so firefox can use it | ||
| 4 | exec gpgme-json $@ | ||
diff --git a/users/ryan/linux/mpv/scripts/easycrop.lua b/users/ryan/linux/mpv/scripts/easycrop.lua new file mode 100644 index 0000000..415fce5 --- /dev/null +++ b/users/ryan/linux/mpv/scripts/easycrop.lua | |||
| @@ -0,0 +1,254 @@ | |||
| 1 | local msg = require('mp.msg') | ||
| 2 | local assdraw = require('mp.assdraw') | ||
| 3 | |||
| 4 | local script_name = "easycrop" | ||
| 5 | |||
| 6 | -- Number of crop points currently chosen (0 to 2) | ||
| 7 | local points = {} | ||
| 8 | -- True if in cropping selection mode | ||
| 9 | local cropping = false | ||
| 10 | -- Original value of osc property | ||
| 11 | local osc_prop = false | ||
| 12 | |||
| 13 | -- Helper that converts two points to top-left and bottom-right | ||
| 14 | local swizzle_points = function (p1, p2) | ||
| 15 | if p1.x > p2.x then p1.x, p2.x = p2.x, p1.x end | ||
| 16 | if p1.y > p2.y then p1.y, p2.y = p2.y, p1.y end | ||
| 17 | end | ||
| 18 | |||
| 19 | local clamp = function (val, min, max) | ||
| 20 | assert(min <= max) | ||
| 21 | if val < min then return min end | ||
| 22 | if val > max then return max end | ||
| 23 | return val | ||
| 24 | end | ||
| 25 | |||
| 26 | local video_space_from_screen_space = function (ssp) | ||
| 27 | -- Video native dimensions and screen size | ||
| 28 | local vid_w = mp.get_property("width") | ||
| 29 | local vid_h = mp.get_property("height") | ||
| 30 | local osd_w = mp.get_property("osd-width") | ||
| 31 | local osd_h = mp.get_property("osd-height") | ||
| 32 | |||
| 33 | -- Factor by which the video is scaled to fit the screen | ||
| 34 | local scale = math.min(osd_w/vid_w, osd_h/vid_h) | ||
| 35 | |||
| 36 | -- Size video takes up in screen | ||
| 37 | local vid_sw, vid_sh = scale*vid_w, scale*vid_h | ||
| 38 | |||
| 39 | -- Video offset within screen | ||
| 40 | local off_x = math.floor((osd_w - vid_sw)/2) | ||
| 41 | local off_y = math.floor((osd_h - vid_sh)/2) | ||
| 42 | |||
| 43 | local vsp = {} | ||
| 44 | |||
| 45 | -- Move the point to within the video | ||
| 46 | vsp.x = clamp(ssp.x, off_x, off_x + vid_sw) | ||
| 47 | vsp.y = clamp(ssp.y, off_y, off_y + vid_sh) | ||
| 48 | |||
| 49 | -- Convert screen-space to video-space | ||
| 50 | vsp.x = math.floor((vsp.x - off_x) / scale) | ||
| 51 | vsp.y = math.floor((vsp.y - off_y) / scale) | ||
| 52 | |||
| 53 | return vsp | ||
| 54 | end | ||
| 55 | |||
| 56 | local screen_space_from_video_space = function (vsp) | ||
| 57 | -- Video native dimensions and screen size | ||
| 58 | local vid_w = mp.get_property("width") | ||
| 59 | local vid_h = mp.get_property("height") | ||
| 60 | local osd_w = mp.get_property("osd-width") | ||
| 61 | local osd_h = mp.get_property("osd-height") | ||
| 62 | |||
| 63 | -- Factor by which the video is scaled to fit the screen | ||
| 64 | local scale = math.min(osd_w/vid_w, osd_h/vid_h) | ||
| 65 | |||
| 66 | -- Size video takes up in screen | ||
| 67 | local vid_sw, vid_sh = scale*vid_w, scale*vid_h | ||
| 68 | |||
| 69 | -- Video offset within screen | ||
| 70 | local off_x = math.floor((osd_w - vid_sw)/2) | ||
| 71 | local off_y = math.floor((osd_h - vid_sh)/2) | ||
| 72 | |||
| 73 | local ssp = {} | ||
| 74 | ssp.x = vsp.x * scale + off_x | ||
| 75 | ssp.y = vsp.y * scale + off_y | ||
| 76 | return ssp | ||
| 77 | end | ||
| 78 | |||
| 79 | -- Wrapper that converts RRGGBB / RRGGBBAA to ASS format | ||
| 80 | local ass_set_color = function (idx, color) | ||
| 81 | assert(color:len() == 8 or color:len() == 6) | ||
| 82 | local ass = "" | ||
| 83 | |||
| 84 | -- Set alpha value (if present) | ||
| 85 | if color:len() == 8 then | ||
| 86 | local alpha = 0xff - tonumber(color:sub(7, 8), 16) | ||
| 87 | ass = ass .. string.format("\\%da&H%X&", idx, alpha) | ||
| 88 | end | ||
| 89 | |||
| 90 | -- Swizzle RGB to BGR and build ASS string | ||
| 91 | color = color:sub(5, 6) .. color:sub(3, 4) .. color:sub(1, 2) | ||
| 92 | return "{" .. ass .. string.format("\\%dc&H%s&", idx, color) .. "}" | ||
| 93 | end | ||
| 94 | |||
| 95 | local draw_rect = function (p1, p2) | ||
| 96 | local osd_w, osd_h = mp.get_property("osd-width"), mp.get_property("osd-height") | ||
| 97 | |||
| 98 | ass = assdraw.ass_new() | ||
| 99 | |||
| 100 | -- Draw overlay over surrounding unselected region | ||
| 101 | |||
| 102 | ass:draw_start() | ||
| 103 | ass:pos(0, 0) | ||
| 104 | |||
| 105 | ass:append(ass_set_color(1, "000000aa")) | ||
| 106 | ass:append(ass_set_color(3, "00000000")) | ||
| 107 | |||
| 108 | local l = math.min(p1.x, p2.x) | ||
| 109 | local r = math.max(p1.x, p2.x) | ||
| 110 | local u = math.min(p1.y, p2.y) | ||
| 111 | local d = math.max(p1.y, p2.y) | ||
| 112 | |||
| 113 | ass:rect_cw(0, 0, l, osd_h) | ||
| 114 | ass:rect_cw(r, 0, osd_w, osd_h) | ||
| 115 | ass:rect_cw(l, 0, r, u) | ||
| 116 | ass:rect_cw(l, d, r, osd_h) | ||
| 117 | |||
| 118 | ass:draw_stop() | ||
| 119 | |||
| 120 | -- Draw border around selected region | ||
| 121 | |||
| 122 | ass:new_event() | ||
| 123 | ass:draw_start() | ||
| 124 | ass:pos(0, 0) | ||
| 125 | |||
| 126 | ass:append(ass_set_color(1, "00000000")) | ||
| 127 | ass:append(ass_set_color(3, "000000ff")) | ||
| 128 | ass:append("{\\bord2}") | ||
| 129 | |||
| 130 | ass:rect_cw(p1.x, p1.y, p2.x, p2.y) | ||
| 131 | |||
| 132 | ass:draw_stop() | ||
| 133 | |||
| 134 | mp.set_osd_ass(osd_w, osd_h, ass.text) | ||
| 135 | end | ||
| 136 | |||
| 137 | local draw_fill = function () | ||
| 138 | local osd_w, osd_h = mp.get_property("osd-width"), mp.get_property("osd-height") | ||
| 139 | |||
| 140 | ass = assdraw.ass_new() | ||
| 141 | ass:draw_start() | ||
| 142 | ass:pos(0, 0) | ||
| 143 | |||
| 144 | ass:append(ass_set_color(1, "000000aa")) | ||
| 145 | ass:append(ass_set_color(3, "00000000")) | ||
| 146 | ass:rect_cw(0, 0, osd_w, osd_h) | ||
| 147 | |||
| 148 | ass:draw_stop() | ||
| 149 | mp.set_osd_ass(osd_w, osd_h, ass.text) | ||
| 150 | end | ||
| 151 | |||
| 152 | local draw_clear = function () | ||
| 153 | local osd_w, osd_h = mp.get_property("osd-width"), mp.get_property("osd-height") | ||
| 154 | mp.set_osd_ass(osd_w, osd_h, "") | ||
| 155 | end | ||
| 156 | |||
| 157 | local draw_cropper = function () | ||
| 158 | if #points == 1 then | ||
| 159 | local p1 = screen_space_from_video_space(points[1]) | ||
| 160 | local p2 = {} | ||
| 161 | p2.x, p2.y = mp.get_mouse_pos() | ||
| 162 | draw_rect(p1, p2) | ||
| 163 | end | ||
| 164 | end | ||
| 165 | |||
| 166 | local uncrop = function () | ||
| 167 | mp.command("no-osd vf del @" .. script_name .. ":crop") | ||
| 168 | end | ||
| 169 | |||
| 170 | local crop = function(p1, p2) | ||
| 171 | swizzle_points(p1, p2) | ||
| 172 | |||
| 173 | local w = p2.x - p1.x | ||
| 174 | local h = p2.y - p1.y | ||
| 175 | local ok, err = mp.command(string.format( | ||
| 176 | "no-osd vf add @%s:crop=%s:%s:%s:%s", script_name, w, h, p1.x, p1.y)) | ||
| 177 | |||
| 178 | if not ok then | ||
| 179 | mp.osd_message("Cropping failed") | ||
| 180 | points = {} | ||
| 181 | end | ||
| 182 | end | ||
| 183 | |||
| 184 | local easycrop_stop = function () | ||
| 185 | mp.set_property("osc", osc_prop) | ||
| 186 | cropping = false | ||
| 187 | mp.remove_key_binding("easycrop_mouse_btn0") | ||
| 188 | draw_clear() | ||
| 189 | end | ||
| 190 | |||
| 191 | local mouse_btn0_cb = function () | ||
| 192 | if not cropping then | ||
| 193 | return | ||
| 194 | end | ||
| 195 | |||
| 196 | local mx, my = mp.get_mouse_pos() | ||
| 197 | table.insert(points, video_space_from_screen_space({ x = mx, y = my })) | ||
| 198 | |||
| 199 | if #points == 2 then | ||
| 200 | crop(points[1], points[2]) | ||
| 201 | easycrop_stop() | ||
| 202 | end | ||
| 203 | end | ||
| 204 | |||
| 205 | local easycrop_start = function () | ||
| 206 | -- Cropping requires swdec or hwdec with copy-back | ||
| 207 | local hwdec = mp.get_property("hwdec-current") | ||
| 208 | if hwdec == nil then | ||
| 209 | return mp.msg.error("Cannot determine current hardware decoder mode") | ||
| 210 | end | ||
| 211 | -- Check whitelist of ok values | ||
| 212 | local valid_hwdec = { | ||
| 213 | ["no"] = true, -- software decoding | ||
| 214 | -- Taken from mpv manual | ||
| 215 | ["videotoolbox-co"] = true, | ||
| 216 | ["vaapi-copy"] = true, | ||
| 217 | ["dxva2-copy"] = true, | ||
| 218 | ["d3d11va-copy"] = true, | ||
| 219 | ["mediacodec"] = true | ||
| 220 | } | ||
| 221 | if not valid_hwdec[hwdec] then | ||
| 222 | return mp.osd_message("Cropping requires swdec or hwdec with copy-back (see mpv manual)") | ||
| 223 | end | ||
| 224 | |||
| 225 | -- Just clear the current crop and return, if there is one | ||
| 226 | if #points ~= 0 then | ||
| 227 | uncrop() | ||
| 228 | points = {} | ||
| 229 | return | ||
| 230 | end | ||
| 231 | |||
| 232 | -- Hide OSC | ||
| 233 | osc_prop = mp.get_property("osc") | ||
| 234 | mp.set_property("osc", "no") | ||
| 235 | |||
| 236 | cropping = true | ||
| 237 | mp.add_forced_key_binding("mouse_btn0", "easycrop_mouse_btn0", mouse_btn0_cb) | ||
| 238 | draw_fill() | ||
| 239 | end | ||
| 240 | |||
| 241 | local easycrop_activate = function () | ||
| 242 | if cropping then | ||
| 243 | easycrop_stop() | ||
| 244 | else | ||
| 245 | easycrop_start() | ||
| 246 | end | ||
| 247 | end | ||
| 248 | |||
| 249 | mp.add_key_binding("mouse_move", draw_cropper) | ||
| 250 | mp.observe_property("osd-width", "native", draw_cropper) | ||
| 251 | mp.observe_property("osd-height", "native", draw_cropper) | ||
| 252 | |||
| 253 | mp.add_key_binding("c", "easy_crop", easycrop_activate) | ||
| 254 | |||
diff --git a/users/ryan/linux/pulseaudio/client.conf b/users/ryan/linux/pulseaudio/client.conf new file mode 100644 index 0000000..207e152 --- /dev/null +++ b/users/ryan/linux/pulseaudio/client.conf | |||
| @@ -0,0 +1 @@ | |||
| autospawn = no | |||
diff --git a/users/ryan/linux/spotify-player/app.toml b/users/ryan/linux/spotify-player/app.toml new file mode 100644 index 0000000..4eac5e4 --- /dev/null +++ b/users/ryan/linux/spotify-player/app.toml | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | theme = "dracula" | ||
| 2 | client_id = "4b1219bdc29945bc8ca914f80a8a6a47" | ||
| 3 | client_port = 8888 | ||
| 4 | playback_format = """ | ||
| 5 | {track} • {artists} | ||
| 6 | {album} | ||
| 7 | {metadata}""" | ||
| 8 | tracks_playback_limit = 50 | ||
| 9 | app_refresh_duration_in_ms = 32 | ||
| 10 | playback_refresh_duration_in_ms = 0 | ||
| 11 | cover_image_refresh_duration_in_ms = 2000 | ||
| 12 | page_size_in_rows = 20 | ||
| 13 | play_icon = "▶" | ||
| 14 | pause_icon = "▌▌" | ||
| 15 | liked_icon = "♥" | ||
| 16 | border_type = "Plain" | ||
| 17 | progress_bar_type = "Rectangle" | ||
| 18 | playback_window_position = "Top" | ||
| 19 | cover_img_length = 9 | ||
| 20 | cover_img_width = 5 | ||
| 21 | cover_img_scale = 1.0 | ||
| 22 | playback_window_width = 6 | ||
| 23 | enable_media_control = true | ||
| 24 | enable_streaming = "DaemonOnly" | ||
| 25 | enable_cover_image_cache = true | ||
| 26 | default_device = "RyanThinkpad" | ||
| 27 | |||
| 28 | [copy_command] | ||
| 29 | command = "wlcopy" | ||
| 30 | args = [] | ||
| 31 | |||
| 32 | [notify_format] | ||
| 33 | summary = "{track} • {artists}" | ||
| 34 | body = "{album}" | ||
diff --git a/users/ryan/linux/tridactyl/native_main b/users/ryan/linux/tridactyl/native_main new file mode 100755 index 0000000..2104875 --- /dev/null +++ b/users/ryan/linux/tridactyl/native_main | |||
| Binary files differ | |||
diff --git a/users/ryan/linux/tridactyl/tridactyl.json b/users/ryan/linux/tridactyl/tridactyl.json new file mode 100644 index 0000000..0764f98 --- /dev/null +++ b/users/ryan/linux/tridactyl/tridactyl.json | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | { | ||
| 2 | "name": "tridactyl", | ||
| 3 | "description": "Tridactyl native command handler", | ||
| 4 | "path": "/home/ryan/.local/share/tridactyl/native_main", | ||
| 5 | "type": "stdio", | ||
| 6 | "allowed_extensions": [ "tridactyl.vim@cmcaine.co.uk","tridactyl.vim.betas@cmcaine.co.uk", "tridactyl.vim.betas.nonewtab@cmcaine.co.uk" ] | ||
| 7 | } | ||
diff --git a/users/ryan/linux/waybar/config b/users/ryan/linux/waybar/config new file mode 100644 index 0000000..62e6b20 --- /dev/null +++ b/users/ryan/linux/waybar/config | |||
| @@ -0,0 +1,167 @@ | |||
| 1 | { | ||
| 2 | "layer": "top", | ||
| 3 | "position": "top", | ||
| 4 | "height": 30, | ||
| 5 | |||
| 6 | "modules-left": ["hyprland/workspaces", "hyprland/submap"], | ||
| 7 | "modules-center": ["hyprland/window"], | ||
| 8 | "modules-right": ["tray", "custom/spotify", "privacy", "custom/weather", "custom/mail", "custom/storage", "backlight", "bluetooth", "pulseaudio", "network", "idle_inhibitor", "battery", "battery#num2", "clock"], | ||
| 9 | "hyprland/submap": { | ||
| 10 | "format": " {}" | ||
| 11 | }, | ||
| 12 | "hyprland/workspaces": { | ||
| 13 | "format": "{id}", | ||
| 14 | "all-outputs": false, | ||
| 15 | "disable-scroll": true | ||
| 16 | }, | ||
| 17 | "hyprland/window": { | ||
| 18 | "max-length": 80, | ||
| 19 | "tooltip": false, | ||
| 20 | "separate-outputs": true | ||
| 21 | }, | ||
| 22 | "clock": { | ||
| 23 | "format": "{:%a %d %b %H:%M}", | ||
| 24 | "tooltip": false | ||
| 25 | }, | ||
| 26 | "battery": { | ||
| 27 | "format": "{capacity}% {icon}", | ||
| 28 | "format-alt": "{time} {icon}", | ||
| 29 | "format-icons": ["", "", "", "", ""], | ||
| 30 | "format-charging": "{capacity}% ", | ||
| 31 | "interval": 30, | ||
| 32 | "states": { | ||
| 33 | "warning": 25, | ||
| 34 | "critical": 10 | ||
| 35 | }, | ||
| 36 | "tooltip": false, | ||
| 37 | "bat":"BAT0" | ||
| 38 | }, | ||
| 39 | "battery#num2": { | ||
| 40 | "format": "{capacity}% {icon}", | ||
| 41 | "format-alt": "{time} {icon}", | ||
| 42 | "format-icons": ["", "", "", "", ""], | ||
| 43 | "format-charging": "{capacity}% ", | ||
| 44 | "interval": 30, | ||
| 45 | "states": { | ||
| 46 | "warning": 25, | ||
| 47 | "critical": 10 | ||
| 48 | }, | ||
| 49 | "tooltip": false, | ||
| 50 | "bat":"BAT1" | ||
| 51 | }, | ||
| 52 | "bluetooth": { | ||
| 53 | "format": "", | ||
| 54 | "format-disabled": "", | ||
| 55 | "format-connected": "", | ||
| 56 | "format-connected-battery": " {device_battery_percentage}%", | ||
| 57 | "on-click": "foot bluetui", | ||
| 58 | "tooltip-format": "{controller_alias}\t{controller_address}\n\n{num_connections} connected", | ||
| 59 | "tooltip-format-connected": "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}", | ||
| 60 | "tooltip-format-enumerate-connected": "{device_alias}\t{device_address}", | ||
| 61 | "tooltip-format-enumerate-connected-battery": "{device_alias}\t{device_address}\t{device_battery_percentage}%" | ||
| 62 | }, | ||
| 63 | "network": { | ||
| 64 | "format-alt": "{ipaddr}/{cidr} {icon} {bandwidthTotalBytes}", | ||
| 65 | "format": "{ipaddr}/{cidr} {icon}", | ||
| 66 | "format-alt-click": "click-right", | ||
| 67 | "format-icons": { | ||
| 68 | "wifi": ["", "" ,"", ""], | ||
| 69 | "ethernet": [""], | ||
| 70 | "disconnected": [""] | ||
| 71 | }, | ||
| 72 | "on-click": "foot -t alacritty doas nmtui", | ||
| 73 | "tooltip": false | ||
| 74 | }, | ||
| 75 | "privacy": { | ||
| 76 | "icon-spacing":4, | ||
| 77 | "icon-size":18, | ||
| 78 | "transition-duration":250, | ||
| 79 | "modules": [ | ||
| 80 | { | ||
| 81 | "type":"screenshare", | ||
| 82 | "tooltip":true, | ||
| 83 | "tooltip-icon-size":24 | ||
| 84 | }, | ||
| 85 | { | ||
| 86 | "type":"audio-in", | ||
| 87 | "tooltip":true, | ||
| 88 | "tooltip-icon-size":24 | ||
| 89 | } | ||
| 90 | ] | ||
| 91 | }, | ||
| 92 | "pulseaudio": { | ||
| 93 | "format-alt": "{icon}", | ||
| 94 | "format": "{volume} {icon}", | ||
| 95 | "format-alt-click": "click-right", | ||
| 96 | "format-muted": "", | ||
| 97 | "format-icons": { | ||
| 98 | "phone": [" ", " ", " ", " "], | ||
| 99 | "default": ["", "", "", ""] | ||
| 100 | }, | ||
| 101 | "scroll-step": 1, | ||
| 102 | "on-click": "pavucontrol", | ||
| 103 | "tooltip": false | ||
| 104 | }, | ||
| 105 | "custom/spotify": { | ||
| 106 | "interval": 2, | ||
| 107 | "return-type": "json", | ||
| 108 | "exec": "~/.config/waybar/modules/spotify.sh", | ||
| 109 | "exec-if": "~/.config/waybar/modules/check-for-music.sh", | ||
| 110 | "escape": true, | ||
| 111 | "on-click": "playerctl play-pause" | ||
| 112 | }, | ||
| 113 | "custom/storage": { | ||
| 114 | "format-alt": "{} ", | ||
| 115 | "format": "{percentage}% ", | ||
| 116 | "format-alt-click": "click-right", | ||
| 117 | "return-type": "json", | ||
| 118 | "interval": 60, | ||
| 119 | "exec": "~/.config/waybar/modules/storage.sh" | ||
| 120 | }, | ||
| 121 | "backlight": { | ||
| 122 | "format-alt": "{icon}", | ||
| 123 | "format": "{percent}% {icon}", | ||
| 124 | "format-alt-click": "click-right", | ||
| 125 | "format-icons": ["", ""], | ||
| 126 | "on-scroll-up": "light -A 1", | ||
| 127 | "on-scroll-down": "light -U 1" | ||
| 128 | }, | ||
| 129 | "custom/weather_OLD": { | ||
| 130 | "format-alt": "{}", | ||
| 131 | "format": "{alt}: {}", | ||
| 132 | "format-alt-click": "click-right", | ||
| 133 | "interval": 1800, | ||
| 134 | "return-type": "json", | ||
| 135 | "on-click": "foot -a ala-wttr -H curl https://v2.wttr.in", | ||
| 136 | "exec": "~/.config/waybar/modules/weather.sh", | ||
| 137 | "exec-if": "ping wttr.in -c1" | ||
| 138 | }, | ||
| 139 | "custom/weather": { | ||
| 140 | "format": "{} °F", | ||
| 141 | "tooltip": true, | ||
| 142 | "interval": 3600, | ||
| 143 | "exec": "exit=101; while [ $exit = 101 ]; do wttrbar --main-indicator temp_F --fahrenheit; exit=$(echo $?); sleep 1; done", | ||
| 144 | "on-click": "foot -a ala-wttr -H curl https://v2.wttr.in", | ||
| 145 | "return-type": "json" | ||
| 146 | }, | ||
| 147 | "idle_inhibitor": { | ||
| 148 | "format": "{icon}", | ||
| 149 | "format-icons": { | ||
| 150 | "activated": "", | ||
| 151 | "deactivated": "" | ||
| 152 | }, | ||
| 153 | "tooltip": false | ||
| 154 | }, | ||
| 155 | "custom/mail": { | ||
| 156 | "format": "", | ||
| 157 | "format-alt": "{alt} ", | ||
| 158 | "format-alt-click": "click-right", | ||
| 159 | "interval": 60, | ||
| 160 | "return-type": "json", | ||
| 161 | "exec": "~/.config/waybar/modules/mail.py", | ||
| 162 | "tooltip": false | ||
| 163 | }, | ||
| 164 | "tray": { | ||
| 165 | "icon-size": 18 | ||
| 166 | } | ||
| 167 | } | ||
diff --git a/users/ryan/linux/waybar/modules/check-for-music.sh b/users/ryan/linux/waybar/modules/check-for-music.sh new file mode 100755 index 0000000..3b735a2 --- /dev/null +++ b/users/ryan/linux/waybar/modules/check-for-music.sh | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | if [[ $(playerctl metadata --format '{{lc(status)}}' | grep playing) -eq 0 ]]; then | ||
| 4 | exit 0 | ||
| 5 | else | ||
| 6 | exit 1 | ||
| 7 | fi | ||
diff --git a/users/ryan/linux/waybar/modules/spotify.sh b/users/ryan/linux/waybar/modules/spotify.sh new file mode 100755 index 0000000..fc732a1 --- /dev/null +++ b/users/ryan/linux/waybar/modules/spotify.sh | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | class=$(playerctl metadata --format '{{lc(status)}}') | ||
| 4 | icon="" | ||
| 5 | |||
| 6 | if [[ $class == "playing" ]]; then | ||
| 7 | info=$(playerctl metadata --format '{{artist}} - {{title}}') | ||
| 8 | if [[ ${#info} > 40 ]]; then | ||
| 9 | info=$(playerctl metadata --format '{{title}}' | cut -c1-40)"..." | ||
| 10 | fi | ||
| 11 | text=$info" "$icon | ||
| 12 | elif [[ $class == "paused" ]]; then | ||
| 13 | text=$icon | ||
| 14 | elif [[ $class == "stopped" ]]; then | ||
| 15 | text="" | ||
| 16 | fi | ||
| 17 | |||
| 18 | echo -e "{\"text\":\""$text"\", \"class\":\""$class"\"}" | ||
| 19 | |||
diff --git a/users/ryan/linux/waybar/modules/storage.sh b/users/ryan/linux/waybar/modules/storage.sh new file mode 100755 index 0000000..90cc3dc --- /dev/null +++ b/users/ryan/linux/waybar/modules/storage.sh | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | mount="/" | ||
| 4 | warning=20 | ||
| 5 | critical=10 | ||
| 6 | |||
| 7 | df -h -P -l "$mount" | awk -v warning=$warning -v critical=$critical ' | ||
| 8 | /\/.*/ { | ||
| 9 | text=$4 | ||
| 10 | tooltip="Filesystem: "$1"\rSize: "$2"\rUsed: "$3"\rAvail: "$4"\rUse%: "$5"\rMounted on: "$6 | ||
| 11 | use=$5 | ||
| 12 | exit 0 | ||
| 13 | } | ||
| 14 | END { | ||
| 15 | class="" | ||
| 16 | gsub(/%$/,"",use) | ||
| 17 | if ((100 - use) < critical) { | ||
| 18 | class="critical" | ||
| 19 | } else if ((100 - use) < warning) { | ||
| 20 | class="warning" | ||
| 21 | } | ||
| 22 | print "{\"text\":\""text"\", \"percentage\":"use",\"tooltip\":\""tooltip"\", \"class\":\""class"\"}" | ||
| 23 | } | ||
| 24 | ' | ||
| 25 | |||
diff --git a/users/ryan/linux/waybar/modules/weather.sh b/users/ryan/linux/waybar/modules/weather.sh new file mode 100755 index 0000000..01faffc --- /dev/null +++ b/users/ryan/linux/waybar/modules/weather.sh | |||
| @@ -0,0 +1,77 @@ | |||
| 1 | cachedir=~/.cache/rbn | ||
| 2 | cachefile=${0##*/}-$1 | ||
| 3 | |||
| 4 | if [ ! -d $cachedir ]; then | ||
| 5 | mkdir -p $cachedir | ||
| 6 | fi | ||
| 7 | |||
| 8 | if [ ! -f $cachedir/$cachefile ]; then | ||
| 9 | touch $cachedir/$cachefile | ||
| 10 | fi | ||
| 11 | |||
| 12 | # Save current IFS | ||
| 13 | SAVEIFS=$IFS | ||
| 14 | # Change IFS to new line. | ||
| 15 | IFS=$'\n' | ||
| 16 | |||
| 17 | cacheage=$(($(date +%s) - $(stat -c '%Y' "$cachedir/$cachefile"))) | ||
| 18 | if [ $cacheage -gt 1740 ] || [ ! -s $cachedir/$cachefile ]; then | ||
| 19 | data=($(curl -s https://en.wttr.in/$1\?0qnT 2>&1)) | ||
| 20 | echo ${data[0]} | cut -f1 -d, > $cachedir/$cachefile | ||
| 21 | echo ${data[1]} | sed -E 's/^.{15}//' >> $cachedir/$cachefile | ||
| 22 | echo ${data[2]} | sed -E 's/^.{15}//' >> $cachedir/$cachefile | ||
| 23 | fi | ||
| 24 | |||
| 25 | weather=($(cat $cachedir/$cachefile)) | ||
| 26 | |||
| 27 | # Restore IFSClear | ||
| 28 | IFS=$SAVEIFS | ||
| 29 | |||
| 30 | temperature=$(echo ${weather[2]} | sed -E 's/([[:digit:]]+)\.\./\1 to /g') | ||
| 31 | |||
| 32 | #echo ${weather[1]##*,} | ||
| 33 | |||
| 34 | # https://fontawesome.com/icons?s=solid&c=weather | ||
| 35 | case $(echo ${weather[1]##*,} | tr '[:upper:]' '[:lower:]') in | ||
| 36 | "clear" | "sunny") | ||
| 37 | condition="" | ||
| 38 | ;; | ||
| 39 | "partly cloudy") | ||
| 40 | condition="" | ||
| 41 | ;; | ||
| 42 | "cloudy") | ||
| 43 | condition="" | ||
| 44 | ;; | ||
| 45 | "overcast") | ||
| 46 | condition="" | ||
| 47 | ;; | ||
| 48 | "mist" | "fog" | "freezing fog") | ||
| 49 | condition="敖" | ||
| 50 | ;; | ||
| 51 | "patchy rain possible" | "patchy light drizzle" | "light drizzle" | "patchy light rain" | "light rain" | "light rain shower" | "rain") | ||
| 52 | condition="殺" | ||
| 53 | ;; | ||
| 54 | "moderate rain at times" | "moderate rain" | "heavy rain at times" | "heavy rain" | "moderate or heavy rain shower" | "torrential rain shower" | "rain shower") | ||
| 55 | condition="" | ||
| 56 | ;; | ||
| 57 | "patchy snow possible" | "patchy sleet possible" | "patchy freezing drizzle possible" | "freezing drizzle" | "heavy freezing drizzle" | "light freezing rain" | "moderate or heavy freezing rain" | "light sleet" | "ice pellets" | "light sleet showers" | "moderate or heavy sleet showers") | ||
| 58 | condition="流" | ||
| 59 | ;; | ||
| 60 | "blowing snow" | "moderate or heavy sleet" | "patchy light snow" | "light snow" | "light snow showers") | ||
| 61 | condition="ﰕ" | ||
| 62 | ;; | ||
| 63 | "blizzard" | "patchy moderate snow" | "moderate snow" | "patchy heavy snow" | "heavy snow" | "moderate or heavy snow with thunder" | "moderate or heavy snow showers") | ||
| 64 | condition="" | ||
| 65 | ;; | ||
| 66 | "thundery outbreaks possible" | "patchy light rain with thunder" | "moderate or heavy rain with thunder" | "patchy light snow with thunder") | ||
| 67 | condition="" | ||
| 68 | ;; | ||
| 69 | *) | ||
| 70 | condition="" | ||
| 71 | echo -e "{\"text\":\""$condition"\", \"alt\":\""${weather[0]}"\", \"tooltip\":\""${weather[0]}: $temperature ${weather[1]}"\"}" | ||
| 72 | ;; | ||
| 73 | esac | ||
| 74 | |||
| 75 | #echo $temp $condition | ||
| 76 | |||
| 77 | echo -e "{\"text\":\""$temperature $condition"\", \"alt\":\""${weather[0]}"\", \"tooltip\":\""${weather[0]}: $temperature ${weather[1]}"\"}" | ||
diff --git a/users/ryan/linux/waybar/style.css b/users/ryan/linux/waybar/style.css new file mode 100644 index 0000000..682a14e --- /dev/null +++ b/users/ryan/linux/waybar/style.css | |||
| @@ -0,0 +1,77 @@ | |||
| 1 | * { | ||
| 2 | border: none; | ||
| 3 | border-radius: 0; | ||
| 4 | font-family: AnonymicePro Nerd Font; | ||
| 5 | font-size: 15px; | ||
| 6 | box-shadow: none; | ||
| 7 | text-shadow: none; | ||
| 8 | transition-duration: 0s; | ||
| 9 | color: white; | ||
| 10 | } | ||
| 11 | |||
| 12 | #waybar { | ||
| 13 | background-color:rgba(0,0,0,0.25); | ||
| 14 | color: white; | ||
| 15 | } | ||
| 16 | |||
| 17 | window { | ||
| 18 | color: rgba(217, 216, 216, 1); | ||
| 19 | background: rgba(35, 31, 32, 0.00); | ||
| 20 | } | ||
| 21 | |||
| 22 | window#waybar.solo { | ||
| 23 | color: rgba(217, 216, 216, 1); | ||
| 24 | background: rgba(35, 31, 32, 0.85); | ||
| 25 | } | ||
| 26 | |||
| 27 | #workspaces { | ||
| 28 | margin: 0 5px; | ||
| 29 | } | ||
| 30 | |||
| 31 | #workspaces button { | ||
| 32 | padding: 0 5px; | ||
| 33 | color: rgba(217, 216, 216, 0.4); | ||
| 34 | } | ||
| 35 | |||
| 36 | #workspaces button.visible { | ||
| 37 | color: rgba(217, 216, 216, 1); | ||
| 38 | } | ||
| 39 | |||
| 40 | #workspaces button.active { | ||
| 41 | border-top: 3px solid rgba(217, 216, 216, 1); | ||
| 42 | border-bottom: 3px solid rgba(217, 216, 216, 0); | ||
| 43 | } | ||
| 44 | |||
| 45 | #workspaces button.urgent { | ||
| 46 | color: rgba(238, 46, 36, 1); | ||
| 47 | } | ||
| 48 | |||
| 49 | #mode, #battery, #cpu, #memory, #network, #bluetooth, #pulseaudio, #idle_inhibitor, #backlight, #custom-storage, #custom-spotify, #custom-weather, #custom-mail { | ||
| 50 | margin: 0px 6px 0px 10px; | ||
| 51 | min-width: 25px; | ||
| 52 | } | ||
| 53 | |||
| 54 | #clock { | ||
| 55 | margin: 0px 16px 0px 10px; | ||
| 56 | min-width: 140px; | ||
| 57 | } | ||
| 58 | |||
| 59 | #battery.warning #battery.num2.warning { | ||
| 60 | color: rgba(255, 210, 4, 1); | ||
| 61 | } | ||
| 62 | |||
| 63 | #battery.critical #battery.bat2.critical { | ||
| 64 | color: rgba(238, 46, 36, 1); | ||
| 65 | } | ||
| 66 | |||
| 67 | #battery.charging #battery.bat2.charging { | ||
| 68 | color: rgba(217, 216, 216, 1); | ||
| 69 | } | ||
| 70 | |||
| 71 | #custom-storage.warning { | ||
| 72 | color: rgba(255, 210, 4, 1); | ||
| 73 | } | ||
| 74 | |||
| 75 | #custom-storage.critical { | ||
| 76 | color: rgba(238, 46, 36, 1); | ||
| 77 | } | ||
diff --git a/users/ryan/linux/wpaperd/config.toml b/users/ryan/linux/wpaperd/config.toml new file mode 100644 index 0000000..9947370 --- /dev/null +++ b/users/ryan/linux/wpaperd/config.toml | |||
| @@ -0,0 +1,4 @@ | |||
| 1 | [default] | ||
| 2 | duration = "30m" | ||
| 3 | path = "~/.config/hypr/Wallpapers/static/" | ||
| 4 | transition-time = 2000 | ||
