This commit is contained in:
2025-11-15 00:24:42 +01:00
parent c9076b74ab
commit 0c673bc923
9 changed files with 410 additions and 15 deletions

View File

@@ -69,7 +69,7 @@ def stow(pkg: str):
def switch(session: str): def switch(session: str):
subprocess.run(["~/.local/scripts/config-switch", session], check=True) subprocess.run([str(Path("~/.local/scripts/config-switch").expanduser()), session], check=True)
def main(): def main():

View File

@@ -0,0 +1,383 @@
### MangoHud configuration file
### Uncomment any options you wish to enable. Default options are left uncommented
### Use some_parameter=0 to disable a parameter (only works with on/off parameters)
### Everything below can be used / overridden with the environment variable MANGOHUD_CONFIG instead
################ INFORMATIONAL #################
## prints possible options on stdout
# help
################ PERFORMANCE #################
### Limit the application FPS. Comma-separated list of one or more FPS values (e.g. 0,30,60). 0 means unlimited (unless VSynced)
# fps_limit=0
### early = wait before present, late = wait after present
# fps_limit_method=
### VSync [0-3] 0 = adaptive; 1 = off; 2 = mailbox; 3 = on
# vsync=-1
### OpenGL VSync [0-N] 0 = off; >=1 = wait for N v-blanks, N > 1 acts as a FPS limiter (FPS = display refresh rate / N)
# gl_vsync=-2
### Mip-map LoD bias. Negative values will increase texture sharpness (and aliasing)
## Positive values will increase texture blurriness (-16 to 16)
# picmip=-17
### Anisotropic filtering level. Improves sharpness of textures viewed at an angle (0 to 16)
# af=-1
### Force bicubic filtering
# bicubic
### Force trilinear filtering
# trilinear
### Disable linear texture filtering. Makes textures look blocky
# retro
################### VISUAL ###################
### Legacy layout
# legacy_layout=0
### pre defined presets
# -1 = default
# 0 = no display
# 1 = fps only
# 2 = horizontal view
# 3 = extended
# 4 = high detailed information
# preset=-1
### Enable most of the toggleable parameters (currently excludes `histogram`)
# full
### Show FPS only. ***Not meant to be used with other display params***
# fps_only
### Display custom centered text, useful for a header
# custom_text_center=
### Display the current system time
# time
## removes the time label
# time_no_label
### Time formatting examples
## %H:%M
## [ %T %F ]
## %X # locally formatted time, because of limited glyph range, missing characters may show as '?' (e.g. Japanese)
# time_format="%T"
### Display MangoHud version
# version
### Display the current GPU information
## Note: gpu_mem_clock and gpu_mem_temp also need "vram" to be enabled
gpu_stats
# gpu_temp
# gpu_junction_temp
# gpu_core_clock
# gpu_mem_temp
# gpu_mem_clock
gpu_power
gpu_text=GPU0-I,GPU1-D
gpu_load_change
gpu_load_value=60,90
gpu_load_color=39F900,FDFD09,FF0000
## GPU fan in rpm on AMD, FAN in percent on NVIDIA
# gpu_fan
## gpu_voltage only works on AMD GPUs
# gpu_voltage
## Select list of GPUs to display
# gpu_list=0,1
### Display the current CPU information
cpu_stats
# cpu_temp
cpu_power
# cpu_text=
# cpu_mhz
cpu_load_change
cpu_load_value=60,90
cpu_load_color=39F900,FDFD09,FF0000
### Display the current CPU load & frequency for each core
# core_load
# core_load_change
# core_bars
### Display IO read and write for the app (not system)
# io_read
# io_write
### Display system vram / ram / swap space usage
# vram
# ram
# swap
### Display per process memory usage
## Show resident memory and other types, if enabled
procmem
# procmem_shared
# procmem_virt
### Display battery information
# battery
# battery_icon
# device_battery=gamepad,mouse
# device_battery_icon
# battery_watt
# battery_time
### Display FPS and frametime
fps
# fps_sampling_period=500
fps_color_change
fps_value=30,60
fps_color=B22222,FDFD09,39F900
# fps_text=""
frametime
# frame_count
## fps_metrics takes a list of decimal values or the value avg
# fps_metrics=0.01,0.001
fps_metrics=avg,0.01,0.001
### Display GPU throttling status based on Power, current, temp or "other"
## Only shows if throttling is currently happening
# throttling_status
## Same as throttling_status but displays throttling on the frametime graph
# throttling_status_graph
### Display miscellaneous information
# engine_version
# engine_short_names
# gpu_name
# vulkan_driver
# wine
# exec_name
# winesync
# present_mode
### Display loaded MangoHud architecture
# arch
### Display the frametime line graph
frame_timing
# frame_timing_detailed
# dynamic_frame_timing
# histogram
### Display GameMode / vkBasalt running status
# gamemode
# vkbasalt
### Gamescope related options
## Display the status of FSR (only works in gamescope)
# fsr
## Hides the sharpness info for the `fsr` option (only available in gamescope)
# hide_fsr_sharpness
## Shows the graph of gamescope app frametimes and latency (only on gamescope obviously)
# debug
## Display the status of HDR (only works in gamescope)
# hdr
## Display the current refresh rate (only works in gamescope)
# refresh_rate
### graphs displays one or more graphs that you chose
## separated by ",", available graphs are
## gpu_load,cpu_load,gpu_core_clock,gpu_mem_clock,vram,ram,cpu_temp,gpu_temp
# graphs=
### mangoapp related options
## Enables mangoapp to be displayed above the Steam UI
# mangoapp_steam
### Steam Deck options
## Shows the Steam Deck fan rpm
# fan
### Display current FPS limit
# show_fps_limit
### Display the current resolution
# resolution
### Display current display session
# display_server
### Display temperature in fahrenheit
# temp_fahrenheit
### Display custom text
# custom_text=
### Display output of Bash command in next column
# exec=
### Display media player metadata
# media_player
## for example spotify
# media_player_name=
## Format metadata, lines are delimited by ; (wip)
## example: {title};{artist};{album}
## example: Track:;{title};By:;{artist};From:;{album}
# media_player_format=title,artist,album
### Network interface throughput
# network
## Network can take arguments but it's not required.
## without arguments it shows all interfaces
## arguments set which interfaces will be displayed
# network=eth0,wlo1
### Change the hud font size
# font_size=24
# font_scale=1.0
# font_size_text=24
# font_scale_media_player=0.55
# no_small_font
### Change default font (set location to TTF/OTF file)
## Set font for the whole hud
# font_file=
## Set font only for text like media player metadata
# font_file_text=
## Set font glyph ranges. Defaults to Latin-only. Don't forget to set font_file/font_file_text to font that supports these
## Probably don't enable all at once because of memory usage and hardware limits concerns
## If you experience crashes or text is just squares, reduce glyph range or reduce font size
# font_glyph_ranges=korean,chinese,chinese_simplified,japanese,cyrillic,thai,vietnamese,latin_ext_a,latin_ext_b
### Outline text
text_outline
# text_outline_color = 000000
# text_outline_thickness = 1.5
### Change the hud position
# position=top-left
### Change the corner roundness
# round_corners=0
### Remove margins around MangoHud
# hud_no_margin
### Display compact version of MangoHud
# hud_compact
### Display MangoHud in a horizontal position
# horizontal
# horizontal_stretch
### Disable / hide the hud by default
# no_display
### Show FEX-Emu statistics
## Only useful for Arm64 devices running applications under emulation
# fex_stats
### Hud position offset
# offset_x=0
# offset_y=0
### Hud dimensions
# width=0
# height=140
# table_columns=3
# cellpadding_y=-0.085
### Hud transparency / alpha
# background_alpha=0.5
# alpha=1.0
### FCAT overlay
### This enables an FCAT overlay to perform frametime analysis on the final image stream.
### Enable the overlay
# fcat
### Set the width of the FCAT overlay.
### 24 is a performance optimization on AMD GPUs that should not have adverse effects on nVidia GPUs.
### A minimum of 20 pixels is recommended by nVidia.
# fcat_overlay_width=24
### Set the screen edge, this can be useful for special displays that don't update from top edge to bottom. This goes from 0 (left side) to 3 (top edge), counter-clockwise.
# fcat_screen_edge=0
### Color customization
# text_color=FFFFFF
# gpu_color=2E9762
# cpu_color=2E97CB
# vram_color=AD64C1
# ram_color=C26693
# engine_color=EB5B5B
# io_color=A491D3
# frametime_color=00FF00
# background_color=020202
# media_player_color=FFFFFF
# wine_color=EB5B5B
# battery_color=FF9078
# network_color=E07B85
### Specify GPU with PCI bus ID
### Set to 'domain:bus:slot.function'
### Example:
### $ lspci | grep A770
### 03:00.0 VGA compatible controller: Intel Corporation DG2 [Arc A770] (rev 08)
# pci_dev=0000:03:00.0
### Blacklist
# blacklist=
### Control over socket
### Enable and set socket name, '%p' is replaced with process id
## example: mangohud
## example: mangohud-%p
# control = -1
################ WORKAROUNDS #################
### Options starting with "gl_*" are for OpenGL
### Specify what to use for getting display size. Options are "viewport", "scissorbox" or disabled. Defaults to using glXQueryDrawable
# gl_size_query=viewport
### (Re)bind given framebuffer before MangoHud gets drawn. Helps with Crusader Kings III
# gl_bind_framebuffer=0
### Don't swap origin if using GL_UPPER_LEFT. Helps with Ryujinx
# gl_dont_flip=1
################ INTERACTION #################
### Change toggle keybinds for the hud & logging
# toggle_hud=Shift_R+F12
# toggle_hud_position=Shift_R+F11
# toggle_preset=Shift_R+F10
# toggle_fps_limit=Shift_L+F1
# toggle_logging=Shift_L+F2
# reload_cfg=Shift_L+F4
# upload_log=Shift_L+F3
# reset_fps_metrics=Shift_R+f9
#################### LOG #####################
### Automatically start the log after X seconds
# autostart_log=
### Set amount of time in seconds that the logging will run for
# log_duration=
### Change the default log interval, 0 is default
# log_interval=0
### Set location of the output files (required for logging)
# output_folder=/home/<USERNAME>/mangologs
### Permit uploading logs directly to FlightlessMango.com
## set to 1 to enable
# permit_upload=0
### Define a '+'-separated list of percentiles shown in the benchmark results
### Use "AVG" to get a mean average. Default percentiles are 97+AVG+1+0.1
## example: ['97', 'AVG', '1', '0.1']
# benchmark_percentiles=97,AVG
## Adds more headers and information such as versioning to the log. This format is not supported on flightlessmango.com (yet)
# log_versioning
## Enable automatic uploads of logs to flightlessmango.com
# upload_logs
# output_file=""

