My NixOS and Home Manager configurations
10
fork

Configure Feed

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

improve waywall config

quasigod 90473c4f dcd98063

+30 -25
-4
modules/apps/helix.nix
··· 33 33 C-l = "jump_view_right"; 34 34 C-r = ":reload"; 35 35 A-r = ":reset-diff-change"; 36 - C-d = ":half-page-down-smooth"; 37 - C-u = ":half-page-up-smooth"; 38 - pageup = ":page-up-smooth"; 39 - pagedown = ":page-down-smooth"; 40 36 space."=" = ":format"; 41 37 }; 42 38 editor = {
-1
modules/mcsr/default.nix
··· 20 20 in 21 21 { 22 22 imports = [ inputs.mcsr.nixosModules.waywall ]; 23 - 24 23 programs.waywall = { 25 24 enable = true; 26 25 config = {
+30 -20
modules/mcsr/waywall.lua
··· 28 28 local mc_eye_y = (tall_h - mc_eye_h) / 2 29 29 30 30 -- https://arjuncgore.github.io/waywall-boat-eye-calc/ 31 - -- https://github.com/Esensats/mcsr-calcsens 32 31 local normal_sens = 6.90587096 33 32 local tall_sens = 0.46586592 33 + 34 + local ensure_ninjabrain = Processes.ensure_application(waywall, programs.ninjabrain_bot)("ninjabrain.*\\.jar") 34 35 35 36 for _, name in ipairs({ "wide", "thin", "tall" }) do 36 37 scene:register(name .. "_bg", { ··· 76 77 return not waywall.get_key("F3") and waywall.state().screen == "inworld" and waywall.state().inworld == "unpaused" 77 78 end 78 79 80 + function eye_guard() 81 + return not waywall.get_key("F3") and waywall.state().screen == "inworld" and 82 + (waywall.state().inworld == "unpaused" or waywall.state().inworld == "paused") 83 + end 84 + 79 85 ModeManager:define("thin", { 80 86 width = thin_w, 81 87 height = resolution.h, ··· 104 110 width = tall_w, 105 111 height = tall_h, 106 112 on_enter = function() 113 + ensure_ninjabrain() 114 + waywall.show_floating(true) 107 115 scene:enable_group("tall", true) 108 116 waywall.set_sensitivity(tall_sens) 109 117 end, ··· 111 119 scene:enable_group("tall", false) 112 120 waywall.set_sensitivity(0) 113 121 end, 114 - toggle_guard = function() 115 - return not waywall.get_key("F3") and waywall.state().screen == "inworld" 116 - end, 122 + toggle_guard = eye_guard, 117 123 }) 118 - 119 - local ensure_ninjabrain = Processes.ensure_application(waywall, programs.ninjabrain_bot)("ninjabrain.*\\.jar") 120 - waywall.listen("load", ensure_ninjabrain) 121 124 122 125 local config = { 123 126 input = { ··· 125 128 repeat_delay = 300, 126 129 sensitivity = normal_sens, 127 130 confine_pointer = false, 128 - remaps = { 129 - ["F20"] = "F3", 130 - ["F24"] = "F3", 131 - ["F17"] = "F5", 132 - }, 131 + remaps = { 132 + ["F20"] = "F3", 133 + ["F24"] = "F3", 134 + }, 133 135 }, 134 136 theme = { 135 137 background = "#303030ff", 136 138 -- https://github.com/smithay/smithay/issues/1894 137 - ninb_anchor = "top", 139 + ninb_opacity = 0.5, 140 + ninb_anchor = { 141 + position = "topright", 142 + y = 130, 143 + x = -15, 144 + }, 138 145 }, 139 146 window = { 140 147 fullscreen_width = resolution.w, 141 148 fullscreen_height = resolution.h, 142 149 }, 143 150 actions = Keys.actions({ 144 - ["F13"] = function() 151 + ["f"] = function() 145 152 return ModeManager:toggle("thin") 146 153 end, 147 - ["F14"] = function() 154 + ["g"] = function() 148 155 return ModeManager:toggle("tall") 149 156 end, 150 - ["F15"] = function() 157 + ["TAB"] = function() 151 158 return ModeManager:toggle("wide") 152 159 end, 153 - ["F23"] = function() 154 - ensure_ninjabrain() 155 - helpers.toggle_floating() 160 + ["b"] = function() 161 + if mode_guard() then 162 + ensure_ninjabrain() 163 + helpers.toggle_floating() 164 + else 165 + waywall.press_key("b") 166 + end 156 167 end, 157 168 }), 158 169 } 159 170 160 171 return config 161 -