Compare commits
1
Commits
master
..
cf9f9f7db7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cf9f9f7db7 |
@@ -40,7 +40,6 @@
|
||||
(speaker)
|
||||
(temperature)
|
||||
(battery)
|
||||
(ram)
|
||||
(box :class "thingy" (systray :orientation "v"))
|
||||
(color_scheme)
|
||||
(xwayland)
|
||||
@@ -139,21 +138,6 @@
|
||||
(label :text "${current_temp / 1000}°")
|
||||
))
|
||||
|
||||
(defwidget ram []
|
||||
(box :orientation "v"
|
||||
:valign "end"
|
||||
:class "thingy"
|
||||
(label :text "RAM")
|
||||
(circular-progress
|
||||
:thickness 4.0
|
||||
:value {EWW_RAM.used_mem_perc}
|
||||
:class {
|
||||
EWW_RAM?.used_mem_perc > 80 ? "battery-gauge low" :
|
||||
"battery-gauge"
|
||||
}
|
||||
)
|
||||
))
|
||||
|
||||
(defwidget battery []
|
||||
(box :orientation "v"
|
||||
:valign "end"
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
theme = "gruvbox"
|
||||
|
||||
[editor]
|
||||
auto-format = true
|
||||
#line-number = "relative"
|
||||
|
||||
[editor.cursor-shape]
|
||||
insert = "bar"
|
||||
normal = "block"
|
||||
select = "underline"
|
||||
@@ -1,21 +0,0 @@
|
||||
{% if light %}
|
||||
theme = "gruvbox_light"
|
||||
{% else %}
|
||||
theme = "gruvbox"
|
||||
{% end %}
|
||||
|
||||
[editor]
|
||||
auto-format = true
|
||||
#line-number = "relative"
|
||||
|
||||
[editor.cursor-shape]
|
||||
insert = "bar"
|
||||
normal = "block"
|
||||
select = "underline"
|
||||
|
||||
[keys.select]
|
||||
X = "extend_line_above" # Extend the selection with the line above the selection
|
||||
|
||||
[keys.normal]
|
||||
X = "extend_line_above" # Extend the selection with the line above the selection
|
||||
C-n = "extend_search_next" # Add next search result to selection
|
||||
@@ -1,6 +1,2 @@
|
||||
[[language]]
|
||||
name = "rust"
|
||||
diagnostic-severity = "info" # don't show hints
|
||||
|
||||
[language-server.qmlls]
|
||||
command = "qmlls6"
|
||||
|
||||
@@ -51,7 +51,7 @@ input-field {
|
||||
# ferris image in the center
|
||||
image {
|
||||
monitor =
|
||||
path = ~/.config/hypr/ferris-stamp.png
|
||||
path = ~/.config/wallpapers/ferris-stamp.png
|
||||
rounding = 0
|
||||
size = 300
|
||||
position = 0, 0
|
||||
|
||||
@@ -38,19 +38,13 @@ clipboard {
|
||||
// `niri msg outputs`
|
||||
output "Microstep MSI MAG342CQR DB6H262101804" {
|
||||
mode "3440x1440@144.000"
|
||||
position x=1152 y=387
|
||||
position x=0 y=0
|
||||
scale 1.25
|
||||
}
|
||||
|
||||
output "Dell Inc. DELL U2724DE 1MV5L04" {
|
||||
mode "2560x1440@120.000"
|
||||
position x=0 y=0
|
||||
transform "270"
|
||||
scale 1.25
|
||||
|
||||
// layout {
|
||||
// gaps 0
|
||||
// }
|
||||
}
|
||||
|
||||
output "eDP-1" {
|
||||
@@ -69,18 +63,6 @@ layout {
|
||||
// Set gaps around windows in logical pixels.
|
||||
gaps 12
|
||||
|
||||
// Struts shrink the area occupied by windows, similarly to layer-shell panels.
|
||||
// You can think of them as a kind of outer gaps. They are set in logical pixls.
|
||||
// Left and right struts will cause the next window to the side to always be visible.
|
||||
// Top and bottom struts will simply add outer gaps in addition to the area occupied by
|
||||
// layer-shell panels and regular gaps.
|
||||
struts {
|
||||
left -12
|
||||
right -12
|
||||
top -12
|
||||
bottom -12
|
||||
}
|
||||
|
||||
// When to center a column when changing focus, options are:
|
||||
// - "never", default behavior, focusing an off-screen column will keep at the left
|
||||
// or right edge of the screen.
|
||||
@@ -121,11 +103,26 @@ layout {
|
||||
// active-gradient from="#ffbb66" to="#ffc880" angle=45 relative-to="workspace-view"
|
||||
// inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view"
|
||||
}
|
||||
|
||||
// Struts shrink the area occupied by windows, similarly to layer-shell panels.
|
||||
// You can think of them as a kind of outer gaps. They are set in logical pixls.
|
||||
// Left and right struts will cause the next window to the side to always be visible.
|
||||
// Top and bottom struts will simply add outer gaps in addition to the area occupied by
|
||||
// layer-shell panels and regular gaps.
|
||||
struts {
|
||||
// left 64
|
||||
// right 64
|
||||
// top 64
|
||||
// bottom 64
|
||||
}
|
||||
}
|
||||
|
||||
spawn-at-startup "hyprpaper"
|
||||
spawn-at-startup "eww" "daemon"
|
||||
spawn-at-startup "eww" "open" "bar0"
|
||||
spawn-at-startup "eww" "open" "bar1"
|
||||
spawn-at-startup "swayidle" "-w" // ~/.config/swayidle/config
|
||||
spawn-at-startup "dms" "run"
|
||||
spawn-at-startup "tailscale" "systray"
|
||||
spawn-at-startup "swaync" // ~/.config/swaync
|
||||
|
||||
// Uncomment this line to ask the clients to omit their client-side decorations if possible.
|
||||
// If the client will specifically ask for CSD, the request will be honored.
|
||||
@@ -252,7 +249,7 @@ vec4 close_color(vec3 coords_geo, vec3 size_geo) {
|
||||
// https://github.com/YaLTeR/niri/wiki/Configuration:-Window-Rules
|
||||
|
||||
window-rule {
|
||||
geometry-corner-radius 22
|
||||
geometry-corner-radius 16
|
||||
clip-to-geometry true
|
||||
}
|
||||
|
||||
@@ -331,11 +328,8 @@ binds {
|
||||
Mod+Shift+Plus { show-hotkey-overlay; }
|
||||
|
||||
Mod+Return { spawn "alacritty"; }
|
||||
Mod+Plus { spawn "loginctl" "lock-session"; }
|
||||
Mod+E { spawn "loginctl" "lock-session"; }
|
||||
|
||||
// TODO: why do i have to use spawn-sh?
|
||||
Mod+D { spawn "dms" "ipc" "call" "widget" "toggle" "launcherButton"; }
|
||||
Mod+D { spawn "fuzzel"; }
|
||||
Mod+Plus { spawn "loginctl lock-session"; }
|
||||
|
||||
// You can also use a shell:
|
||||
// Mod+T { spawn "bash" "-c" "notify-send hello && exec alacritty"; }
|
||||
@@ -536,11 +530,3 @@ binds {
|
||||
Mod+Shift+Ctrl+O { debug-toggle-opaque-regions; }
|
||||
Mod+Shift+Ctrl+D { debug-toggle-damage; }
|
||||
}
|
||||
|
||||
include "dms/alttab.kdl"
|
||||
include "dms/binds.kdl"
|
||||
include "dms/colors.kdl"
|
||||
include "dms/cursor.kdl"
|
||||
//include "dms/layout.kdl"
|
||||
include "dms/outputs.kdl"
|
||||
include "dms/wpblur.kdl"
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
# Nushell Config File
|
||||
#
|
||||
# version = 0.83.1
|
||||
|
||||
# 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 fish_completer = {|spans|
|
||||
fish --command $"complete '--do-complete=($spans | str replace --all "'" "\\'" | str join ' ')'"
|
||||
| from tsv --flexible --noheaders --no-infer
|
||||
@@ -12,10 +21,87 @@ let fish_completer = {|spans|
|
||||
}
|
||||
}
|
||||
|
||||
source theme.nu
|
||||
|
||||
$env.config.show_banner = false
|
||||
$env.config.edit_mode = "helix"
|
||||
$env.config.completions = {
|
||||
$env.config = {
|
||||
show_banner: false
|
||||
|
||||
display_errors: {
|
||||
exit_code: false # assume the external command prints an error message
|
||||
# Core dump errors are always printed, and SIGPIPE never triggers an error.
|
||||
# The setting below controls message printing for termination by all other signals.
|
||||
termination_signal: true
|
||||
}
|
||||
|
||||
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: false # always act as if -t was given. Can be overridden with -p
|
||||
}
|
||||
|
||||
#cd: {
|
||||
# abbreviations: false # allows `cd s/o/f` to expand to `cd some/other/folder`
|
||||
#}
|
||||
|
||||
table: {
|
||||
mode: rounded # 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
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
# 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: "#1D1F21", bg: "#C4C9C6"},
|
||||
command_bar_text: {fg: "#C4C9C6"},
|
||||
highlight: {fg: "black", bg: "yellow"},
|
||||
status: {
|
||||
error: {fg: "white", bg: "red"},
|
||||
warn: {}
|
||||
info: {}
|
||||
},
|
||||
table: {
|
||||
split_line: {fg: "#404040"},
|
||||
selected_cell: {},
|
||||
selected_row: {},
|
||||
selected_column: {},
|
||||
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: "plaintext" # "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
|
||||
@@ -25,11 +111,549 @@ $env.config.completions = {
|
||||
max_results: 100 # setting it lower can improve completion performance at the cost of omitting some options
|
||||
completer: $fish_completer
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
source theme.nu
|
||||
$env.color_config = $color_config # sourced from theme.nu
|
||||
$env.config.ls.use_ls_colors = true # use the LS_COLORS environment variable to colorize output
|
||||
filesize: {
|
||||
unit: "binary" # 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: block # block, underscore, line , blink_block, blink_underscore, blink_line (block is the default)
|
||||
vi_normal: underscore # block, underscore, line, blink_block, blink_underscore, blink_line (underscore is the default)
|
||||
}
|
||||
|
||||
# sourced from theme.nu
|
||||
color_config: $color_config
|
||||
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
|
||||
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: [{ null }] # 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: { table } # run before the output of a command is drawn, example: `{ if (term size).columns >= 100 { table -e } else { table } }`
|
||||
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_r
|
||||
# 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}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
alias grep = rg
|
||||
alias find = fd
|
||||
@@ -37,7 +661,6 @@ alias cat = bat
|
||||
alias e = nvim
|
||||
alias gd = git diff
|
||||
alias ga = git add
|
||||
alias gap = git add --patch
|
||||
alias gst = git status
|
||||
alias gc = git commit
|
||||
alias gl = git pull
|
||||
@@ -46,8 +669,6 @@ alias gpu = git push -u origin
|
||||
alias gsta = git stash push
|
||||
alias gstp = git stash pop
|
||||
alias gw = git switch
|
||||
alias gr = git restore
|
||||
alias grp = git restore --patch
|
||||
alias lg = lazygit
|
||||
alias bt = bluetoothctl
|
||||
alias d = cd ~/.config/dotfiles/tree
|
||||
|
||||
@@ -101,15 +101,12 @@ if ("XDG_RUNTIME_DIR" in $env) {
|
||||
|
||||
$env.GPG_TTY = (tty)
|
||||
$env.BROWSER = "firefox"
|
||||
$env.EDITOR = "helix"
|
||||
$env.EDITOR = "nvim"
|
||||
$env.DEFMT_LOG = "info"
|
||||
$env.MOZ_ENABLE_WAYLAND = "1"
|
||||
$env.VOLTA_HOME = $"($env.HOME)/.volta"
|
||||
$env.CARGO_TARGET_DIR = $"($env.HOME)/.cargo/target"
|
||||
|
||||
# For the mullvadvpn-app setup-rust git hook
|
||||
$env.MULLVAD_SETUP_PLATFORM = "linux"
|
||||
|
||||
mkdir ~/.cache/starship
|
||||
starship init nu | save -f ~/.cache/starship/init.nu
|
||||
zoxide init nushell | save -f ~/.cache/zoxide.nu
|
||||
|
||||
@@ -1,10 +1,15 @@
|
||||
{% if hostname == "sputnik" %}
|
||||
lock '$HOME/.local/bin/screenlock'
|
||||
{% else %}
|
||||
lock '$HOME/.local/bin/screenlock'
|
||||
{% end %}
|
||||
before-sleep 'loginctl lock-session'
|
||||
|
||||
{% if hostname == "sputnik" %}
|
||||
timeout 1770 'notify-send --app-name=swayidle "Locking in 30s"'
|
||||
timeout 1770 'notify-send "Locking in 30s"'
|
||||
timeout 1800 'loginctl lock-session'
|
||||
{% else %}
|
||||
timeout 530 'notify-send --app-name=swayidle "Locking in 30s"'
|
||||
timeout 530 'notify-send "Locking in 30s"'
|
||||
timeout 600 'loginctl lock-session'
|
||||
{% end %}
|
||||
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
border: 2px solid @noti-border-color;
|
||||
border-radius: 12px;
|
||||
margin: 6px 8px 0px 0px;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.notification-content {
|
||||
|
||||
|
Before Width: | Height: | Size: 156 KiB After Width: | Height: | Size: 156 KiB |
-44
@@ -1,44 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
width="120"
|
||||
height="120"
|
||||
viewBox="0 0 31.75 31.75"
|
||||
version="1.1"
|
||||
id="svg8"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<defs
|
||||
id="defs2" />
|
||||
<metadata
|
||||
id="metadata5">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1"
|
||||
style="display:inline">
|
||||
<path
|
||||
style="fill:#ffffff;stroke-width:0.177246"
|
||||
d="m 13.134179,31.651166 c -1.367874,-0.18043 -3.4872278,-0.85238 -4.780367,-1.51563 -1.871747,-0.96002 -4.179215,-3.22966 -5.0074297,-4.92534 -1.5914865,-3.25839 -1.6801158,-7.72336 -0.2278948,-11.48085 1.0247424,-2.65144 2.7098602,-4.5706201 5.4768881,-6.2376401 4.4640374,-2.6894 6.9208324,-4.59636 8.5218534,-6.61464 0.435944,-0.54955 0.851411,-0.9404 0.923263,-0.86855 0.34663,0.34663 0.709996,2.45556 0.596276,3.46071 l -0.118698,1.04918 0.543199,-0.3868 c 0.298763,-0.21273 0.754695,-0.66407 1.013185,-1.00297 0.258491,-0.3389 0.531184,-0.55268 0.605988,-0.47507 0.277608,0.28804 0.872923,2.3693 0.872923,3.05181 0,0.78189 -0.07309,0.70941 2.140938,2.12277 3.360595,2.14527 5.28622,5.2741001 5.845846,9.4985401 0.238089,1.79727 0.119928,4.12317 -0.289284,5.69424 -0.438918,1.68512 -1.295306,3.20011 -2.596637,4.59356 -2.715779,2.90803 -6.119638,4.1954 -10.928887,4.13338 -1.132683,-0.0146 -2.298705,-0.0581 -2.591161,-0.0967 z m 5.683631,-1.1265 c 5.074026,-0.89873 8.492767,-3.70496 9.49005,-7.7898 0.358508,-1.46844 0.317005,-5.28368 -0.07569,-6.95754 -0.594746,-2.53514 -2.005266,-4.78931 -3.64922,-5.8318801 -1.428352,-0.90583 -1.561881,-0.82384 -2.840659,1.7442101 -0.615739,1.23654 -1.777129,3.21756 -2.580868,4.40229 l -1.461342,2.15404 0.927607,0.3153 c 1.188141,0.40386 2.476979,1.20634 2.848748,1.77373 0.272049,0.4152 0.269021,0.4806 -0.04735,1.02231 -0.778356,1.33273 -2.272203,1.79512 -5.849412,1.81056 l -2.340153,0.0101 -2.489801,2.46697 c -2.6276133,2.60352 -2.8788341,3.03045 -2.0880964,3.54856 1.8126654,1.18771 7.0732674,1.8772 10.1561944,1.33115 z m 3.183004,-13.17071 c -0.205126,-0.14999 -0.329285,-0.4602 -0.329285,-0.8227 0,-0.96498 1.087198,-1.43355 1.715448,-0.73934 0.872429,0.96402 -0.338235,2.3283 -1.386163,1.56204 z m -3.186586,4.78402 c 1.133944,-0.30198 1.619925,-0.56299 1.85054,-0.9939 0.246861,-0.46126 -0.269147,-0.94676 -1.770094,-1.66543 -1.062457,-0.50872 -1.296906,-0.55176 -3.013183,-0.55311 -1.794444,-0.001 -1.910137,0.0225 -3.231141,0.66815 -1.860639,0.90936 -2.118197,1.48499 -0.948717,2.12031 1.182601,0.64245 5.357705,0.89133 7.112595,0.42398 z m -5.26747,-0.96936 c -1.113796,-0.13246 -1.303724,-0.23853 -1.149022,-0.64168 0.08921,-0.23246 0.582443,-0.27351 3.286452,-0.27351 1.749822,0 3.307658,0.0484 3.461858,0.10758 0.350902,0.13466 0.365077,0.53097 0.02367,0.66198 -0.432127,0.16582 -4.555272,0.2726 -5.622968,0.14563 z m -3.7845902,-3.81466 c 0.7343882,-0.537 0.2478022,-1.88618 -0.6802563,-1.88618 -0.5030742,0 -0.9992445,0.51278 -0.9992445,1.03268 0,0.90987 0.9453857,1.39029 1.6795008,0.8535 z"
|
||||
id="path865" />
|
||||
<path
|
||||
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 7.5967544,-6.2400058 c 0,0 -0.041418,0.1031026 -0.02862,0.2093299 0.012798,0.1062273 0.084435,0.1741091 0.084435,0.1741091 l -0.083147,0.088222 c 0,0 -0.1053512,-0.138166 -0.073877,-0.2774823 0.031474,-0.1393166 0.1012092,-0.1941783 0.101209,-0.1941787 z"
|
||||
id="path1039" />
|
||||
</g>
|
||||
<g
|
||||
id="layer2"
|
||||
style="display:none" />
|
||||
<g
|
||||
id="layer3"
|
||||
style="display:none" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 3.9 KiB |
+1
-1
@@ -12,7 +12,7 @@
|
||||
rebase = true
|
||||
|
||||
[core]
|
||||
editor = helix
|
||||
editor = nvim
|
||||
|
||||
[init]
|
||||
defaultBranch = master
|
||||
|
||||
@@ -37,7 +37,8 @@ RUN chmod +x /entrypoint.sh
|
||||
|
||||
ENTRYPOINT [\"/entrypoint.sh\"]
|
||||
|
||||
" >$tmp_dockerfile
|
||||
" > $tmp_dockerfile
|
||||
|
||||
|
||||
podman build -f $tmp_dockerfile -t $custom_tag || exit 1
|
||||
rm $tmp_dockerfile
|
||||
@@ -49,4 +50,4 @@ podman run --rm -it \
|
||||
-v cargo-target:/cargo-target:Z \
|
||||
-v cargo-registry:/root/.cargo/registry:Z \
|
||||
-v gradle-cache:/root/.gradle:Z \
|
||||
$custom_tag fish
|
||||
$custom_tag mold -run fish
|
||||
|
||||
@@ -9,4 +9,4 @@ if ps -e | grep " $LOCKPROG\$"
|
||||
exit 1
|
||||
end
|
||||
|
||||
ba $LOCKPROG $argv
|
||||
$LOCKPROG $argv
|
||||
|
||||
@@ -18,26 +18,3 @@ def gitfixremote [
|
||||
print $"Unknown host: ($parsed.host)"
|
||||
}
|
||||
}
|
||||
|
||||
def "git sha" [
|
||||
--no-copy(-c), # don't copy to clipboard
|
||||
--full(-f), # output the complete sha
|
||||
]: nothing -> record {
|
||||
mut sha = (git show -q | lines | parse "commit {sha}" | first);
|
||||
|
||||
if ($sha | is-empty) {
|
||||
return;
|
||||
}
|
||||
|
||||
$sha = $sha.sha
|
||||
|
||||
if not $full {
|
||||
$sha = ($sha | str substring 0..7)
|
||||
}
|
||||
|
||||
if not $no_copy {
|
||||
$sha | pbc
|
||||
}
|
||||
|
||||
$sha
|
||||
}
|
||||
|
||||
+14
-118
@@ -63,18 +63,9 @@ def dns [
|
||||
# Build and run mullvad-daemon
|
||||
def "m daemon" [
|
||||
--release (-r)
|
||||
# Force userspace wireguard
|
||||
--userwg
|
||||
# Use wireguard-go over GotaTun
|
||||
--wggo
|
||||
# Use stagemole
|
||||
--boringtun
|
||||
--stagemole
|
||||
# Attach GDB
|
||||
--gdb
|
||||
# Add counters and such to nft rules
|
||||
--debug-fw
|
||||
] {
|
||||
mut daemon_args = []
|
||||
mut cargo_flags = []
|
||||
mut envs = [
|
||||
MULLVAD_RESOURCE_DIR=./dist-assets/
|
||||
@@ -88,24 +79,12 @@ def "m daemon" [
|
||||
$cargo_flags ++= [--features api-override]
|
||||
$envs ++= [
|
||||
MULLVAD_API_HOST=api.stagemole.eu
|
||||
MULLVAD_API_ADDR=(dns api.stagemole.eu | where type == A | get 0.addr):443
|
||||
MULLVAD_API_ADDR=(dns api.stagemole.eu | where kind == ipv4 | get 0.addr):443
|
||||
]
|
||||
}
|
||||
|
||||
if $env.RUST_LOG? != null {
|
||||
$envs ++= [$"RUST_LOG=($env.RUST_LOG)"]
|
||||
}
|
||||
|
||||
if $debug_fw {
|
||||
$envs ++= [TALPID_FIREWALL_DEBUG=1]
|
||||
}
|
||||
|
||||
if $userwg {
|
||||
$envs ++= [TALPID_FORCE_USERSPACE_WIREGUARD=1]
|
||||
}
|
||||
|
||||
if $wggo {
|
||||
$cargo_flags ++= [--features wireguard-go]
|
||||
if $boringtun {
|
||||
$cargo_flags ++= [--features boringtun]
|
||||
}
|
||||
|
||||
if (m daemon is-running --system) {
|
||||
@@ -125,81 +104,17 @@ def "m daemon" [
|
||||
return
|
||||
}
|
||||
|
||||
if $gdb {
|
||||
$daemon_args ++= [gdb --args]
|
||||
}
|
||||
|
||||
let daemon_path = if $release {
|
||||
$daemon_args ++= [$"($env.CARGO_TARGET_DIR)/release/mullvad-daemon"]
|
||||
$"($env.CARGO_TARGET_DIR)/release/mullvad-daemon"
|
||||
} else {
|
||||
$daemon_args ++= [$"($env.CARGO_TARGET_DIR)/debug/mullvad-daemon"]
|
||||
$"($env.CARGO_TARGET_DIR)/debug/mullvad-daemon"
|
||||
}
|
||||
|
||||
# increase verbosity
|
||||
$daemon_args ++= ["-vv"]
|
||||
|
||||
cargo b ...$cargo_flags
|
||||
sudo ...$envs ...$daemon_args
|
||||
sudo ...$envs $daemon_path -vv
|
||||
}
|
||||
|
||||
def "m android cli" [
|
||||
...args
|
||||
] {
|
||||
let socket_filename = "rpc-socket"
|
||||
sudo MULLVAD_RPC_SOCKET_PATH=(sudo fd $socket_filename ~/.local/share/waydroid) mullvad ...$args
|
||||
}
|
||||
|
||||
def "m android start" [
|
||||
] {
|
||||
print "starting net.mullvad.mullvadvpn"
|
||||
adb shell am start -n net.mullvad.mullvadvpn/.ui.MainActivity;
|
||||
|
||||
# TODO: the waydroid cli is bork in the nix flake
|
||||
# waydroid app launch net.mullvad.mullvadvpn
|
||||
}
|
||||
|
||||
def "m android stop" [
|
||||
] {
|
||||
let app_pid = (ps | where name =~ mullvadvpn | get -o pid.0)
|
||||
if $app_pid != null {
|
||||
print $"kill net.mullvad.mullvadvpn [($app_pid)]"
|
||||
sudo kill $app_pid
|
||||
} else {
|
||||
print "net.mullvad.mullvadvpn is not running"
|
||||
}
|
||||
}
|
||||
|
||||
def "m android run" [
|
||||
] {
|
||||
print "hack: making sure we're disconnected"
|
||||
do --ignore-errors { m android cli disconnect }
|
||||
|
||||
print "compiling apk"
|
||||
./gradlew installOssProdDebug
|
||||
|
||||
m android start
|
||||
}
|
||||
|
||||
def "m android reload-daemon" [
|
||||
] {
|
||||
let daemon_path = (fd libmullvad_jni.so ~/.local/share/waydroid/ | lines | get -o 0)
|
||||
if $daemon_path == null {
|
||||
print "Can't find libmullvad_jni.so, hot-reload not available. Is the app installed?"
|
||||
exit
|
||||
}
|
||||
|
||||
m android stop
|
||||
|
||||
print "re-compiling libmullvad_jni.so"
|
||||
./gradlew app:cargoBuildX86_64;
|
||||
|
||||
print "Executing hot-swap!"
|
||||
sudo cp ~/.cargo/target/x86_64-linux-android/debug/libmullvad_jni.so $daemon_path;
|
||||
|
||||
m android start
|
||||
}
|
||||
|
||||
|
||||
def "m e2e list" [
|
||||
...args
|
||||
] {
|
||||
@@ -214,9 +129,7 @@ def "m e2e list" [
|
||||
|
||||
def "m e2e run" [
|
||||
account: string
|
||||
vm: string
|
||||
--skip: list<string>
|
||||
--display (-d)
|
||||
...tests
|
||||
] {
|
||||
let commit = (git rev-parse HEAD | take 6 | decode)
|
||||
@@ -225,28 +138,17 @@ def "m e2e run" [
|
||||
let dist = "../dist"
|
||||
print $"Looking in ($dist)"
|
||||
|
||||
let pkg_ext = match (uname).kernel-name {
|
||||
"Linux" => "rpm", # TODO: rpm
|
||||
"Darwin" => "pkg",
|
||||
_ => (panic "Unknown kernel"),
|
||||
}
|
||||
let target = match (uname).kernel-name {
|
||||
"Linux" => "x86_64-unknown-linux-musl",
|
||||
"Darwin" => "aarch64-apple-darwin",
|
||||
_ => (panic "Unknown kernel"),
|
||||
}
|
||||
|
||||
let pkgs = (ls $dist | where name =~ $".*\\.($pkg_ext)")
|
||||
let pkgs = (ls $dist | where name =~ ".*\\.pkg")
|
||||
let pkgs = ($pkgs | where name =~ $commit)
|
||||
|
||||
if ($pkgs | is-empty) {
|
||||
print $"No .($pkg_ext) for current commit found."
|
||||
print "No .pkg for current commit found."
|
||||
print "Run ./build.sh"
|
||||
return
|
||||
}
|
||||
|
||||
if ($pkgs | length) > 1 {
|
||||
print $"Multiple .($pkg_ext):s for current commit found."
|
||||
print "Multiple .pkg:s for current commit found."
|
||||
print "Make sure there's only one"
|
||||
print ...$pkgs
|
||||
return
|
||||
@@ -257,22 +159,16 @@ def "m e2e run" [
|
||||
print $"Using ($pkg)"
|
||||
|
||||
print "Building test utils"
|
||||
cargo b --target aarch64-apple-darwin
|
||||
|
||||
cargo b --release --target $target -p test-runner -p connection-checker
|
||||
cargo b -p test-manager
|
||||
|
||||
let test_manager = $"($env.CARGO_TARGET_DIR)/debug/test-manager"
|
||||
let bin_dir = $"($env.CARGO_TARGET_DIR)/($target)/release/"
|
||||
let test_manager = $"($env.CARGO_TARGET_DIR)/aarch64-apple-darwin/debug/test-manager"
|
||||
|
||||
mut args = [
|
||||
--vm $vm
|
||||
--vm macos15
|
||||
--account $account
|
||||
--app-package $pkg
|
||||
--runner-dir $bin_dir
|
||||
]
|
||||
if $display {
|
||||
$args ++= [--display]
|
||||
}
|
||||
|
||||
for s in $skip {
|
||||
$args ++= ["--skip" $s]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user