Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

Commit 41fb7bb

Browse files
committed
Auto
1 parent 7be3dd6 commit 41fb7bb

File tree

10 files changed

+197
-170
lines changed

10 files changed

+197
-170
lines changed

config/cava/config

Lines changed: 10 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -89,21 +89,17 @@ style = mono
8989

9090

9191

92-
# [color]
93-
94-
# # Colors can be one of seven predefined: black, blue, cyan, green, magenta, red, white, yellow.
95-
# # Or defined by hex code '#xxxxxx' (hex code must be within ''). User defined colors requires a
96-
# # terminal that can change color definitions such as Gnome-terminal or rxvt.
97-
# ; background = black
98-
# ; foreground = cyan
99-
100-
# # Gradient mode, only hex defined colors are supported, background must also be defined in hex
101-
# # or remain commented out. 1 = on, 0 = off. Warning: for certain terminal emulators cava will
102-
# # not able to restore color definitions on exit, simply restart your terminal to restore colors.
103-
# gradient = 1
104-
# gradient_color_1 = '#0099ff'
105-
# gradient_color_2 = '#ff3399'
92+
[color]
93+
gradient = 1
10694

95+
gradient_color_1 = '#94e2d5'
96+
gradient_color_2 = '#89dceb'
97+
gradient_color_3 = '#74c7ec'
98+
gradient_color_4 = '#89b4fa'
99+
gradient_color_5 = '#cba6f7'
100+
gradient_color_6 = '#f5c2e7'
101+
gradient_color_7 = '#eba0ac'
102+
gradient_color_8 = '#f38ba8'
107103

108104

