back to ghostty
This commit is contained in:
@@ -47,7 +47,7 @@ https://github.com/user-attachments/assets/1fd0f3be-e83f-4d1c-9e4f-16cc77e3981b
|
||||
- Bar: ~~Waybar~~ | **Quickshell**
|
||||
- Shell: (bash & fish) | **Zsh**
|
||||
- Prompt: Oh My Posh | **Starship**
|
||||
- Terminal: **Kitty** & (**WezTerm** | Ghostty)
|
||||
- Terminal: **Kitty** & (WezTerm | **Ghostty**)
|
||||
- Power Menu: **Wlogout** & Quickshell
|
||||
- Colorscheme: **Catppuccin Mocha**
|
||||
- App Launcher: **Rofi** | ~~Fuzzel~~
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
shaders
|
||||
@@ -0,0 +1,30 @@
|
||||
theme = Catppuccin Mocha
|
||||
|
||||
background-opacity = 0.95
|
||||
background-blur = true
|
||||
|
||||
window-padding-x = 10
|
||||
window-padding-y = 10
|
||||
|
||||
window-width = 100
|
||||
window-height = 36
|
||||
|
||||
keybind = ctrl+shift+r=reload_config
|
||||
|
||||
keybind = ctrl+shift+h=write_screen_file:copy
|
||||
keybind = ctrl+shift+j=text:ghostty-capture\n
|
||||
keybind = ctrl+enter=unbind
|
||||
|
||||
command = exec /bin/zsh
|
||||
|
||||
confirm-close-surface = false
|
||||
|
||||
font-family = monospace
|
||||
font-size = 12
|
||||
|
||||
cursor-style = bar
|
||||
adjust-cursor-thickness = 3
|
||||
|
||||
custom-shader = cursor-shaders/cursor-smear.glsl
|
||||
|
||||
quit-after-last-window-closed = false
|
||||
@@ -0,0 +1,120 @@
|
||||
// https://github.com/KroneCorylus/ghostty-shader-playground/blob/main/shaders/cursor_smear.glsl
|
||||
|
||||
float getSdfRectangle(in vec2 p, in vec2 xy, in vec2 b)
|
||||
{
|
||||
vec2 d = abs(p - xy) - b;
|
||||
return length(max(d, 0.0)) + min(max(d.x, d.y), 0.0);
|
||||
}
|
||||
|
||||
// Based on Inigo Quilez's 2D distance functions article: https://iquilezles.org/articles/distfunctions2d/
|
||||
// Potencially optimized by eliminating conditionals and loops to enhance performance and reduce branching
|
||||
|
||||
float seg(in vec2 p, in vec2 a, in vec2 b, inout float s, float d) {
|
||||
vec2 e = b - a;
|
||||
vec2 w = p - a;
|
||||
vec2 proj = a + e * clamp(dot(w, e) / dot(e, e), 0.0, 1.0);
|
||||
float segd = dot(p - proj, p - proj);
|
||||
d = min(d, segd);
|
||||
|
||||
float c0 = step(0.0, p.y - a.y);
|
||||
float c1 = 1.0 - step(0.0, p.y - b.y);
|
||||
float c2 = 1.0 - step(0.0, e.x * w.y - e.y * w.x);
|
||||
float allCond = c0 * c1 * c2;
|
||||
float noneCond = (1.0 - c0) * (1.0 - c1) * (1.0 - c2);
|
||||
float flip = mix(1.0, -1.0, step(0.5, allCond + noneCond));
|
||||
s *= flip;
|
||||
return d;
|
||||
}
|
||||
|
||||
float getSdfParallelogram(in vec2 p, in vec2 v0, in vec2 v1, in vec2 v2, in vec2 v3) {
|
||||
float s = 1.0;
|
||||
float d = dot(p - v0, p - v0);
|
||||
|
||||
d = seg(p, v0, v3, s, d);
|
||||
d = seg(p, v1, v0, s, d);
|
||||
d = seg(p, v2, v1, s, d);
|
||||
d = seg(p, v3, v2, s, d);
|
||||
|
||||
return s * sqrt(d);
|
||||
}
|
||||
|
||||
vec2 normalize(vec2 value, float isPosition) {
|
||||
return (value * 2.0 - (iResolution.xy * isPosition)) / iResolution.y;
|
||||
}
|
||||
|
||||
float antialising(float distance) {
|
||||
return 1. - smoothstep(0., normalize(vec2(2., 2.), 0.).x, distance);
|
||||
}
|
||||
|
||||
float determineStartVertexFactor(vec2 a, vec2 b) {
|
||||
// Conditions using step
|
||||
float condition1 = step(b.x, a.x) * step(a.y, b.y); // a.x < b.x && a.y > b.y
|
||||
float condition2 = step(a.x, b.x) * step(b.y, a.y); // a.x > b.x && a.y < b.y
|
||||
|
||||
// If neither condition is met, return 1 (else case)
|
||||
return 1.0 - max(condition1, condition2);
|
||||
}
|
||||
|
||||
vec2 getRectangleCenter(vec4 rectangle) {
|
||||
return vec2(rectangle.x + (rectangle.z / 2.), rectangle.y - (rectangle.w / 2.));
|
||||
}
|
||||
float ease(float x) {
|
||||
return pow(1.0 - x, 3.0);
|
||||
}
|
||||
vec4 saturate(vec4 color, float factor) {
|
||||
float gray = dot(color, vec4(0.299, 0.587, 0.114, 0.)); // luminance
|
||||
return mix(vec4(gray), color, factor);
|
||||
}
|
||||
|
||||
vec4 TRAIL_COLOR = iCurrentCursorColor;
|
||||
const float OPACITY = 0.6;
|
||||
const float DURATION = 0.3; //IN SECONDS
|
||||
|
||||
void mainImage(out vec4 fragColor, in vec2 fragCoord)
|
||||
{
|
||||
|
||||
#if !defined(WEB)
|
||||
fragColor = texture(iChannel0, fragCoord.xy / iResolution.xy);
|
||||
#endif
|
||||
// Normalization for fragCoord to a space of -1 to 1;
|
||||
vec2 vu = normalize(fragCoord, 1.);
|
||||
vec2 offsetFactor = vec2(-.5, 0.5);
|
||||
|
||||
// Normalization for cursor position and size;
|
||||
// cursor xy has the postion in a space of -1 to 1;
|
||||
// zw has the width and height
|
||||
vec4 currentCursor = vec4(normalize(iCurrentCursor.xy, 1.), normalize(iCurrentCursor.zw, 0.));
|
||||
vec4 previousCursor = vec4(normalize(iPreviousCursor.xy, 1.), normalize(iPreviousCursor.zw, 0.));
|
||||
|
||||
// When drawing a parellelogram between cursors for the trail i need to determine where to start at the top-left or top-right vertex of the cursor
|
||||
float vertexFactor = determineStartVertexFactor(currentCursor.xy, previousCursor.xy);
|
||||
float invertedVertexFactor = 1.0 - vertexFactor;
|
||||
|
||||
// Set every vertex of my parellogram
|
||||
vec2 v0 = vec2(currentCursor.x + currentCursor.z * vertexFactor, currentCursor.y - currentCursor.w);
|
||||
vec2 v1 = vec2(currentCursor.x + currentCursor.z * invertedVertexFactor, currentCursor.y);
|
||||
vec2 v2 = vec2(previousCursor.x + currentCursor.z * invertedVertexFactor, previousCursor.y);
|
||||
vec2 v3 = vec2(previousCursor.x + currentCursor.z * vertexFactor, previousCursor.y - previousCursor.w);
|
||||
|
||||
float sdfCurrentCursor = getSdfRectangle(vu, currentCursor.xy - (currentCursor.zw * offsetFactor), currentCursor.zw * 0.5);
|
||||
float sdfTrail = getSdfParallelogram(vu, v0, v1, v2, v3);
|
||||
|
||||
float progress = clamp((iTime - iTimeCursorChange) / DURATION, 0.0, 1.0);
|
||||
float easedProgress = ease(progress);
|
||||
// Distance between cursors determine the total length of the parallelogram;
|
||||
vec2 centerCC = getRectangleCenter(currentCursor);
|
||||
vec2 centerCP = getRectangleCenter(previousCursor);
|
||||
float lineLength = distance(centerCC, centerCP);
|
||||
|
||||
vec4 newColor = vec4(fragColor);
|
||||
|
||||
vec4 trail = TRAIL_COLOR;
|
||||
trail = saturate(trail, 2.5);
|
||||
// Draw trail
|
||||
newColor = mix(newColor, trail, antialising(sdfTrail));
|
||||
// Draw current cursor
|
||||
newColor = mix(newColor, trail, antialising(sdfCurrentCursor));
|
||||
newColor = mix(newColor, fragColor, step(sdfCurrentCursor, 0.));
|
||||
// newColor = mix(fragColor, newColor, OPACITY);
|
||||
fragColor = mix(fragColor, newColor, step(sdfCurrentCursor, easedProgress * lineLength));
|
||||
}
|
||||
@@ -13,9 +13,9 @@ binds {
|
||||
Mod+C repeat=false { spawn "code"; }
|
||||
Mod+E repeat=false { spawn "dolphin" "--new-window"; }
|
||||
Mod+W repeat=false { spawn-sh "zen || zen-browser"; }
|
||||
Mod+B repeat=false { spawn-sh "pkill -x -n btop || wezterm -e btop"; }
|
||||
Mod+Shift+T repeat=false { spawn "wezterm"; }
|
||||
Mod+Shift+Return repeat=false { spawn "wezterm"; }
|
||||
Mod+B repeat=false { spawn-sh "pkill -x -n btop || ghostty +new-window -e btop"; }
|
||||
Mod+Shift+T repeat=false { spawn "ghostty" "+new-window"; }
|
||||
Mod+Shift+Return repeat=false { spawn "ghostty" "+new-window"; }
|
||||
Mod+T repeat=false { spawn "kitty"; }
|
||||
Mod+Return repeat=false { spawn "kitty"; }
|
||||
Mod+Shift+W repeat=false { spawn "wallreel"; }
|
||||
@@ -41,7 +41,7 @@ binds {
|
||||
Alt+Space repeat=false { spawn-sh "pkill -x rofi || rofi -show drun"; }
|
||||
|
||||
// Actions
|
||||
Mod+V repeat=false { spawn "wezterm" "start" "--" "fzfclip-wrap"; }
|
||||
Mod+V repeat=false { spawn-sh "ghostty +new-window -e fzfclip-wrap"; }
|
||||
Mod+Period repeat=false { spawn-sh "pkill -x rofi || rofi-emoji"; }
|
||||
Print repeat=false { screenshot-screen; }
|
||||
Mod+Shift+S repeat=false { screenshot; }
|
||||
|
||||
@@ -19,6 +19,7 @@ window-rule {
|
||||
// FLoating terminal
|
||||
window-rule {
|
||||
match app-id="org.wezfurlong.wezterm"
|
||||
match app-id="com.mitchellh.ghostty"
|
||||
open-floating true
|
||||
default-column-width { proportion 0.5; }
|
||||
}
|
||||
|
||||
@@ -1,25 +1,17 @@
|
||||
[Settings]
|
||||
gtk-application-prefer-dark-theme=true
|
||||
gtk-button-images=true
|
||||
gtk-cursor-blink=true
|
||||
gtk-cursor-blink-time=1000
|
||||
gtk-theme-name=catppuccin-mocha-blue-standard+default
|
||||
gtk-icon-theme-name=Papirus
|
||||
gtk-font-name=Sarasa UI SC 10
|
||||
gtk-cursor-theme-name=Bibata-Modern-Ice
|
||||
gtk-cursor-theme-size=24
|
||||
gtk-decoration-layout=icon:minimize,maximize,close
|
||||
gtk-enable-animations=true
|
||||
gtk-toolbar-style=GTK_TOOLBAR_ICONS
|
||||
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
|
||||
gtk-button-images=0
|
||||
gtk-menu-images=0
|
||||
gtk-enable-event-sounds=1
|
||||
gtk-enable-input-feedback-sounds=0
|
||||
gtk-font-name=Sarasa UI SC, 10
|
||||
gtk-icon-theme-name=Papirus
|
||||
gtk-menu-images=true
|
||||
gtk-modules=colorreload-gtk-module
|
||||
gtk-primary-button-warps-slider=true
|
||||
gtk-sound-theme-name=ocean
|
||||
gtk-theme-name=catppuccin-mocha-blue-standard+default
|
||||
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
|
||||
gtk-toolbar-style=3
|
||||
gtk-xft-antialias=1
|
||||
gtk-xft-dpi=122880
|
||||
gtk-xft-hinting=1
|
||||
gtk-xft-hintstyle=hintslight
|
||||
gtk-xft-rgba=rgb
|
||||
gtk-application-prefer-dark-theme=1
|
||||
|
||||
@@ -1,14 +1,7 @@
|
||||
[Settings]
|
||||
gtk-application-prefer-dark-theme=true
|
||||
gtk-cursor-blink=true
|
||||
gtk-cursor-blink-time=1000
|
||||
gtk-theme-name=catppuccin-mocha-blue-standard+default
|
||||
gtk-icon-theme-name=Papirus
|
||||
gtk-font-name=Sarasa UI SC 10
|
||||
gtk-cursor-theme-name=Bibata-Modern-Ice
|
||||
gtk-cursor-theme-size=24
|
||||
gtk-decoration-layout=icon:minimize,maximize,close
|
||||
gtk-enable-animations=true
|
||||
gtk-font-name=Sarasa UI SC, 10
|
||||
gtk-icon-theme-name=Papirus
|
||||
gtk-primary-button-warps-slider=true
|
||||
gtk-sound-theme-name=ocean
|
||||
gtk-theme-name=catppuccin-mocha-blue-standard+default
|
||||
gtk-xft-dpi=122880
|
||||
gtk-application-prefer-dark-theme=1
|
||||
|
||||
@@ -6,8 +6,6 @@ import qs.Modules.Bar.Services
|
||||
import qs.Services
|
||||
|
||||
UProgressExpand {
|
||||
// Quickshell.execDetached(["wezterm", "start", "--", "btop"]);
|
||||
|
||||
iconName: "cpu"
|
||||
fillColor: Colors.mCyan
|
||||
critical: SystemStatService.cpuUsage > 90
|
||||
|
||||
@@ -18,7 +18,7 @@ Singleton {
|
||||
id: process
|
||||
|
||||
running: false
|
||||
command: ["wezterm", "start", "--", "btop"]
|
||||
command: ["ghostty", "+new-window", "-e", "btop"]
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ Singleton {
|
||||
|
||||
function openNote(path) {
|
||||
recentNotePath = path;
|
||||
Quickshell.execDetached(["wezterm", "start", "--", "sh", "-c", `exec nvim "${path}"`]);
|
||||
Quickshell.execDetached(["ghostty", "+new-window", "-e", "nvim", path]);
|
||||
}
|
||||
|
||||
function openRecent() {
|
||||
|
||||
@@ -18,7 +18,7 @@ alt() {
|
||||
fi
|
||||
}
|
||||
|
||||
for item in "kitty" "wlogout"; do
|
||||
for item in "kitty" "wlogout" "ghostty"; do
|
||||
if [[ ! -L $HOME/.config/$item ]] && [[ -e $HOME/.config/$item ]]; then
|
||||
echo "Error: $HOME/.config/$item exists and is not a symlink." >&2
|
||||
exit 1
|
||||
|
||||
@@ -10,11 +10,11 @@ find_position = { fg = "#f5c2e7", bg = "reset", italic = true }
|
||||
marker_copied = { fg = "#a6e3a1", bg = "#a6e3a1" }
|
||||
marker_cut = { fg = "#f38ba8", bg = "#f38ba8" }
|
||||
marker_marked = { fg = "#94e2d5", bg = "#94e2d5" }
|
||||
marker_selected = { fg = "#f5c2e7", bg = "#f5c2e7" }
|
||||
marker_selected = { fg = "#89b4fa", bg = "#89b4fa" }
|
||||
|
||||
count_copied = { fg = "#1e1e2e", bg = "#a6e3a1" }
|
||||
count_cut = { fg = "#1e1e2e", bg = "#f38ba8" }
|
||||
count_selected = { fg = "#1e1e2e", bg = "#f5c2e7" }
|
||||
count_selected = { fg = "#1e1e2e", bg = "#89b4fa" }
|
||||
|
||||
border_symbol = "│"
|
||||
border_style = { fg = "#7f849c" }
|
||||
@@ -26,8 +26,8 @@ active = { fg = "#1e1e2e", bg = "#cdd6f4", bold = true }
|
||||
inactive = { fg = "#cdd6f4", bg = "#45475a" }
|
||||
|
||||
[mode]
|
||||
normal_main = { fg = "#1e1e2e", bg = "#f5c2e7", bold = true }
|
||||
normal_alt = { fg = "#f5c2e7", bg = "#313244"}
|
||||
normal_main = { fg = "#1e1e2e", bg = "#89b4fa", bold = true }
|
||||
normal_alt = { fg = "#89b4fa", bg = "#313244"}
|
||||
|
||||
select_main = { fg = "#1e1e2e", bg = "#a6e3a1", bold = true }
|
||||
select_alt = { fg = "#a6e3a1", bg = "#313244"}
|
||||
@@ -37,7 +37,7 @@ unset_alt = { fg = "#f2cdcd", bg = "#313244"}
|
||||
|
||||
[indicator]
|
||||
parent = { fg = "#1e1e2e", bg = "#cdd6f4" }
|
||||
current = { fg = "#1e1e2e", bg = "#f5c2e7" }
|
||||
current = { fg = "#1e1e2e", bg = "#89b4fa" }
|
||||
preview = { fg = "#1e1e2e", bg = "#cdd6f4" }
|
||||
|
||||
[status]
|
||||
@@ -55,29 +55,29 @@ perm_exec = { fg = "#a6e3a1" }
|
||||
perm_sep = { fg = "#7f849c" }
|
||||
|
||||
[input]
|
||||
border = { fg = "#f5c2e7" }
|
||||
border = { fg = "#89b4fa" }
|
||||
title = {}
|
||||
value = {}
|
||||
selected = { reversed = true }
|
||||
|
||||
[pick]
|
||||
border = { fg = "#f5c2e7" }
|
||||
border = { fg = "#89b4fa" }
|
||||
active = { fg = "#f5c2e7" }
|
||||
inactive = {}
|
||||
|
||||
[confirm]
|
||||
border = { fg = "#f5c2e7" }
|
||||
title = { fg = "#f5c2e7" }
|
||||
border = { fg = "#89b4fa" }
|
||||
title = { fg = "#89b4fa" }
|
||||
body = {}
|
||||
list = {}
|
||||
btn_yes = { reversed = true }
|
||||
btn_no = {}
|
||||
|
||||
[cmp]
|
||||
border = { fg = "#f5c2e7" }
|
||||
border = { fg = "#89b4fa" }
|
||||
|
||||
[tasks]
|
||||
border = { fg = "#f5c2e7" }
|
||||
border = { fg = "#89b4fa" }
|
||||
title = {}
|
||||
hovered = { fg = "#f5c2e7", bold = true }
|
||||
|
||||
@@ -126,13 +126,13 @@ rules = [
|
||||
{ url = "*/", is = "dummy", bg = "#f38ba8" },
|
||||
|
||||
# Fallback
|
||||
{ url = "*/", fg = "#f5c2e7" },
|
||||
{ url = "*/", fg = "#89b4fa" },
|
||||
]
|
||||
|
||||
[spot]
|
||||
border = { fg = "#f5c2e7" }
|
||||
title = { fg = "#f5c2e7" }
|
||||
tbl_cell = { fg = "#f5c2e7", reversed = true }
|
||||
border = { fg = "#89b4fa" }
|
||||
title = { fg = "#89b4fa" }
|
||||
tbl_cell = { fg = "#89b4fa", reversed = true }
|
||||
tbl_col = { bold = true }
|
||||
|
||||
[icon]
|
||||
|
||||
Reference in New Issue
Block a user