View File

@@ -46,9 +46,6 @@ output "eDP-2" {
backdrop-color "#1e1e2e" backdrop-color "#1e1e2e"
} }
output "HDMI-A-1" {
}
/************************Layout************************/ /************************Layout************************/
@@ -169,7 +166,7 @@ environment {
// Themes // Themes
QT_QPA_PLATFORM "wayland" QT_QPA_PLATFORM "wayland"
QT_QPA_PLATFORMTHEME "kde" QT_QPA_PLATFORMTHEME "kde"
QT_STYLE_OVERRIDE "Breeze" QT_STYLE_OVERRIDE "Kvantum"
// Nvidia // Nvidia
LIBVA_DRIVER_NAME "nvidia" LIBVA_DRIVER_NAME "nvidia"
@@ -263,6 +260,15 @@ window-rule {
open-on-workspace "second" open-on-workspace "second"
} }
window-rule {
match app-id="at.yrlf.wl_mirror"
// default-column-width { proportion 1.0; }
open-floating true
// open-maximized-to-edges true
// open-on-output "HDMI-A-1"
}
// I love round corners // I love round corners
window-rule { window-rule {
geometry-corner-radius 14 geometry-corner-radius 14
@@ -303,8 +309,8 @@ binds {
Mod+Return { spawn "kitty"; } Mod+Return { spawn "kitty"; }
Mod+Shift+T { spawn "ghostty"; } Mod+Shift+T { spawn "ghostty"; }
Mod+Shift+Return { spawn "ghostty"; } Mod+Shift+Return { spawn "ghostty"; }
Mod+Shift+W { spawn-sh "QT_STYLE_OVERRIDE=Kvantum wallpaper-carousel"; } Mod+Shift+W { spawn-sh "wallpaper-carousel"; }
Mod+P { spawn-sh "pkill -x -n pwvucontrol || pwvucontrol"; } Mod+O { spawn-sh "pkill -x -n pwvucontrol || pwvucontrol"; }
Mod+Shift+E { spawn "sunset"; } Mod+Shift+E { spawn "sunset"; }
// Quickshell // Quickshell
@@ -444,4 +450,6 @@ binds {
Mod+M allow-inhibiting=false { quit; } Mod+M allow-inhibiting=false { quit; }
Mod+Shift+P { spawn-sh "(hyprlock &) && niri msg action power-off-monitors"; } Mod+Shift+P { spawn-sh "(hyprlock &) && niri msg action power-off-monitors"; }
Mod+P repeat=false { spawn-sh "wl-mirror $(niri msg --json focused-output | jq -r .name)"; }
} }

View File

@@ -11,6 +11,7 @@ Item {
property int count: 6 property int count: 6
property int barWidth: 5 property int barWidth: 5
property int barSpacing: 3 property int barSpacing: 3
property bool forceEnable: false
implicitWidth: root.barWidth * root.count + root.barSpacing * (root.count - 1) implicitWidth: root.barWidth * root.count + root.barSpacing * (root.count - 1)
implicitHeight: parent.height - 10 implicitHeight: parent.height - 10
@@ -19,6 +20,7 @@ Item {
id: cavaProcess id: cavaProcess
count: root.count count: root.count
forceEnable: root.forceEnable
} }
RowLayout { RowLayout {
@@ -55,12 +57,14 @@ Item {
anchors.fill: parent anchors.fill: parent
hoverEnabled: true hoverEnabled: true
cursorShape: Qt.PointingHandCursor cursorShape: Qt.PointingHandCursor
acceptedButtons: Qt.LeftButton | Qt.RightButton acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton
onClicked: (mouse) => { onClicked: (mouse) => {
if (mouse.button === Qt.LeftButton) if (mouse.button === Qt.LeftButton)
MusicManager.playPause(); MusicManager.playPause();
else if (mouse.button === Qt.RightButton) else if (mouse.button === Qt.RightButton)
SettingsService.showLyricsBar = !SettingsService.showLyricsBar; SettingsService.showLyricsBar = !SettingsService.showLyricsBar;
else if (mouse.button === Qt.MiddleButton)
root.forceEnable = !root.forceEnable;
} }
onWheel: function(wheel) { onWheel: function(wheel) {
if (wheel.angleDelta.y > 0) if (wheel.angleDelta.y > 0)

View File

@@ -31,12 +31,13 @@ Scope {
} }
}) })
property var values: Array(count).fill(0) property var values: Array(count).fill(0)
property bool forceEnable: false
Process { Process {
id: process id: process
stdinEnabled: true stdinEnabled: true
running: !MusicManager.isAllPaused() running: root.forceEnable || !MusicManager.isAllPaused()
command: ["cava", "-p", "/dev/stdin"] command: ["cava", "-p", "/dev/stdin"]
onExited: { onExited: {
stdinEnabled = true; stdinEnabled = true;

View File

@@ -47,7 +47,7 @@ SCRIPTS = {
"quickshell": [CONFIG_DIR / "quickshell" / "apply-color"], "quickshell": [CONFIG_DIR / "quickshell" / "apply-color"],
"rofi": [CONFIG_DIR / "rofi" / "apply-color"], "rofi": [CONFIG_DIR / "rofi" / "apply-color"],
"waybar": [CONFIG_DIR / "waybar" / "apply-color"], "waybar": [CONFIG_DIR / "waybar" / "apply-color"],
"wlogout": [CONFIG_DIR / "wlogout" / "apply-color", CONFIG_DIR / "wlogout-niri" / "apply-color"], "wlogout": [CONFIG_DIR / ".alt" / "wlogout-default" / "apply-color", CONFIG_DIR / ".alt" / "wlogout-niri" / "apply-color"],
"yazi": [CONFIG_DIR / "yazi" / "apply-color"], "yazi": [CONFIG_DIR / "yazi" / "apply-color"],
} }
# or simply `find ${CONFIG_DIR} -type f -iname 'apply-color*'` to get all available scripts, # or simply `find ${CONFIG_DIR} -type f -iname 'apply-color*'` to get all available scripts,

View File

@@ -1,14 +1,14 @@
不在 KDE 中运行 Dolphin 时前景色可能会很奇怪,在 .config/dolphinrc 中指定颜色主题可以解决: 不在 Plasma 中运行 Dolphin 时前景色可能会很奇怪,在 .config/dolphinrc 中指定颜色主题可以解决:
```conf ```conf
[UiSettigs] [UiSettings]
ColorScheme=<name> ColorScheme=<name>
``` ```
例如<s>大家都喜欢的</s>猫布奇-抹茶-蓝 例如<s>大家都喜欢的</s>猫布奇-抹茶-蓝
```conf ```conf
[UiSettigs] [UiSettings]
ColorScheme=Catppuccin Mocha Blue ColorScheme=Catppuccin Mocha Blue
``` ```

View File

@@ -9,6 +9,4 @@ A b 单词后移
C u 从光标位置到行首删除 C u 从光标位置到行首删除
C k 从光标位置到行末删除 C k 从光标位置到行末删除
A c 大小写切换
A s sudo A s sudo

View File

@@ -23,6 +23,7 @@ NFS 允许将文件系统挂载到远程主机上。
安装后: 安装后:
1) 服务端: 1) 服务端:
aecho "/path/to/share *(rw,no_subtree_check,async)" | sudo tee -a /etc/exports aecho "/path/to/share *(rw,no_subtree_check,async)" | sudo tee -a /etc/exports
或更精确的权限控制
b) systemctl 启动 nfs-server 服务 b) systemctl 启动 nfs-server 服务
2) 客户端 2) 客户端
a) sudo mount -t nfs -o vers=4,noatime,async 100.x.y.z:/path/to/share /path/to/mount a) sudo mount -t nfs -o vers=4,noatime,async 100.x.y.z:/path/to/share /path/to/mount