109105
[smoothing]
@@ -148,17 +144,3 @@ style = mono
148144
#gradient_color_4 = '#ebbcba'
149145
#gradient_color_5 = '#f6c177'
150146
#gradient_color_6 = '#eb6f92'
151-
152-
[color]
153-
154-
gradient = 1
155-
156-
gradient_count = 8
157-
gradient_color_1 = '#87ADFF'
158-
gradient_color_2 = '#86A9F2'
159-
gradient_color_3 = '#8EAEF3'
160-
gradient_color_4 = '#91AEEC'
161-
gradient_color_5 = '#9DB8F2'
162-
gradient_color_6 = '#9FB7EA'
163-
gradient_color_7 = '#A9BEEE'
164-
gradient_color_8 = '#AFC3EE'
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
#version 330
2+
3+
in vec2 fragCoord;
4+
out vec4 fragColor;
5+
6+
// bar values. defaults to left channels first (low to high), then right (high
7+
// to low).
8+
uniform float bars[512];
9+
10+
uniform int bars_count; // number of bars (left + right) (configurable)
11+
uniform int bar_width; // bar width (configurable), not used here
12+
uniform int bar_spacing; // space bewteen bars (configurable)
13+
14+
uniform vec3 u_resolution; // window resolution
15+
16+
// colors, configurable in cava config file (r,g,b) (0.0 - 1.0)
17+
uniform vec3 bg_color; // background color
18+
uniform vec3 fg_color; // foreground color
19+
20+
uniform int gradient_count;
21+
uniform vec3 gradient_colors[8]; // gradient colors
22+
23+
uniform sampler2D inputTexture; // Texture from the first render pass
24+
25+
vec3 normalize_C(float y, vec3 col_1, vec3 col_2, float y_min, float y_max) {
26+
// create color based on fraction of this color and next color
27+
float yr = (y - y_min) / (y_max - y_min);
28+
return col_1 * (1.0 - yr) + col_2 * yr;
29+
}
30+
31+
void main() {
32+
// find which bar to use based on where we are on the y axis
33+
int bar = int(bars_count * fragCoord.y);
34+
float y = bars[bar];
35+
float band_size = 1.0 / float(bars_count);
36+
float current_band_min = bar * band_size;
37+
float current_band_max = (bar + 1) * band_size;
38+
39+
int hist_length = 512;
40+
float win_size = 1.0 / hist_length;
41+
42+
if (fragCoord.x > 1.0 - win_size) {
43+
44+
if (fragCoord.y > current_band_min && fragCoord.y < current_band_max) {
45+
46+
fragColor = vec4(fg_color * y, 1.0);
47+
}
48+
} else {
49+
vec2 offsetCoord = fragCoord;
50+
offsetCoord.x += float(win_size);
51+
fragColor = texture(inputTexture, offsetCoord);
52+
}
53+
}
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
#version 330
2+
3+
// Emulate the "line style" spectrum analyzer from Winamp 2.
4+
// Try this config for a demonstration:
5+
6+
/*
7+
[general]
8+
bar_width = 2
9+
bar_spacing = 0
10+
higher_cutoff_freq = 22000
11+
12+
[output]
13+
method = sdl_glsl
14+
channels = mono
15+
fragment_shader = winamp_line_style_spectrum.frag
16+
17+
[color]
18+
background = '#000000'
19+
gradient = 1
20+
gradient_color_1 = '#319C08'
21+
gradient_color_2 = '#29CE10'
22+
gradient_color_3 = '#BDDE29'
23+
gradient_color_4 = '#DEA518'
24+
gradient_color_5 = '#D66600'
25+
gradient_color_6 = '#CE2910'
26+
27+
[smoothing]
28+
noise_reduction = 10
29+
*/
30+
31+
in vec2 fragCoord;
32+
out vec4 fragColor;
33+
34+
// bar values. defaults to left channels first (low to high), then right (high to low).
35+
uniform float bars[512];
36+
37+
uniform int bars_count; // number of bars (left + right) (configurable)
38+
uniform int bar_width; // bar width (configurable), not used here
39+
uniform int bar_spacing; // space bewteen bars (configurable)
40+
41+
uniform vec3 u_resolution; // window resolution
42+
43+
//colors, configurable in cava config file (r,g,b) (0.0 - 1.0)
44+
uniform vec3 bg_color; // background color
45+
uniform vec3 fg_color; // foreground color
46+
47+
uniform int gradient_count;
48+
uniform vec3 gradient_colors[8]; // gradient colors
49+
50+
vec3 normalize_C(float y,vec3 col_1, vec3 col_2, float y_min, float y_max)
51+
{
52+
//create color based on fraction of this color and next color
53+
float yr = (y - y_min) / (y_max - y_min);
54+
return col_1 * (1.0 - yr) + col_2 * yr;
55+
}
56+
57+
void main()
58+
{
59+
// find which bar to use based on where we are on the x axis
60+
float x = u_resolution.x * fragCoord.x;
61+
int bar = int(bars_count * fragCoord.x);
62+
63+
//calculate a bar size
64+
float bar_size = u_resolution.x / bars_count;
65+
66+
//the y coordinate is stretched by 4X to resemble Winamp
67+
float y = min(bars[bar] * 4.0, 1.0);
68+
69+
// make sure there is a thin line at bottom
70+
if (y * u_resolution.y < 1.0)
71+
{
72+
y = 1.0 / u_resolution.y;
73+
}
74+
75+
vec4 bar_color;
76+
77+
if (gradient_count == 0)
78+
{
79+
bar_color = vec4(fg_color,1.0);
80+
}
81+
else
82+
{
83+
//find color in the configured gradient for the top of the bar
84+
int color = int((gradient_count - 1) * y);
85+
86+
//find where on y this and next color is supposed to be
87+
float y_min = float(color) / (gradient_count - 1.0);
88+
float y_max = float(color + 1) / (gradient_count - 1.0);
89+
90+
//make a solid color for the entire bar
91+
bar_color = vec4(normalize_C(y, gradient_colors[color], gradient_colors[color + 1], y_min, y_max), 1.0);
92+
}
93+
94+
95+
//draw the bar up to current height
96+
if (y > fragCoord.y)
97+
{
98+
//make some space between bars based on settings
99+
if (x > (bar + 1) * (bar_size) - bar_spacing)
100+
{
101+
fragColor = vec4(bg_color,1.0);
102+
}
103+
else
104+
{
105+
fragColor = bar_color;
106+
}
107+
}
108+
else
109+
{
110+
fragColor = vec4(bg_color,1.0);
111+
}
112+
}

config/hypr/settings.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ $GapsOut = 0 #13
5656
#----------------------------------
5757

5858
# Blur Size
59-
$BlurSize = 7
59+
$BlurSize = 6
6060
# Blur Passes
6161
$BlurPasses = 4
6262
# Frosted Glass

