Compare commits
10 Commits
bc9e2b7c19
...
db7d5d17a6
| Author | SHA1 | Date | |
|---|---|---|---|
| db7d5d17a6 | |||
| 70de42923c | |||
| dae66e3608 | |||
| 2fb95b16e8 | |||
| 89ce9ab548 | |||
| 146429f594 | |||
| 13bc86f713 | |||
| e8ef6712af | |||
| d7c1b0e733 | |||
| 20ea9cc4d1 |
@@ -24,3 +24,4 @@
|
||||
!wireplumber/
|
||||
!systemd/
|
||||
fish/fish_variables
|
||||
waybar/fluxo-rs
|
||||
|
||||
@@ -22,3 +22,6 @@
|
||||
[submodule "fuzzel/catppuccin-fuzzel"]
|
||||
path = fuzzel/catppuccin-fuzzel
|
||||
url = https://github.com/catppuccin/fuzzel.git
|
||||
[submodule "nvim"]
|
||||
path = nvim
|
||||
url = https://git.narl.io/nvrl/nvim-config.git
|
||||
|
||||
@@ -26,8 +26,8 @@ lines = 24
|
||||
|
||||
## Blank space added around the window in pixels.
|
||||
[window.padding]
|
||||
x = 30
|
||||
y = 30
|
||||
x = 3
|
||||
y = 0
|
||||
|
||||
## SCROLLING ------------------------------------------------------
|
||||
[scrolling]
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ graph_symbol_proc = "default"
|
||||
shown_boxes = "cpu mem net proc"
|
||||
|
||||
#* Update time in milliseconds, recommended 2000 ms or above for better sample times for graphs.
|
||||
update_ms = 2000
|
||||
update_ms = 1000
|
||||
|
||||
#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct",
|
||||
#* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly.
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -14,3 +14,4 @@ exec-once = uwsm app -- hyprpaper
|
||||
# exec-once = uwsm app -- /usr/lib/xdg-desktop-portal-hyprland
|
||||
exec-once = wl-paste --type text --watch cliphist store # Stores only text data
|
||||
exec-once = wl-paste --type image --watch cliphist store # Stores only image data
|
||||
exec-once = uwsm app -- ~/.cargo/bin/fluxo-rs daemon
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Environment-variables/
|
||||
|
||||
env = INTEL_DEBUG,noccs
|
||||
env = WLR_DRM_NO_ATOMIC,1
|
||||
# env = INTEL_DEBUG,noccs
|
||||
# env = WLR_DRM_NO_ATOMIC,1
|
||||
env = HYPRCURSOR_THEME,Bibata-Modern-Classic
|
||||
env = HYPRCURSOR_SIZE,24
|
||||
env = XCURSOR_SIZE,24
|
||||
@@ -14,3 +14,4 @@ env = QT_QPA_PLATFORMTHEME,qt6ct
|
||||
# env = VDPAU_DRIVER,radeonsi
|
||||
env = MOZ_ENABLE_WAYLAND,1
|
||||
env = ELECTRON_OZONE_PLATFORM_HINT,wayland
|
||||
env = EDITOR,nvim
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#input
|
||||
input {
|
||||
kb_layout = us
|
||||
kb_layout = us,us
|
||||
kb_variant = dvorak-intl, intl
|
||||
# kb_variant = intl
|
||||
kb_model =
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
|
||||
# monitor = desc:Samsung Electric Company LC27G7xT H4ZRA00734, 2560x1440@90, 0x-1440, 1
|
||||
# monitor = desc:Samsung Electric Company LC27G7xT H4ZRA00734, 2560x1440@90, 0x-1440, 1, bitdepth, 10
|
||||
monitor = desc:Samsung Electric Company LC27G7xT H4ZRA00734, 1920x1080@75, 0x-1080, 1
|
||||
# monitor = desc:Samsung Electric Company LC27G7xT H4ZRA00734, 1920x1080@60, 0x-1080, 1
|
||||
# monitor = desc:Samsung Electric Company LC27G7xT H4ZRA00734, 1280x720@240, 0x-720, 1
|
||||
# laptop screen
|
||||
monitor = eDP-1, 1920x1080@60, 0x0, 1
|
||||
# samsung home monitor
|
||||
monitor = desc:Samsung Electric Company LC27G7xT H4ZRA00734, 2560x1440@144, 0x-1440, 1
|
||||
|
||||
|
||||
# lid_state fallback
|
||||
source = ~/.config/hypr/lid_state.conf
|
||||
|
||||
@@ -20,7 +20,7 @@ general {
|
||||
resize_on_border = false
|
||||
|
||||
# Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
|
||||
allow_tearing = true
|
||||
allow_tearing = false
|
||||
|
||||
layout = dwindle
|
||||
}
|
||||
@@ -96,7 +96,7 @@ master {
|
||||
misc {
|
||||
force_default_wallpaper = 0 # Set to 0 or 1 to disable the anime mascot wallpapers
|
||||
disable_hyprland_logo = true # If true disables the random hyprland logo / anime girl background. :(
|
||||
vrr = 0
|
||||
vrr = 1
|
||||
font_family = FiraCode Nerd Font
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,21 @@
|
||||
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
||||
# See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules
|
||||
|
||||
# ==========================================
|
||||
# VARIABLES
|
||||
# ==========================================
|
||||
# Dialogs and utility apps that should float in the center
|
||||
$dialog_titles = ^(Open Form|Open File|Select a File|Choose a file|Open Workspace|Choose Directory|Save As|Save File|branchdialog|pinentry-gtk-2|Confirm to replace files|File Operation Progress|Open Files|Anmelden – Google Konten — Zen Browser)$
|
||||
$dialog_classes = ^(pavucontrol|blueman-manager|nm-connection-editor|org.pulseaudio.pavucontrol)$
|
||||
|
||||
# App classes
|
||||
$steam = ^(steam)$
|
||||
$gamescope = ^(gamescope)$
|
||||
|
||||
|
||||
# ==========================================
|
||||
# GENERAL & FIXES
|
||||
# ==========================================
|
||||
# Ignore maximize requests from apps. You'll probably like this.
|
||||
# windowrule = suppress_event maximize, match:class .*
|
||||
|
||||
@@ -9,45 +24,54 @@
|
||||
windowrule = no_blur 1, match:class ^$, match:title ^$
|
||||
|
||||
|
||||
# games for tearing add the immediate rule
|
||||
# ==========================================
|
||||
# FLOATING & CENTERED DIALOGS
|
||||
# ==========================================
|
||||
# Make them float
|
||||
windowrule = float 1, match:title $dialog_titles
|
||||
windowrule = float 1, match:class $dialog_classes
|
||||
|
||||
# Float Windows
|
||||
windowrule = float 1, match:title ^(Open File|Select a File|Select Folder|Choose a file|Open Form|Open Workspace|Choose Directory|Save As|Save File|branchdialog|pinentry-gtk-2|Confirm to replace files|File Operation Progress)$
|
||||
windowrule = float 1, match:class ^(pavucontrol|blueman-manager|nm-connection-editor)$
|
||||
# Set to 800x600
|
||||
windowrule = size 800 600, match:title $dialog_titles
|
||||
windowrule = size 800 600, match:class $dialog_classes
|
||||
|
||||
# Center and Resize Windows
|
||||
windowrule = size 800 600, match:title ^(Open Form|Open File|Select a File|Choose a file|Open Workspace|Choose Directory|Save As|Save File|branchdialog|pinentry-gtk-2|Confirm to replace files|File Operation Progress)$
|
||||
windowrule = size 800 600, match:class ^(pavucontrol|blueman-manager|nm-connection-editor)$
|
||||
# Center them on the screen
|
||||
windowrule = center 1, match:title $dialog_titles
|
||||
windowrule = center 1, match:class $dialog_classes
|
||||
|
||||
windowrule = center 1, match:title ^(Open Form|Open File|Select a File|Choose a file|Open Workspace|Choose Directory|Save As|Save File|branchdialog|pinentry-gtk-2|Confirm to replace files|File Operation Progress)$
|
||||
windowrule = center 1, match:class ^(pavucontrol|blueman-manager|nm-connection-editor)$
|
||||
# Disable blur
|
||||
windowrule = no_blur 1, match:title $dialog_titles
|
||||
windowrule = no_blur 1, match:class $dialog_classes
|
||||
|
||||
windowrule = no_blur 1, match:title ^(Open Form|Open File|Select a File|Choose a file|Open Workspace|Choose Directory|Save As|Save File|branchdialog|pinentry-gtk-2|Confirm to replace files|File Operation Progress)$
|
||||
windowrule = no_blur 1, match:class ^(pavucontrol|blueman-manager|nm-connection-editor)$
|
||||
|
||||
# Workspace Rules
|
||||
# ==========================================
|
||||
# WORKSPACE ASSIGNMENTS
|
||||
# ==========================================
|
||||
# Normal Workspaces
|
||||
# windowrule = workspace 1, match:class ^(firefox)$
|
||||
# windowrule = workspace 2, match:class ^(kitty)$
|
||||
# windowrule = workspace 3, match:class ^(Code)$
|
||||
windowrule = workspace 1, match:class $gamescope
|
||||
|
||||
|
||||
# Special Workspaces
|
||||
windowrule = workspace special:virtual, match:class ^(Spotify|spotify)$
|
||||
windowrule = workspace special:discord, match:class ^(discord|vesktop)$
|
||||
|
||||
# steam rules
|
||||
|
||||
windowrule = workspace 3 silent, match:class ^(steam)$, match:title ^(Steam)$
|
||||
windowrule = workspace 4, match:class ^(gamescope)$
|
||||
# ==========================================
|
||||
# APP-SPECIFIC RULES: STEAM & GAMING
|
||||
# ==========================================
|
||||
# windowrule = workspace 3 silent, match:class $steam, match:title ^(Steam)$
|
||||
|
||||
# fixed sizes for different windows
|
||||
windowrule = size 400 800, match:title ^(Friends List)$, match:class ^(steam)$
|
||||
windowrule = size 1000 800, match:title ^(Steam Settings)$, match:class ^(steam)$
|
||||
windowrule = size 1000 800, match:title ^(Add Non-Steam Game)$, match:class ^(steam)$
|
||||
# Fixed sizes for specific Steam windows
|
||||
windowrule = size 400 800, match:title ^(Friends List)$, match:class $steam
|
||||
windowrule = size 1000 800, match:title ^(Steam Settings)$, match:class $steam
|
||||
windowrule = size 1000 800, match:title ^(Add Non-Steam Game)$, match:class $steam
|
||||
|
||||
# float windows that arent the main steam window
|
||||
windowrule = float 1, match:class ^(steam)$, match:title negative:^(Steam)$
|
||||
windowrule = no_blur 1, match:class ^(steam)$, match:title negative:^(Steam)$
|
||||
# windowrule = center 1, match:class ^(steam)$, match:title negative:^(Steam)$
|
||||
# Float and disable blur for Steam windows that aren't the main window
|
||||
windowrule = float 1, match:class $steam, match:title negative:^(Steam)$
|
||||
windowrule = no_blur 1, match:class $steam, match:title negative:^(Steam)$
|
||||
# windowrule = center 1, match:class $steam, match:title negative:^(Steam)$
|
||||
|
||||
# allow tearing for games started with gamescope
|
||||
windowrule = immediate 1, match:class ^(gamescope)$
|
||||
# Allow tearing for games started with Gamescope
|
||||
windowrule = immediate 1, match:class $gamescope
|
||||
|
||||
+45
-11
@@ -1,19 +1,53 @@
|
||||
#!/bin/bash
|
||||
# ~/.config/hypr/scripts/lid_handler.sh
|
||||
|
||||
if [[ "$1" == "close" ]]; then
|
||||
# Lid closed: disable laptop screen if any DP-* monitor is present
|
||||
# Using 'all' to detect monitors even if they are currently disabled
|
||||
if hyprctl monitors all | grep -q "Monitor DP-"; then
|
||||
hyprctl keyword monitor "eDP-1, disable" # Disable laptop display
|
||||
# The file that tells Hyprland to keep the lid off during reloads
|
||||
LID_STATE_FILE="$HOME/.config/hypr/lid_state.conf"
|
||||
|
||||
# Enable all detected DP-* monitors
|
||||
for monitor in $(hyprctl monitors all | grep "Monitor DP-" | awk '{print $2}'); do
|
||||
hyprctl keyword monitor "$monitor, enable"
|
||||
restart_ui() {
|
||||
# Spawn in background and detach
|
||||
systemctl restart --user waybar hyprpaper
|
||||
}
|
||||
|
||||
if [[ "$1" == "close" ]]; then
|
||||
# Check if ANY external monitor is connected and active
|
||||
if hyprctl monitors all | grep -qE "Monitor (DP|HDMI|Type-C)-"; then
|
||||
|
||||
# Prevent laptop screen from turning on during manual config reloads
|
||||
echo "monitor=eDP-1, disable" > "$LID_STATE_FILE"
|
||||
|
||||
# Extract the CURRENT live settings of all external monitors using jq
|
||||
# This grabs the active resolution, refresh rate, position, and scale.
|
||||
LIVE_MONITORS=$(hyprctl -j monitors | jq -c '.[] | select(.name != "eDP-1")')
|
||||
|
||||
# 3. Disable the laptop screen
|
||||
hyprctl keyword monitor "eDP-1, disable"
|
||||
|
||||
# 4. Re-apply the live settings to external monitors so they don't reset
|
||||
echo "$LIVE_MONITORS" | while read -r mon_json; do
|
||||
NAME=$(echo "$mon_json" | jq -r '.name')
|
||||
WIDTH=$(echo "$mon_json" | jq -r '.width')
|
||||
HEIGHT=$(echo "$mon_json" | jq -r '.height')
|
||||
REFRESH=$(echo "$mon_json" | jq -r '.refreshRate')
|
||||
X=$(echo "$mon_json" | jq -r '.x')
|
||||
Y=$(echo "$mon_json" | jq -r '.y')
|
||||
SCALE=$(echo "$mon_json" | jq -r '.scale')
|
||||
|
||||
# Formats it exactly as Hyprland expects: DP-1, 1920x1080@240, 0x0, 1
|
||||
hyprctl keyword monitor "$NAME, ${WIDTH}x${HEIGHT}@${REFRESH}, ${X}x${Y}, $SCALE"
|
||||
done
|
||||
systemd-run --user --on-active=5s systemctl --user restart waybar.service hyprpaper.service
|
||||
|
||||
# restart ui
|
||||
restart_ui
|
||||
fi
|
||||
|
||||
elif [[ "$1" == "open" ]]; then
|
||||
# Lid opened: re-enable laptop screen
|
||||
hyprctl keyword monitor "eDP-1, enable"
|
||||
# Clear the override file so the laptop screen is allowed to turn on again
|
||||
echo "" > "$LID_STATE_FILE"
|
||||
|
||||
# Let Hyprland reload itself.
|
||||
# This automatically re-enables eDP-1 based on your hardcoded hyprland.conf!
|
||||
hyprctl reload
|
||||
|
||||
restart_ui
|
||||
fi
|
||||
|
||||
@@ -16,6 +16,7 @@ x-scheme-handler/about=google-chrome.desktop
|
||||
x-scheme-handler/unknown=google-chrome.desktop
|
||||
application/vnd.openxmlformats-officedocument.wordprocessingml.document=libreoffice-writer.desktop
|
||||
x-scheme-handler/ror2mm=r2modman.desktop
|
||||
image/webp=feh.desktop
|
||||
|
||||
[Added Associations]
|
||||
application/pdf=org.pwmt.zathura-pdf-poppler.desktop;
|
||||
@@ -26,3 +27,4 @@ x-scheme-handler/https=zen.desktop;
|
||||
text/html=zen.desktop;
|
||||
x-scheme-handler/chrome=zen.desktop;
|
||||
application/vnd.openxmlformats-officedocument.wordprocessingml.document=libreoffice-writer.desktop;
|
||||
image/webp=feh.desktop;
|
||||
|
||||
Submodule
+1
Submodule nvim added at 8d657d0f8d
-403
@@ -1,403 +0,0 @@
|
||||
vim.o.number = true
|
||||
vim.o.wrap = false
|
||||
vim.o.tabstop = 4
|
||||
vim.o.shiftwidth = 4
|
||||
vim.o.smartcase = true
|
||||
vim.o.ignorecase = true
|
||||
vim.o.hlsearch = false
|
||||
vim.o.signcolumn = 'yes'
|
||||
vim.o.clipboard = 'unnamedplus'
|
||||
vim.o.undofile = true
|
||||
vim.o.undodir = '/home/narl/.cache/nvim-undodir'
|
||||
|
||||
vim.g.mapleader = ','
|
||||
|
||||
-- Set up 'mini.deps' (customize to your liking)
|
||||
require('mini.deps').setup()
|
||||
|
||||
local add = MiniDeps.add
|
||||
|
||||
add({
|
||||
source = 'chomosuke/typst-preview.nvim'
|
||||
})
|
||||
add({
|
||||
source = 'williamboman/mason.nvim'
|
||||
})
|
||||
|
||||
add({
|
||||
source = 'stevearc/conform.nvim'
|
||||
})
|
||||
|
||||
add({
|
||||
source = 'williamboman/mason-lspconfig.nvim'
|
||||
})
|
||||
|
||||
add({
|
||||
source = 'mfussenegger/nvim-lint'
|
||||
})
|
||||
|
||||
add({
|
||||
source = 'akinsho/toggleterm.nvim'
|
||||
})
|
||||
|
||||
-- Add to current session (install if absent)
|
||||
add({
|
||||
source = 'neovim/nvim-lspconfig',
|
||||
-- Supply dependencies near target plugin
|
||||
depends = { 'williamboman/mason.nvim' },
|
||||
})
|
||||
|
||||
add({
|
||||
source = 'seblyng/roslyn.nvim',
|
||||
})
|
||||
|
||||
add({
|
||||
source = 'tris203/rzls.nvim',
|
||||
})
|
||||
|
||||
add({
|
||||
source = 'nvim-treesitter/nvim-treesitter',
|
||||
-- Use 'master' while monitoring updates in 'main'
|
||||
checkout = 'master',
|
||||
monitor = 'main',
|
||||
-- Perform action after every checkout
|
||||
hooks = { post_checkout = function() vim.cmd('TSUpdate') end },
|
||||
})
|
||||
|
||||
add({
|
||||
-- Completion framework:
|
||||
source = 'hrsh7th/nvim-cmp',
|
||||
|
||||
-- LSP completion source:
|
||||
depends = {'hrsh7th/cmp-nvim-lsp',
|
||||
'hrsh7th/cmp-nvim-lua',
|
||||
'hrsh7th/cmp-nvim-lsp-signature-help',
|
||||
'hrsh7th/cmp-vsnip',
|
||||
'hrsh7th/cmp-path',
|
||||
'hrsh7th/cmp-buffer',
|
||||
'hrsh7th/vim-vsnip',
|
||||
},
|
||||
})
|
||||
|
||||
add({ source = "catppuccin/nvim", name = "catppuccin" })
|
||||
|
||||
require('mini.files').setup({
|
||||
mappings = {
|
||||
show_help = 'gh',
|
||||
},
|
||||
})
|
||||
require('mini.icons').setup({style = 'ascii'})
|
||||
require('mini.pick').setup({})
|
||||
require('mini.snippets').setup({})
|
||||
require('mini.notify').setup({})
|
||||
require('mini.statusline').setup({})
|
||||
require('mini.tabline').setup({})
|
||||
require('mini.git').setup({})
|
||||
local imap_expr = function(lhs, rhs)
|
||||
vim.keymap.set('i', lhs, rhs, { expr = true })
|
||||
end
|
||||
imap_expr('<Tab>', [[pumvisible() ? "\<C-n>" : "\<Tab>"]])
|
||||
imap_expr('<S-Tab>', [[pumvisible() ? "\<C-p>" : "\<S-Tab>"]])
|
||||
_G.cr_action = function()
|
||||
-- If there is selected item in popup, accept it with <C-y>
|
||||
if vim.fn.complete_info()['selected'] ~= -1 then return '\25' end
|
||||
-- Fall back to plain `<CR>`. You might want to customize this
|
||||
-- according to other plugins. For example if 'mini.pairs' is set up, replace
|
||||
-- next line with `return MiniPairs.cr()`
|
||||
return '\r'
|
||||
end
|
||||
|
||||
vim.keymap.set('i', '<CR>', 'v:lua.cr_action()', { expr = true })
|
||||
require("toggleterm").setup{
|
||||
size = function(term)
|
||||
if term.direction == "horizontal" then
|
||||
return 30
|
||||
elseif term.direction == "vertical" then
|
||||
return 69
|
||||
end
|
||||
end,
|
||||
open_mapping = [[<c-\>]],
|
||||
hide_numbers = true,
|
||||
shade_terminals = true,
|
||||
persist_size = true,
|
||||
direction = 'float',
|
||||
close_on_exit = true,
|
||||
shell = vim.o.shell,
|
||||
}
|
||||
|
||||
require('nvim-treesitter.configs').setup {
|
||||
ensure_installed = { "lua", "rust", "toml", "c_sharp" },
|
||||
auto_install = true,
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting=false,
|
||||
},
|
||||
ident = { enable = true },
|
||||
rainbow = {
|
||||
enable = true,
|
||||
extended_mode = true,
|
||||
max_file_lines = nil,
|
||||
}
|
||||
}
|
||||
require("mason").setup({
|
||||
registries = {
|
||||
"github:mason-org/mason-registry",
|
||||
"github:Crashdummyy/mason-registry",
|
||||
},
|
||||
ui = {
|
||||
icons = {
|
||||
package_installed = "✓",
|
||||
package_pending = "➜",
|
||||
package_uninstalled = "✗"
|
||||
}
|
||||
}
|
||||
})
|
||||
require("mason-lspconfig").setup()
|
||||
vim.lsp.config('rust_analyzer', {
|
||||
-- Server-specific settings. See `:help lsp-quickstart`
|
||||
settings = {
|
||||
['rust-analyzer'] = {},
|
||||
},
|
||||
})
|
||||
|
||||
require('roslyn').setup({
|
||||
config = {
|
||||
-- the rest of your Roslyn configuration
|
||||
handlers = require("rzls.roslyn_handlers"),
|
||||
},
|
||||
})
|
||||
|
||||
require("catppuccin").setup({
|
||||
flavour = "auto", -- latte, frappe, macchiato, mocha
|
||||
background = { -- :h background
|
||||
light = "latte",
|
||||
dark = "mocha",
|
||||
},
|
||||
transparent_background = false, -- disables setting the background color.
|
||||
show_end_of_buffer = false, -- shows the '~' characters after the end of buffers
|
||||
term_colors = false, -- sets terminal colors (e.g. `g:terminal_color_0`)
|
||||
dim_inactive = {
|
||||
enabled = false, -- dims the background color of inactive window
|
||||
shade = "dark",
|
||||
percentage = 0.15, -- percentage of the shade to apply to the inactive window
|
||||
},
|
||||
no_italic = false, -- Force no italic
|
||||
no_bold = false, -- Force no bold
|
||||
no_underline = false, -- Force no underline
|
||||
styles = { -- Handles the styles of general hi groups (see `:h highlight-args`):
|
||||
comments = { "italic" }, -- Change the style of comments
|
||||
conditionals = { "italic" },
|
||||
loops = {},
|
||||
functions = {},
|
||||
keywords = {},
|
||||
strings = {},
|
||||
variables = {},
|
||||
numbers = {},
|
||||
booleans = {},
|
||||
properties = {},
|
||||
types = {},
|
||||
operators = {},
|
||||
-- miscs = {}, -- Uncomment to turn off hard-coded styles
|
||||
},
|
||||
color_overrides = {},
|
||||
custom_highlights = {},
|
||||
default_integrations = true,
|
||||
integrations = {
|
||||
cmp = true,
|
||||
gitsigns = true,
|
||||
nvimtree = true,
|
||||
treesitter = true,
|
||||
notify = false,
|
||||
mini = {
|
||||
enabled = true,
|
||||
indentscope_color = "",
|
||||
},
|
||||
-- For more plugins integrations please scroll down (https://github.com/catppuccin/nvim#integrations)
|
||||
},
|
||||
})
|
||||
|
||||
local sign = function(opts)
|
||||
vim.fn.sign_define(opts.name, {
|
||||
texthl = opts.name,
|
||||
text = opts.text,
|
||||
numhl = ''
|
||||
})
|
||||
end
|
||||
|
||||
sign({name = 'DiagnosticSignError', text = ''})
|
||||
sign({name = 'DiagnosticSignWarn', text = ''})
|
||||
sign({name = 'DiagnosticSignHint', text = ''})
|
||||
sign({name = 'DiagnosticSignInfo', text = ''})
|
||||
--Set completeopt to have a better completion experience
|
||||
-- :help completeopt
|
||||
-- menuone: popup even when there's only one match
|
||||
-- noinsert: Do not insert text until a selection is made
|
||||
-- noselect: Do not select, force to select one from the menu
|
||||
-- shortness: avoid showing extra messages when using completion
|
||||
-- updatetime: set updatetime for CursorHold
|
||||
vim.opt.completeopt = {'menuone', 'noselect', 'noinsert'}
|
||||
vim.opt.shortmess = vim.opt.shortmess + { c = true}
|
||||
vim.api.nvim_set_option('updatetime', 300)
|
||||
|
||||
-- Fixed column for diagnostics to appear
|
||||
-- Show autodiagnostic popup on cursor hover_range
|
||||
-- Goto previous / next diagnostic warning / error
|
||||
-- Show inlay_hints more frequently
|
||||
vim.cmd([[
|
||||
set signcolumn=yes
|
||||
autocmd CursorHold * lua vim.diagnostic.open_float(nil, { focusable = false })
|
||||
]])
|
||||
|
||||
vim.diagnostic.config({
|
||||
virtual_text = false,
|
||||
signs = true,
|
||||
update_in_insert = true,
|
||||
underline = true,
|
||||
severity_sort = false,
|
||||
float = {
|
||||
border = 'rounded',
|
||||
source = 'always',
|
||||
header = '',
|
||||
prefix = '',
|
||||
},
|
||||
})
|
||||
|
||||
-- setup must be called before loading
|
||||
vim.cmd.colorscheme "catppuccin"
|
||||
|
||||
vim.keymap.set('n', '<leader>w', '<cmd>write<cr>', {desc = 'Save file'})
|
||||
vim.keymap.set('n', '<leader>q', '<cmd>quitall<cr>', {desc = 'Exit vim'})
|
||||
|
||||
-- Simplified clipboard mappings
|
||||
-- vim.keymap.set({'n', 'x', 'o'}, '<leader>y', '"+y', {desc = 'Copy to clipboard'})
|
||||
-- vim.keymap.set({'n', 'x'}, '<leader>p', '"+p', {desc = 'Paste from clipboard'})
|
||||
|
||||
vim.keymap.set('n', '<leader>e', '<cmd>lua MiniFiles.open()<cr>', {desc = 'File explorer'})
|
||||
vim.keymap.set('n', '<leader><space>', '<cmd>Pick buffers<cr>', {desc = 'Search open files'})
|
||||
vim.keymap.set('n', '<leader>ff', '<cmd>Pick files<cr>', {desc = 'Search all files'})
|
||||
vim.keymap.set('n', '<leader>fh', '<cmd>Pick help<cr>', {desc = 'Search help tags'})
|
||||
|
||||
vim.keymap.set('n', '<leader>h', '<cmd>wincmd h<cr>')
|
||||
vim.keymap.set('n', '<leader>l', '<cmd>wincmd l<cr>')
|
||||
vim.keymap.set('n', '<leader>j', '<cmd>wincmd j<cr>')
|
||||
vim.keymap.set('n', '<leader>k', '<cmd>wincmd k<cr>')
|
||||
|
||||
require 'typst-preview'.setup {
|
||||
-- Setting this true will enable logging debug information to
|
||||
-- `vim.fn.stdpath 'data' .. '/typst-preview/log.txt'`
|
||||
debug = false,
|
||||
|
||||
-- Custom format string to open the output link provided with %s
|
||||
-- Example: open_cmd = 'firefox %s -P typst-preview --class typst-preview'
|
||||
open_cmd = nil,
|
||||
|
||||
-- Custom port to open the preview server. Default is random.
|
||||
-- Example: port = 8000
|
||||
port = 0,
|
||||
|
||||
-- Custom host to bind the preview server to.
|
||||
-- Note that '0.0.0.0' is not supported and [won't be](https://github.com/Myriad-Dreamin/tinymist/issues/2105)
|
||||
-- Example: host = '192.168.0.10'
|
||||
host = '127.0.0.1',
|
||||
|
||||
-- Setting this to 'always' will invert black and white in the preview
|
||||
-- Setting this to 'auto' will invert depending if the browser has enable
|
||||
-- dark mode
|
||||
-- Setting this to '{"rest": "<option>","image": "<option>"}' will apply
|
||||
-- your choice of color inversion to images and everything else
|
||||
-- separately.
|
||||
invert_colors = 'never',
|
||||
|
||||
-- Whether the preview will follow the cursor in the source file
|
||||
follow_cursor = true,
|
||||
|
||||
-- Provide the path to binaries for dependencies.
|
||||
-- Setting this will skip the download of the binary by the plugin.
|
||||
-- Warning: Be aware that your version might be older than the one
|
||||
-- required.
|
||||
dependencies_bin = {
|
||||
['tinymist'] = '/home/narl/.local/share/nvim/mason/bin/tinymist',
|
||||
['websocat'] = '/usr/bin/websocat'
|
||||
},
|
||||
|
||||
-- A list of extra arguments (or nil) to be passed to previewer.
|
||||
-- For example, extra_args = { "--input=ver=draft", "--ignore-system-fonts" }
|
||||
extra_args = nil,
|
||||
|
||||
-- This function will be called to determine the root of the typst project
|
||||
get_root = function(path_of_main_file)
|
||||
local root = os.getenv 'TYPST_ROOT'
|
||||
if root then
|
||||
return root
|
||||
end
|
||||
|
||||
-- Look for a project marker so imports from parent dirs stay inside root
|
||||
local main_dir = vim.fs.dirname(vim.fn.fnamemodify(path_of_main_file, ':p'))
|
||||
local found = vim.fs.find({ 'typst.toml', '.git' }, { path = main_dir, upward = true })
|
||||
if #found > 0 then
|
||||
return vim.fs.dirname(found[1])
|
||||
end
|
||||
|
||||
return main_dir
|
||||
end,
|
||||
|
||||
-- This function will be called to determine the main file of the typst
|
||||
-- project.
|
||||
get_main_file = function(path_of_buffer)
|
||||
return path_of_buffer
|
||||
end,
|
||||
}
|
||||
|
||||
-- Rust
|
||||
|
||||
local cmp = require'cmp'
|
||||
cmp.setup({
|
||||
-- Enable LSP snippets
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
vim.fn["vsnip#anonymous"](args.body)
|
||||
end,
|
||||
},
|
||||
mapping = {
|
||||
['<C-p>'] = cmp.mapping.select_prev_item(),
|
||||
['<C-n>'] = cmp.mapping.select_next_item(),
|
||||
-- Add tab support
|
||||
['<S-Tab>'] = cmp.mapping.select_prev_item(),
|
||||
['<Tab>'] = cmp.mapping.select_next_item(),
|
||||
['<C-S-f>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<C-e>'] = cmp.mapping.close(),
|
||||
['<CR>'] = cmp.mapping.confirm({
|
||||
behavior = cmp.ConfirmBehavior.Insert,
|
||||
select = true,
|
||||
})
|
||||
},
|
||||
-- Installed sources:
|
||||
sources = {
|
||||
{ name = 'path' }, -- file paths
|
||||
{ name = 'nvim_lsp', keyword_length = 3 }, -- from language server
|
||||
{ name = 'nvim_lsp_signature_help'}, -- display function signatures with current parameter emphasized
|
||||
{ name = 'nvim_lua', keyword_length = 2}, -- complete neovim's Lua runtime API such vim.lsp.*
|
||||
{ name = 'buffer', keyword_length = 2 }, -- source current buffer
|
||||
{ name = 'vsnip', keyword_length = 2 }, -- nvim-cmp source for vim-vsnip
|
||||
{ name = 'calc'}, -- source for math calculation
|
||||
},
|
||||
window = {
|
||||
completion = cmp.config.window.bordered(),
|
||||
documentation = cmp.config.window.bordered(),
|
||||
},
|
||||
formatting = {
|
||||
fields = {'menu', 'abbr', 'kind'},
|
||||
format = function(entry, item)
|
||||
local menu_icon ={
|
||||
nvim_lsp = 'λ',
|
||||
vsnip = '⋗',
|
||||
buffer = 'Ω',
|
||||
path = '🖫',
|
||||
}
|
||||
item.menu = menu_icon[entry.source.name]
|
||||
return item
|
||||
end,
|
||||
},
|
||||
})
|
||||
Submodule nvim/pack/nvim/start/mini.nvim deleted from 432a0614f8
Submodule nvim/pack/nvim/start/nvim-lspconfig deleted from f47cd681d7
@@ -9,7 +9,7 @@ After=network-online.target
|
||||
# The command to start the mount.
|
||||
# Replace "my-remote:" and "/path/to/local/mount" accordingly.
|
||||
# The flags below are highly recommended for a good experience.
|
||||
ExecStart=rclone mount google_drive: %h/gdrive \
|
||||
ExecStart=rclone mount google_drive: %h/remote/gdrive \
|
||||
--vfs-cache-mode writes \
|
||||
--log-file /tmp/rclone.log \
|
||||
--log-level INFO
|
||||
|
||||
@@ -9,7 +9,7 @@ After=network-online.target
|
||||
# The command to start the mount.
|
||||
# Replace "my-remote:" and "/path/to/local/mount" accordingly.
|
||||
# The flags below are highly recommended for a good experience.
|
||||
ExecStart=sshfs -f -p 420 narl@narl.io:/opt %h/narl_io
|
||||
ExecStart=sshfs -f -p 420 narl@narl.io:/opt %h/remote/narl.io
|
||||
|
||||
# The command to unmount gracefully.
|
||||
ExecStop=fusermount -u %h/narl_io
|
||||
|
||||
@@ -10,7 +10,7 @@ After=network-online.target
|
||||
# The command to start the mount.
|
||||
# Replace "my-remote:" and "/path/to/local/mount" accordingly.
|
||||
# The flags below are highly recommended for a good experience.
|
||||
ExecStart=sshfs -f narl@vh3.narl.io:/opt/minecraft_vaulthunters %h/vaulthunters_server/
|
||||
ExecStart=sshfs -f -p 420 narl@vh3.narl.io:/opt/minecraft_vaulthunters %h/remote/vh3.narl.io
|
||||
|
||||
# The command to unmount gracefully.
|
||||
ExecStop=fusermount -u %h/vaulthunters_server
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
/usr/lib/systemd/user/sunshine.service
|
||||
+120
-124
@@ -1,116 +1,47 @@
|
||||
// ~/.config/waybar/config.jsonc
|
||||
[
|
||||
{
|
||||
"name": "top",
|
||||
"layer": "top",
|
||||
"position": "top",
|
||||
// "output": "eDP-1",
|
||||
"height": 30,
|
||||
"modules-left": ["hyprland/workspaces"],
|
||||
"modules-center": [],
|
||||
"modules-right": [
|
||||
// "custom/pixelbuds_pro",
|
||||
"custom/network",
|
||||
"custom/mem",
|
||||
"custom/cpu",
|
||||
"custom/tlp",
|
||||
"custom/volume",
|
||||
"custom/mic",
|
||||
"tray",
|
||||
"height": 34,
|
||||
"spacing": 4,
|
||||
"margin-top": 6,
|
||||
"margin-left": 10,
|
||||
"margin-right": 10,
|
||||
|
||||
"modules-left": [
|
||||
"hyprland/workspaces",
|
||||
"hyprland/window"
|
||||
],
|
||||
"modules-center": [
|
||||
"clock"
|
||||
],
|
||||
"modules-right": [
|
||||
"tray",
|
||||
"custom/gamemode",
|
||||
"custom/power_status"
|
||||
],
|
||||
|
||||
// --- Standard Modules ---
|
||||
"hyprland/workspaces": {
|
||||
"format": "{icon}",
|
||||
"on-click": "activate"
|
||||
},
|
||||
"hyprland/window": {
|
||||
"format": "{}",
|
||||
"max-length": 35
|
||||
"max-length": 50
|
||||
},
|
||||
"clock": {
|
||||
"format": "{:%a %d %b %H:%M}",
|
||||
"format-alt": false,
|
||||
"on-click-right": "xdg-open https://calendar.proton.me/u/0/month &> /dev/null & disown",
|
||||
"tooltip": false,
|
||||
},
|
||||
"cpu": {
|
||||
"format": "CPU: {usage}%",
|
||||
"tooltip": true,
|
||||
"interval": 1
|
||||
},
|
||||
"memory": {
|
||||
"format": "MEM: {used}/{total}GB",
|
||||
"interval": 3
|
||||
},
|
||||
"network": {
|
||||
"format-wifi": "{essid} ({signalStrength}%): {ipaddr}",
|
||||
"format-ethernet": "{ifname}: {ipaddr}",
|
||||
"format-disconnected": "Disconnected",
|
||||
"tooltip-format": "{ifname} via {gwaddr}"
|
||||
},
|
||||
"custom/volume": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
"exec": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs vol",
|
||||
"on-click": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle",
|
||||
"on-scroll-up": "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+",
|
||||
"on-scroll-down": "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-",
|
||||
"on-click-right": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs vol --cycle",
|
||||
"on-click-middle": "pavucontrol",
|
||||
"interval": 2
|
||||
},
|
||||
"custom/mic": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
"exec": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs mic",
|
||||
"on-click": "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle",
|
||||
"on-scroll-up": "wpctl set-volume @DEFAULT_AUDIO_SOURCE@ 5%+",
|
||||
"on-scroll-down": "wpctl set-volume @DEFAULT_AUDIO_SOURCE@ 5%-",
|
||||
"on-click-right": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs mic --cycle",
|
||||
"on-click-middle": "pavucontrol",
|
||||
"interval": 2
|
||||
},
|
||||
"custom/bluetooth-audio": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
"exec": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs bt",
|
||||
"interval": 3,
|
||||
"on-click": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs bt disconnect"
|
||||
"tooltip": false
|
||||
},
|
||||
"tray": {
|
||||
"icon-size": 18,
|
||||
"spacing": 6
|
||||
},
|
||||
"custom/power": {
|
||||
"format": "",
|
||||
"tooltip": false,
|
||||
"on-click": "~/.config/hypr/scripts/powermenu.sh & disown"
|
||||
},
|
||||
"custom/tlp": {
|
||||
"format": "{}",
|
||||
"exec": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs power",
|
||||
"return-type": "json",
|
||||
"interval": 5
|
||||
},
|
||||
"battery": {
|
||||
"states": {
|
||||
"warning": 30,
|
||||
"critical": 15
|
||||
},
|
||||
"format": "{capacity}%",
|
||||
"format-charging": "{capacity}%",
|
||||
"format-plugged": "{capacity}%",
|
||||
"format-alt": "{time} {icon}",
|
||||
"format-full": "{capacity}%",
|
||||
"format-icons": ["", "", "", "", ""]
|
||||
},
|
||||
"custom/pixelbuds_pro": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
"exec": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs buds",
|
||||
"interval": 5,
|
||||
"on-click": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs buds connect & disown",
|
||||
"on-click-right": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs buds cycle_anc & disown"
|
||||
"spacing": 10
|
||||
},
|
||||
|
||||
"custom/gamemode": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
@@ -118,22 +49,42 @@
|
||||
"on-click": "~/.config/hypr/scripts/gamemode.sh & disown",
|
||||
"interval": 1
|
||||
},
|
||||
"custom/gpu-screen-recorder": {
|
||||
|
||||
// --- Fluxo-rs Power ---
|
||||
"custom/power_status": {
|
||||
"format": "{} ",
|
||||
"return-type": "json",
|
||||
"exec": "~/.config/waybar/scripts/gpu-screen-recorder-status.sh",
|
||||
"on-click-right": "~/.config/hypr/scripts/replay-ctrl.sh save & disown",
|
||||
"on-click-middle": "nautilus ~/Videos/replay & disown",
|
||||
"on-click": "~/.config/waybar/scripts/toggle-replay.sh & disown",
|
||||
"interval": 1
|
||||
},
|
||||
"custom/gpu": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
"exec": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs gpu",
|
||||
"on-click": "lact gui & disown",
|
||||
"interval": 3
|
||||
"exec": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs power",
|
||||
"on-click": "~/.config/hypr/scripts/powermenu.sh & disown",
|
||||
"interval": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "bottom",
|
||||
"layer": "top",
|
||||
"position": "bottom",
|
||||
"height": 34,
|
||||
"spacing": 4,
|
||||
"margin-bottom": 6,
|
||||
"margin-left": 10,
|
||||
"margin-right": 10,
|
||||
|
||||
"modules-left": [
|
||||
"custom/sys",
|
||||
"custom/cpu",
|
||||
"custom/mem",
|
||||
"custom/network",
|
||||
"custom/disk-root"
|
||||
],
|
||||
"modules-center": [
|
||||
],
|
||||
"modules-right": [
|
||||
"custom/bluetooth-audio",
|
||||
"custom/volume",
|
||||
"custom/mic"
|
||||
],
|
||||
|
||||
// --- Fluxo-rs System & Hardware ---
|
||||
"custom/sys": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
@@ -153,40 +104,85 @@
|
||||
"exec": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs mem",
|
||||
"interval": 3
|
||||
},
|
||||
"custom/btrfs": {
|
||||
"custom/network": {
|
||||
"format": "{}",
|
||||
"exec": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs pool",
|
||||
"return-type": "json",
|
||||
"interval": 30
|
||||
"exec": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs net",
|
||||
"interval": 2
|
||||
},
|
||||
|
||||
// --- Fluxo-rs Utilities ---
|
||||
"custom/disk-root": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
"exec": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs disk",
|
||||
"exec": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs disk /",
|
||||
"interval": 30
|
||||
},
|
||||
"custom/disk-gdrive": {
|
||||
|
||||
// --- Fluxo-rs Audio & BT ---
|
||||
"custom/volume": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
"exec": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs disk ~/gdrive",
|
||||
"interval": 30
|
||||
"exec": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs vol",
|
||||
"on-click": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle",
|
||||
"on-scroll-up": "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+",
|
||||
"on-scroll-down": "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-",
|
||||
"on-click-right": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs vol --cycle",
|
||||
"on-click-middle": "pavucontrol",
|
||||
"interval": 1
|
||||
},
|
||||
"custom/disk-data": {
|
||||
"custom/mic": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
"exec": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs disk ~/data",
|
||||
"interval": 30
|
||||
"exec": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs mic",
|
||||
"on-click": "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle",
|
||||
"on-scroll-up": "wpctl set-volume @DEFAULT_AUDIO_SOURCE@ 5%+",
|
||||
"on-scroll-down": "wpctl set-volume @DEFAULT_AUDIO_SOURCE@ 5%-",
|
||||
"on-click-right": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs mic --cycle",
|
||||
"on-click-middle": "pavucontrol",
|
||||
"interval": 1
|
||||
},
|
||||
"custom/disk-games": {
|
||||
"custom/bluetooth-audio": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
"exec": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs disk ~/games",
|
||||
"interval": 30
|
||||
},
|
||||
"custom/network": {
|
||||
"exec": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs net",
|
||||
"interval": 2, // in seconds
|
||||
"format": "{}",
|
||||
"return-type": "json"
|
||||
"exec": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs bt",
|
||||
"on-click": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs bt menu",
|
||||
"on-click-right": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs bt disconnect",
|
||||
"interval": 3
|
||||
}
|
||||
|
||||
// --- Commented Out Modules ---
|
||||
/*
|
||||
"custom/gpu": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
"exec": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs gpu",
|
||||
"on-click": "lact gui & disown",
|
||||
"interval": 3
|
||||
},
|
||||
"custom/btrfs": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
"exec": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs pool",
|
||||
"interval": 30
|
||||
},
|
||||
"custom/pixelbuds_pro": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
"exec": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs buds",
|
||||
"on-click": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs buds connect & disown",
|
||||
"on-click-right": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs buds cycle_anc & disown",
|
||||
"interval": 5
|
||||
},
|
||||
"custom/gpu-screen-recorder": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
"exec": "~/.config/waybar/scripts/gpu-screen-recorder-status.sh",
|
||||
"on-click-right": "~/.config/hypr/scripts/replay-ctrl.sh save & disown",
|
||||
"on-click-middle": "nautilus ~/Videos/replay & disown",
|
||||
"on-click": "~/.config/waybar/scripts/toggle-replay.sh & disown",
|
||||
"interval": 1
|
||||
}
|
||||
*/
|
||||
}
|
||||
]
|
||||
|
||||
@@ -28,11 +28,16 @@ TX_MBPS="0.00"
|
||||
|
||||
# Read previous values if the stats file exists
|
||||
if [ -f "$STATS_FILE" ]; then
|
||||
source "$STATS_FILE" # This loads PREV_TIME, PREV_RX_BYTES, PREV_TX_BYTES
|
||||
# shellcheck source=/dev/null
|
||||
# Use a lock to ensure we don't source while another instance is writing
|
||||
{
|
||||
flock -s 200 || exit 1
|
||||
source "$STATS_FILE" 2>/dev/null
|
||||
} 200>"$STATS_FILE.lock"
|
||||
fi
|
||||
|
||||
# Calculate speed if we have previous data and time has passed
|
||||
if [ -n "$PREV_TIME" ] && [ "$TIME_NOW" -gt "$PREV_TIME" ]; then
|
||||
if [ -n "$PREV_TIME" ] && [ -n "$PREV_RX_BYTES" ] && [ -n "$PREV_TX_BYTES" ] && [ "$TIME_NOW" -gt "$PREV_TIME" ]; then
|
||||
TIME_DIFF=$((TIME_NOW - PREV_TIME))
|
||||
|
||||
RX_BPS=$(( (RX_BYTES_NOW - PREV_RX_BYTES) / TIME_DIFF ))
|
||||
@@ -43,10 +48,14 @@ if [ -n "$PREV_TIME" ] && [ "$TIME_NOW" -gt "$PREV_TIME" ]; then
|
||||
TX_MBPS=$(printf "%.2f" "$(echo "$TX_BPS / 1024 / 1024" | bc -l)")
|
||||
fi
|
||||
|
||||
# Save current values for the next run
|
||||
# Save current values for the next run safely using a lock
|
||||
# We use a subshell with flock to ensure atomic updates and prevent race conditions
|
||||
(
|
||||
flock -x 200 || exit 1
|
||||
echo "PREV_TIME=$TIME_NOW" > "$STATS_FILE"
|
||||
echo "PREV_RX_BYTES=$RX_BYTES_NOW" >> "$STATS_FILE"
|
||||
echo "PREV_TX_BYTES=$TX_BYTES_NOW" >> "$STATS_FILE"
|
||||
) 200>"$STATS_FILE.lock"
|
||||
|
||||
# Format the main output string
|
||||
OUTPUT_TEXT="$INTERFACE ($IP_ADDR): ${RX_MBPS} MB/s ${TX_MBPS} MB/s"
|
||||
|
||||
+93
-215
@@ -1,255 +1,133 @@
|
||||
/* ~/.config/waybar/style.css */
|
||||
@import "./catppuccin-waybar/themes/mocha.css";
|
||||
|
||||
/* --- Global Reset --- */
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
min-height: 0;
|
||||
font-family: JetBrainsMono Nerd Font;
|
||||
font-family: JetBrainsMono Nerd Font, monospace;
|
||||
font-size: 13px;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
/* --- Bar Background (Floating Island Style) --- */
|
||||
window#waybar {
|
||||
background-color: alpha(@base, 0.4);
|
||||
padding: 4px;
|
||||
transition-property: background-color;
|
||||
transition-duration: 0.5s;
|
||||
background-color: transparent;
|
||||
color: @text;
|
||||
}
|
||||
|
||||
window#waybar.hidden {
|
||||
opacity: 0.5;
|
||||
/* --- Shared Island Styling --- */
|
||||
#workspaces,
|
||||
#window,
|
||||
#clock,
|
||||
#tray,
|
||||
#custom-sys,
|
||||
#custom-cpu,
|
||||
#custom-gpu,
|
||||
#custom-mem,
|
||||
#custom-network,
|
||||
#custom-btrfs,
|
||||
#custom-disk-root,
|
||||
#custom-pixelbuds_pro,
|
||||
#custom-bluetooth-audio,
|
||||
#custom-volume,
|
||||
#custom-mic,
|
||||
#custom-gamemode,
|
||||
#custom-gpu-screen-recorder,
|
||||
#custom-power_status {
|
||||
background-color: alpha(@surface0, 0.95);
|
||||
margin: 4px 2px;
|
||||
padding: 0 12px;
|
||||
border-radius: 5px;
|
||||
border: 1px solid alpha(@surface1, 0.5);
|
||||
}
|
||||
|
||||
/* --- Top Bar Special Handling --- */
|
||||
window#waybar.top {
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
/* --- Bottom Bar Special Handling --- */
|
||||
window#waybar.bottom {
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
/* --- Workspaces --- */
|
||||
#workspaces button {
|
||||
all: initial;
|
||||
/* Remove GTK theme values (waybar #1351) */
|
||||
min-width: 0;
|
||||
/* Fix weird spacing in materia (waybar #450) */
|
||||
box-shadow: inset 0 -3px transparent;
|
||||
/* Use box-shadow instead of border so the text isn't offset */
|
||||
padding: 0px 12px;
|
||||
margin: 0px 3px;
|
||||
border-radius: 10px;
|
||||
background-color: @base;
|
||||
padding: 0 8px;
|
||||
margin: 4px 2px;
|
||||
border-radius: 5px;
|
||||
color: @subtext0;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
color: @text;
|
||||
border-bottom: 3px solid @blue;
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
box-shadow: inherit;
|
||||
text-shadow: inherit;
|
||||
background-color: @surface0;
|
||||
color: @text;
|
||||
color: @blue;
|
||||
background-color: @surface1;
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
border-bottom: 3px solid @maroon;
|
||||
}
|
||||
|
||||
#memory,
|
||||
#cpu,
|
||||
#custom-gpu,
|
||||
#custom-cpu,
|
||||
#custom-mem,
|
||||
#custom-power,
|
||||
#custom-gamemode,
|
||||
#custom-tlp,
|
||||
#battery,
|
||||
#backlight,
|
||||
#wireplumber,
|
||||
#custom-volume,
|
||||
#custom-mic,
|
||||
#custom-network,
|
||||
#network,
|
||||
#clock,
|
||||
#tray,
|
||||
#custom-disk-root,
|
||||
#custom-disk-gdrive,
|
||||
#custom-disk-games,
|
||||
#custom-disk-data,
|
||||
#custom-pixelbuds_pro,
|
||||
#custom-bluetooth-audio,
|
||||
#custom-btrfs,
|
||||
#custom-gpu-screen-recorder {
|
||||
border-radius: 10px;
|
||||
margin: 0px 2px;
|
||||
padding: 0px 10px;
|
||||
background-color: @base;
|
||||
color: @text;
|
||||
}
|
||||
|
||||
#wireplumber.muted, #custom-pixelbuds_pro, #custom-volume.muted, #custom-mic.muted {
|
||||
background-color: @base;
|
||||
color: @subtext1;
|
||||
border-bottom: 3px solid @subtext1;
|
||||
}
|
||||
|
||||
#custom-pixelbuds_pro.disconnected {
|
||||
padding-right: 10px;
|
||||
padding-left: 8px;
|
||||
}
|
||||
|
||||
#custom-gpu-screen-recorder,
|
||||
#custom-gpu-screen-recorder.recording {
|
||||
padding-right: 12px;
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
#custom-gamemode {
|
||||
padding-right: 9px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
#custom-pixelbuds_pro.anc-active {
|
||||
color: @sapphire;
|
||||
border-bottom: 3px solid @sapphire;
|
||||
}
|
||||
|
||||
#custom-bluetooth-audio {
|
||||
color: @sapphire;
|
||||
border-bottom: 3px solid @sapphire;
|
||||
}
|
||||
|
||||
#custom-pixelbuds_pro.anc-aware {
|
||||
color: @sapphire;
|
||||
border-bottom: 3px solid @sapphire;
|
||||
}
|
||||
|
||||
#custom-pixelbuds_pro.anc-off {
|
||||
color: @text;
|
||||
border-bottom: 3px solid @text;
|
||||
}
|
||||
|
||||
#custom-gpu-screen-recorder,
|
||||
#custom-gamemode {
|
||||
background-color: @base;
|
||||
color: @subtext1;
|
||||
border-bottom: 3px solid @subtext1;
|
||||
}
|
||||
|
||||
#custom-power {
|
||||
color: @maroon;
|
||||
}
|
||||
|
||||
#custom-gpu-screen-recorder.recording,
|
||||
#custom-gamemode.active {
|
||||
color: @maroon;
|
||||
border-bottom: 3px solid @maroon;
|
||||
}
|
||||
|
||||
#custom-tlp {
|
||||
padding: 0 10px;
|
||||
min-width: 10px;
|
||||
}
|
||||
|
||||
#custom-tlp.charging {
|
||||
color: @mauve;
|
||||
border-bottom: 3px solid @mauve;
|
||||
}
|
||||
|
||||
#custom-tlp.bat {
|
||||
color: @sapphire;
|
||||
border-bottom: 3px solid @sapphire;
|
||||
}
|
||||
|
||||
#custom-tlp.warning {
|
||||
color: @yellow;
|
||||
border-bottom: 3px solid @yellow;
|
||||
}
|
||||
|
||||
#custom-tlp.critical {
|
||||
color: @red;
|
||||
border-bottom: 3px solid @red;
|
||||
animation-name: blink;
|
||||
animation-duration: 0.8s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
background-color: @surface2;
|
||||
color: @text;
|
||||
}
|
||||
|
||||
/* --- Clock (Centered Pill) --- */
|
||||
#clock {
|
||||
color: @mauve;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* --- Power Status --- */
|
||||
#custom-power_status {
|
||||
font-weight: bold;
|
||||
}
|
||||
#custom-power_status.charging { color: @green; border-color: @green; }
|
||||
#custom-power_status.bat { color: @yellow; }
|
||||
#custom-power_status.warning { color: @peach; }
|
||||
#custom-power_status.critical {
|
||||
color: @red;
|
||||
border-color: @red;
|
||||
animation: blink 1s infinite alternate;
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
to {
|
||||
color: @yellow;
|
||||
border-bottom: 3px solid @yellow;
|
||||
opacity: 0.6;
|
||||
}
|
||||
to { background-color: alpha(@red, 0.4); }
|
||||
}
|
||||
|
||||
#custom-gpu.max,
|
||||
#custom-cpu.max,
|
||||
#custom-mem.max,
|
||||
#custom-btrfs.max,
|
||||
#custom-disk-root.max,
|
||||
#custom-disk-gdrive.max,
|
||||
#custom-disk-games.max,
|
||||
#custom-disk-data.max {
|
||||
color: @maroon;
|
||||
/* border-bottom: 3px solid @maroon; */
|
||||
}
|
||||
/* --- Hardware Metrics (Left Bottom) --- */
|
||||
#custom-sys { color: @teal; }
|
||||
#custom-cpu { color: @blue; }
|
||||
#custom-mem { color: @lavender; }
|
||||
#custom-network { color: @sapphire; }
|
||||
|
||||
#custom-gpu.high,
|
||||
#custom-gpu.high,
|
||||
#custom-cpu.high,
|
||||
#custom-mem.high,
|
||||
#custom-btrfs.high,
|
||||
#custom-disk-root.high,
|
||||
#custom-disk-gdrive.high,
|
||||
#custom-disk-games.high,
|
||||
#custom-disk-data.high {
|
||||
color: @yellow;
|
||||
/* border-bottom: 3px solid @yellow; */
|
||||
}
|
||||
#custom-cpu.high, #custom-mem.high { color: @yellow; }
|
||||
#custom-cpu.max, #custom-mem.max { color: @red; }
|
||||
|
||||
#memory,
|
||||
#cpu,
|
||||
#disk,
|
||||
#network,
|
||||
#custom-network,
|
||||
#custom-gpu.normal,
|
||||
#custom-cpu.normal,
|
||||
#custom-mem.normal,
|
||||
#custom-btrfs.normal,
|
||||
#custom-disk-root.normal,
|
||||
#custom-disk-gdrive.normal,
|
||||
#custom-disk-games.normal,
|
||||
#custom-disk-data.normal {
|
||||
color: @blue;
|
||||
/* border-bottom: 3px solid @mauve; */
|
||||
}
|
||||
/* --- Center Bottom Utilities --- */
|
||||
#custom-gamemode { color: @yellow; }
|
||||
#custom-gamemode.active { color: @red; border-color: @red; }
|
||||
|
||||
/* --- Right Bottom Controls --- */
|
||||
#custom-disk-root { color: @sky; }
|
||||
#custom-volume { color: @mauve; }
|
||||
#custom-mic { color: @flamingo; }
|
||||
#custom-volume.muted, #custom-mic.muted { color: @overlay0; }
|
||||
|
||||
#backlight {
|
||||
color: @mauve;
|
||||
}
|
||||
|
||||
#custom-volume.muted, #custom-mic.muted {
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
#custom-volume.unmuted, #custom-mic.unmuted, #wireplumber {
|
||||
color: @mauve;
|
||||
border-bottom: 3px solid @mauve;
|
||||
}
|
||||
|
||||
#clock {
|
||||
color: @mauve;
|
||||
}
|
||||
|
||||
#network {
|
||||
}
|
||||
#custom-bluetooth-audio { color: @blue; }
|
||||
|
||||
/* --- Tooltip --- */
|
||||
tooltip {
|
||||
border-radius: 10px;
|
||||
padding: 9px;
|
||||
background-color: @base;
|
||||
background-color: alpha(@base, 0.95);
|
||||
border: 1px solid @surface1;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
tooltip label {
|
||||
padding: 5px;
|
||||
background-color: @base;
|
||||
color: @text;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user