config/hypr/source/bind.conf

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,17 @@
2828
bind = ALT, TAB, togglefloating,
2929
# rofi(search)
3030
bind = $mainMod, SPACE, exec, $Launcher
31-
# float(2)
32-
bind = $mainMod, P, pseudo,
3331
# toggle split
3432
bind = $mainMod, J, togglesplit,
3533
# ScreenShot
3634
bind = $mainMod SHIFT, S, exec, bash /home/arch/.config/hypr/scripts/screen_cut.sh
3735
# clash
3836
bind = $mainMod ALT, C, exec, /home/arch/.config/hypr/scripts/clash.sh
3937
bind = $mainMod, C, exec, /home/arch/.config/hypr/scripts/clashon.sh
40-
# brightness
41-
bind = CTRL, F2, exec, brightnessctl set 10%+
4238
# volume
39+
bind = CTRL, F4, exec, pulsemixer --toggle-mute && notify-send 静音 已切换静音
4340
bind = CTRL, F5, exec, amixer set Master 10%- && bash /home/arch/.config/hypr/scripts/volume
4441
bind = CTRL, F6, exec, amixer set Master 10%+ && bash /home/arch/.config/hypr/scripts/volume
45-
bind = CTRL, F4, exec, pulsemixer --toggle-mute && notify-send 静音 已切换静音
4642
# fullscreen
4743
bind = CTRL, F11, fullscreen,
4844
# change theme

config/waybar/config.jsonc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,13 @@
9898
"transition-left-to-right": false
9999
},
100100
"modules": [
101-
"custom/tray-collapsed",
101+
// "custom/tray-collapsed",
102102
"tray"
103103
]
104104
},
105105
"pulseaudio": {
106106
"format": "{icon} {volume}%",
107-
"format-muted": "[MUTED]",
107+
"format-muted": " 0%",
108108
"format-icons": {
109109
"default": [
110110
"󰕿",

config/waybar/style.css

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
border-radius: 0px;
55
font-family:
66
Liga SFMono Nerd Font,
7-
FiraCode Nerd Font;
7+
FiraCode Nerd Font,
8+
MiSans VF;
89
font-size: 14px;
910
font-style: normal;
1011
min-height: 0;
@@ -26,7 +27,6 @@
2627
}
2728

2829
#custom-tray-collapsed,
29-
#custom-pacman,
3030
#custom-Backup {
3131
font-size: 18px;
3232
margin: 5px;
@@ -82,7 +82,7 @@ window#waybar {
8282
#workspaces {
8383
margin: 5px 5px 5px 2px;
8484
background: @seccolor;
85-
padding: 0px 5px 0px 5px;
85+
padding: 0px 7px 0px 7px;
8686
border-radius: 14px;
8787
border: 1px solid @secborder;
8888
font-weight: normal;
@@ -117,6 +117,7 @@ window#waybar {
117117
padding: 0px 5px;
118118
border-radius: 30px;
119119
color: #6c7086;
120+
font-weight: bold;
120121
}
121122

122123
#workspaces button.active {

config/wezterm/wezterm.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ local wezterm = require("wezterm")
22
return {
33
font_size = 13,
44
font = wezterm.font_with_fallback({
5+
{ family = "CaskaydiaCove Nerd Font" },
56
{ family = "FiraCode Nerd Font" },
67
{ family = "Apple Color Emoji" },
78
{ family = "MiSans VF", weight = "Medium" },
@@ -23,7 +24,7 @@ return {
2324
bottom = 30,
2425
},
2526
line_height = 1.3,
26-
cell_width = 0.9,
27+
-- cell_width = 0.9,
2728
adjust_window_size_when_changing_font_size = false,
2829
enable_wayland = true,
2930
freetype_load_flags = "NO_HINTING|NO_AUTOHINT",

home/.zshrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ eval "$(thefuck --alias)"
101101
# Starship Init
102102
eval "$(starship init zsh)"
103103

104+
# Direnv Init
105+
# eval "$(direnv hook zsh)"
106+
104107
# Prompt Init
105108
# . ~/.oh-my-zsh/custom/themes/jovial.zsh-theme
106109

0 commit comments

Comments
 (0)