11 Commits

33 changed files with 145 additions and 1772 deletions

View File

@@ -332,6 +332,7 @@ Required behavior:
follows it. This is the target replacement for the older `Super+Shift+h` follows it. This is the target replacement for the older `Super+Shift+h`
binding. binding.
- `Hyper+e` focuses the next empty workspace. - `Hyper+e` focuses the next empty workspace.
- `Hyper+1` toggles inactive-window opacity reduction for the focused window.
- `Hyper+5` swaps the current workspace with a selected workspace. - `Hyper+5` swaps the current workspace with a selected workspace.
- `Hyper+g` gathers windows of the focused class onto the current workspace. - `Hyper+g` gathers windows of the focused class onto the current workspace.

View File

@@ -72,7 +72,7 @@ function M.setup(ctx)
bind(hyper .. " + L", exec("hypr_rofi_layout"), desc("Open Hyprland layout menu")) bind(hyper .. " + L", exec("hypr_rofi_layout"), desc("Open Hyprland layout menu"))
bind(hyper .. " + K", exec("rofi_kill_process.sh"), desc("Open process kill menu")) bind(hyper .. " + K", exec("rofi_kill_process.sh"), desc("Open process kill menu"))
bind(hyper .. " + SHIFT + K", exec("rofi_kill_all.sh"), desc("Open kill-all menu")) bind(hyper .. " + SHIFT + K", exec("rofi_kill_all.sh"), desc("Open kill-all menu"))
bind(hyper .. " + R", exec("rofi-systemd"), desc("Open systemd unit menu")) bind(hyper .. " + R", exec("rofi_systemd_mono"), desc("Open systemd unit menu"))
bind(hyper .. " + X", exec("hypr_rofi_action"), desc("Open Hyprland action menu")) bind(hyper .. " + X", exec("hypr_rofi_action"), desc("Open Hyprland action menu"))
bind(hyper .. " + I", exec("rofi_select_input.hs"), desc("Open input selection menu")) bind(hyper .. " + I", exec("rofi_select_input.hs"), desc("Open input selection menu"))
bind(hyper .. " + Y", exec("rofi_agentic_skill"), desc("Open agentic skill menu")) bind(hyper .. " + Y", exec("rofi_agentic_skill"), desc("Open agentic skill menu"))
@@ -243,6 +243,7 @@ function M.setup(ctx)
move_to_next_empty_workspace(false) move_to_next_empty_workspace(false)
end, desc("Move window to next empty workspace")) end, desc("Move window to next empty workspace"))
bind(main_mod .. " + apostrophe", focus_next_class, desc("Focus next window class")) bind(main_mod .. " + apostrophe", focus_next_class, desc("Focus next window class"))
bind(hyper .. " + 1", toggle_inactive_opacity_for_active_window, desc("Toggle inactive opacity reduction for active window"))
bind(mod_alt .. " + W", show_active_window_info, desc("Show active window info")) bind(mod_alt .. " + W", show_active_window_info, desc("Show active window info"))
end end

View File

@@ -13,7 +13,7 @@ function M.setup(ctx)
scratchpads = { scratchpads = {
codex = { codex = {
command = "codex-desktop", command = "codex_desktop_scratchpad",
class = "codex-desktop", class = "codex-desktop",
}, },
htop = { htop = {

View File

@@ -124,11 +124,11 @@ function M.setup(ctx)
rounding = 5, rounding = 5,
blur = { blur = {
enabled = true, enabled = true,
size = 8, size = 7,
passes = 3, passes = 3,
}, },
active_opacity = 1.0, active_opacity = 1.0,
inactive_opacity = 0.9, inactive_opacity = 0.65,
}, },
animations = { animations = {
enabled = true, enabled = true,
@@ -332,14 +332,14 @@ function M.setup(ctx)
center = true, center = true,
decorate = false, decorate = false,
no_shadow = true, no_shadow = true,
xray = true, xray = false,
}) })
hl.layer_rule({ hl.layer_rule({
name = "rofi-glass-layer", name = "rofi-glass-layer",
match = { namespace = "^(rofi)$" }, match = { namespace = "^(rofi)$" },
blur = true, blur = true,
ignore_alpha = 0.05, ignore_alpha = 0.05,
xray = true, xray = false,
}) })
hl.window_rule({ hl.window_rule({
name = "file-chooser-dialogs", name = "file-chooser-dialogs",
@@ -403,6 +403,10 @@ function M.setup(ctx)
border_size = 2, border_size = 2,
border_color = "rgba(edb443ff) rgba(ff4d5dcc)", border_color = "rgba(edb443ff) rgba(ff4d5dcc)",
}) })
hl.window_rule({
match = { tag = inactive_opacity_override_tag },
opacity = "1.0 override 1.0 override 1.0 override",
})
end end
ctx.apply_rules = apply_rules ctx.apply_rules = apply_rules

View File

@@ -42,6 +42,7 @@ return {
[monocle_layout] = "Monocle", [monocle_layout] = "Monocle",
}, },
minimized_workspace = "special:minimized", minimized_workspace = "special:minimized",
inactive_opacity_override_tag = "no-inactive-opacity",
tabbed_group_restore_workspace_prefix = "special:tabbed-monocle-restore-", tabbed_group_restore_workspace_prefix = "special:tabbed-monocle-restore-",
current_layout = columns_layout, current_layout = columns_layout,
enable_nstack = true, enable_nstack = true,

View File

@@ -355,6 +355,34 @@ function M.setup(ctx)
}) })
end end
local function window_has_tag(window, tag)
for _, value in ipairs((window and window.tags) or {}) do
if tostring(value):gsub("%*$", "") == tag then
return true
end
end
return false
end
local function toggle_inactive_opacity_for_active_window()
local window = hl.get_active_window()
local selector = window_selector(window)
if not selector then
return
end
local disabling_reduction = not window_has_tag(window, inactive_opacity_override_tag)
dispatch(hl.dsp.window.tag({ tag = inactive_opacity_override_tag, window = selector }))
hl.notification.create({
text = "Inactive opacity reduction: " .. (disabling_reduction and "off for window" or "on for window"),
duration = 1600,
icon = notification_icons.info,
color = "rgba(edb443ff)",
font_size = 13,
})
end
local function raise_or_spawn(class_fragment, command) local function raise_or_spawn(class_fragment, command)
local fragment = string.lower(class_fragment) local fragment = string.lower(class_fragment)
for _, window in ipairs(hl.get_windows()) do for _, window in ipairs(hl.get_windows()) do
@@ -462,6 +490,7 @@ function M.setup(ctx)
ctx.gather_focused_class = gather_focused_class ctx.gather_focused_class = gather_focused_class
ctx.focus_next_class = focus_next_class ctx.focus_next_class = focus_next_class
ctx.show_active_window_info = show_active_window_info ctx.show_active_window_info = show_active_window_info
ctx.toggle_inactive_opacity_for_active_window = toggle_inactive_opacity_for_active_window
ctx.raise_or_spawn = raise_or_spawn ctx.raise_or_spawn = raise_or_spawn
ctx.minimize_active_window = minimize_active_window ctx.minimize_active_window = minimize_active_window
ctx.restore_last_minimized = restore_last_minimized ctx.restore_last_minimized = restore_last_minimized

View File

@@ -163,7 +163,7 @@ spawnBindings =
, key (hyper .|. shift) xK_l (spawnAction "loginctl lock-session") , key (hyper .|. shift) xK_l (spawnAction "loginctl lock-session")
, key hyper xK_k (spawnAction "rofi_kill_process.sh") , key hyper xK_k (spawnAction "rofi_kill_process.sh")
, key (hyper .|. shift) xK_k (spawnAction "rofi_kill_all.sh") , key (hyper .|. shift) xK_k (spawnAction "rofi_kill_all.sh")
, key hyper xK_r (spawnAction "rofi-systemd") , key hyper xK_r (spawnAction "rofi_systemd_mono")
, key hyper xK_9 (spawnAction "start_synergy.sh") , key hyper xK_9 (spawnAction "start_synergy.sh")
, key hyper xK_backslash (spawnAction "$HOME/dotfiles/dotfiles/lib/functions/mpg341cx_input toggle") , key hyper xK_backslash (spawnAction "$HOME/dotfiles/dotfiles/lib/functions/mpg341cx_input toggle")
, key hyper xK_i (spawnAction "rofi_select_input.hs") , key hyper xK_i (spawnAction "rofi_select_input.hs")

View File

@@ -31,20 +31,21 @@ window {
transparency: "real"; transparency: "real";
location: center; location: center;
anchor: center; anchor: center;
width: 100%; width: 72%;
height: 100%; height: 78%;
background-color: @backdrop; background-color: @backdrop;
text-color: @text; text-color: @text;
border: 0px; border: 1px;
border-radius: 0px; border-color: @border;
border-radius: 18px;
} }
mainbox { mainbox {
background-color: @panel; background-color: @panel;
children: [ inputbar, listview ]; children: [ inputbar, listview ];
spacing: 10px; spacing: 10px;
padding: 0px; padding: 88px 136px;
margin: 8% 30% 8% 30%; margin: 0px;
border: 0px; border: 0px;
border-radius: 0px; border-radius: 0px;
} }
@@ -80,7 +81,10 @@ listview {
background-color: @bg; background-color: @bg;
columns: 1; columns: 1;
lines: 10; lines: 10;
spacing: 5px; spacing: 0px;
border: 1px;
border-color: @border;
border-radius: 14px;
cycle: false; cycle: false;
dynamic: true; dynamic: true;
layout: vertical; layout: vertical;
@@ -88,11 +92,13 @@ listview {
} }
element { element {
background-color: @candidate; background-color: @bg;
text-color: @text-on-dark; text-color: @text-on-dark;
orientation: horizontal; orientation: horizontal;
border-radius: 14px; border: 0px 0px 1px 0px;
padding: 9px 11px; border-color: @hairline;
border-radius: 0px;
padding: 11px 11px;
spacing: 10px; spacing: 10px;
} }
@@ -111,9 +117,8 @@ element-text {
} }
element selected { element selected {
background-color: @candidate-active; background-color: @candidate;
text-color: @text-on-dark; text-color: @text-on-dark;
border: 1px;
border-color: @border; border-color: @border;
} }

View File

@@ -1,9 +0,0 @@
/* colors */
* {
al: #00000000;
bg: #000000ff;
se: #101010ff;
fg: #FFFFFFff;
ac: #EC7875ff;
}

View File

@@ -1,51 +0,0 @@
#!/usr/bin/env bash
## Author : Aditya Shakya
## Mail : adi1090x@gmail.com
## Github : @adi1090x
## Twitter : @adi1090x
# Available Styles
# >> Created and tested on : rofi 1.6.0-1
#
# style_1 style_2 style_3 style_4 style_5 style_6
# style_7 style_8 style_9 style_10 style_11 style_12
theme="style_1"
dir="$HOME/.config/rofi/launchers/colorful"
# dark
ALPHA="#00000000"
BG="#000000ff"
FG="#FFFFFFff"
SELECT="#101010ff"
# light
#ALPHA="#00000000"
#BG="#FFFFFFff"
#FG="#000000ff"
#SELECT="#f3f3f3ff"
# accent colors
COLORS=('#EC7875' '#61C766' '#FDD835' '#42A5F5' '#BA68C8' '#4DD0E1' '#00B19F' \
'#FBC02D' '#E57C46' '#AC8476' '#6D8895' '#EC407A' '#B9C244' '#6C77BB')
ACCENT="${COLORS[$(( $RANDOM % 14 ))]}ff"
# overwrite colors file
cat > $dir/colors.rasi <<- EOF
/* colors */
* {
al: $ALPHA;
bg: $BG;
se: $SELECT;
fg: $FG;
ac: $ACCENT;
}
EOF
# comment these lines to disable random style
themes=($(ls -p --hide="launcher.sh" --hide="colors.rasi" $dir))
theme="${themes[$(( $RANDOM % 12 ))]}"
rofi -no-lazy-grab -show drun -modi drun -theme $dir/"$theme"

View File

@@ -1,119 +0,0 @@
/*
*
* Author : Aditya Shakya
* Mail : adi1090x@gmail.com
* Github : @adi1090x
* Twitter : @adi1090x
*
*/
configuration {
font: "Iosevka Nerd Font 10";
show-icons: true;
icon-theme: "Papirus";
display-drun: "";
drun-display-format: "{name}";
disable-history: false;
sidebar-mode: false;
}
@import "colors.rasi"
window {
transparency: "real";
background-color: @bg;
text-color: @fg;
border: 0px;
border-color: @ac;
border-radius: 12px;
width: 35%;
location: center;
x-offset: 0;
y-offset: 0;
}
prompt {
enabled: true;
padding: 0.30% 1% 0% -0.5%;
background-color: @al;
text-color: @bg;
font: "FantasqueSansMono Nerd Font 12";
}
entry {
background-color: @al;
text-color: @bg;
placeholder-color: @bg;
expand: true;
horizontal-align: 0;
placeholder: "Search";
padding: 0.10% 0% 0% 0%;
blink: true;
}
inputbar {
children: [ prompt, entry ];
background-color: @ac;
text-color: @bg;
expand: false;
border: 0% 0% 0% 0%;
border-radius: 0px;
border-color: @ac;
margin: 0% 0% 0% 0%;
padding: 1.5%;
}
listview {
background-color: @al;
padding: 10px;
columns: 5;
lines: 3;
spacing: 0%;
cycle: false;
dynamic: true;
layout: vertical;
}
mainbox {
background-color: @al;
border: 0% 0% 0% 0%;
border-radius: 0% 0% 0% 0%;
border-color: @ac;
children: [ inputbar, listview ];
spacing: 0%;
padding: 0%;
}
element {
background-color: @al;
text-color: @fg;
orientation: vertical;
border-radius: 0%;
padding: 2% 0% 2% 0%;
}
element-icon {
background-color: inherit;
text-color: inherit;
horizontal-align: 0.5;
vertical-align: 0.5;
size: 64px;
border: 0px;
}
element-text {
background-color: @al;
text-color: inherit;
expand: true;
horizontal-align: 0.5;
vertical-align: 0.5;
margin: 0.5% 0.5% -0.5% 0.5%;
}
element selected {
background-color: @se;
text-color: @fg;
border: 0% 0% 0% 0%;
border-radius: 12px;
border-color: @bg;
}

View File

@@ -1,123 +0,0 @@
/*
*
* Author : Aditya Shakya
* Mail : adi1090x@gmail.com
* Github : @adi1090x
* Twitter : @adi1090x
*
*/
configuration {
font: "Iosevka Nerd Font 10";
show-icons: true;
icon-theme: "Papirus";
display-drun: "Applications";
drun-display-format: "{name}";
disable-history: false;
sidebar-mode: false;
}
@import "colors.rasi"
window {
transparency: "real";
background-color: @bg;
text-color: @fg;
border: 0px;
border-color: @ac;
border-radius: 0px;
width: 80%;
height: 80%;
}
prompt {
enabled: true;
padding: 1% 0.75% 1% 0.75%;
background-color: @ac;
text-color: @fg;
border-radius: 100%;
font: "Iosevka Nerd Font 12";
}
textbox-prompt-colon {
padding: 1% 0% 1% 0%;
background-color: @se;
text-color: @fg;
expand: false;
str: " :: ";
}
entry {
background-color: @al;
text-color: @fg;
placeholder-color: @fg;
expand: true;
horizontal-align: 0;
placeholder: "Search...";
padding: 1.15% 0.5% 1% 0.5%;
blink: true;
}
inputbar {
children: [ prompt, entry ];
background-color: @se;
text-color: @fg;
expand: false;
border: 0% 0.2% 0.3% 0%;
border-radius: 100%;
border-color: @ac;
}
listview {
background-color: @al;
padding: 0px;
columns: 3;
spacing: 1%;
cycle: false;
dynamic: true;
layout: vertical;
}
mainbox {
background-color: @al;
border: 0% 0% 0% 0%;
border-radius: 0% 0% 0% 0%;
border-color: @ac;
children: [ inputbar, listview ];
spacing: 2%;
padding: 20% 15% 20% 15%;
}
element {
background-color: @se;
text-color: @fg;
orientation: horizontal;
border-radius: 100%;
padding: 1% 0.5% 1% 0.75%;
}
element-icon {
background-color: inherit;
text-color: inherit;
horizontal-align: 0.5;
vertical-align: 0.5;
size: 24px;
border: 0px;
}
element-text {
background-color: @al;
text-color: inherit;
expand: true;
horizontal-align: 0;
vertical-align: 0.5;
margin: 0% 0.25% 0% 0.25%;
}
element selected {
background-color: @se;
text-color: @ac;
border: 0% 0% 0.3% 0.2%;
border-radius: 100%;
border-color: @ac;
}

View File

@@ -1,129 +0,0 @@
/*
*
* Author : Aditya Shakya
* Mail : adi1090x@gmail.com
* Github : @adi1090x
* Twitter : @adi1090x
*
*/
configuration {
font: "Iosevka Nerd Font 10";
show-icons: true;
icon-theme: "Papirus";
display-drun: "Applications";
drun-display-format: "{name}";
disable-history: false;
sidebar-mode: false;
}
@import "colors.rasi"
window {
transparency: "real";
background-color: @bg;
text-color: @fg;
border: 0px;
border-color: @ac;
border-radius: 25px;
width: 50%;
location: center;
x-offset: 0;
y-offset: 0;
}
prompt {
enabled: true;
padding: 1.25% 0.75% 1.25% 0.75%;
background-color: @ac;
text-color: @fg;
font: "Iosevka Nerd Font 12";
border-radius: 100%;
}
textbox-prompt-colon {
padding: 1.40% 0% 1% 0%;
background-color: @se;
text-color: @fg;
expand: false;
str: " :: ";
}
entry {
background-color: @al;
text-color: @fg;
placeholder-color: @fg;
expand: true;
horizontal-align: 0;
placeholder: "Search";
padding: 1.5% 0.5% 1% 0%;
blink: true;
}
inputbar {
children: [ prompt, textbox-prompt-colon, entry ];
background-color: @se;
text-color: @fg;
expand: false;
border: 0% 0% 0% 0%;
border-radius: 100px;
border-color: @ac;
}
listview {
background-color: @al;
padding: 0px;
columns: 3;
lines: 8;
spacing: 1%;
cycle: false;
dynamic: true;
layout: vertical;
}
mainbox {
background-color: @al;
border: 0% 0% 0% 0%;
border-radius: 0% 0% 0% 0%;
border-color: @ac;
children: [ inputbar, listview ];
spacing: 2%;
padding: 4% 2% 4% 2%;
}
element {
background-color: @bg;
text-color: @fg;
orientation: horizontal;
border-radius: 0%;
padding: 0%;
}
element-icon {
background-color: inherit;
text-color: inherit;
horizontal-align: 0.5;
vertical-align: 0.5;
size: 24px;
border: 1%;
border-color: @ac;
border-radius: 15px;
background-color: @ac;
}
element-text {
background-color: @al;
text-color: inherit;
expand: true;
horizontal-align: 0;
vertical-align: 0.5;
margin: 0% 0.25% 0% 0.25%;
}
element selected {
background-color: @se;
text-color: @ac;
border: 0% 0% 0% 0%;
border-radius: 15px;
border-color: @ac;
}

View File

@@ -1,132 +0,0 @@
/*
*
* Author : Aditya Shakya
* Mail : adi1090x@gmail.com
* Github : @adi1090x
* Twitter : @adi1090x
*
*/
configuration {
font: "Iosevka Nerd Font 10";
show-icons: true;
icon-theme: "Papirus";
display-drun: " Applications";
drun-display-format: "{name}";
disable-history: false;
sidebar-mode: false;
}
@import "colors.rasi"
window {
transparency: "real";
background-color: @bg;
text-color: @fg;
border: 0px;
border-color: @ac;
border-radius: 50px;
width: 50%;
location: center;
x-offset: 0;
y-offset: 0;
}
prompt {
enabled: true;
padding: 1.25% 0.75% 1.25% 0.75%;
background-color: @ac;
text-color: @fg;
font: "Iosevka Nerd Font 12";
border-radius: 100%;
}
textbox-prompt-colon {
padding: 1.40% 0% 1% 0%;
background-color: @se;
text-color: @fg;
expand: false;
str: " :: ";
}
entry {
background-color: @al;
text-color: @fg;
placeholder-color: @fg;
expand: true;
horizontal-align: 0;
placeholder: "Search";
padding: 1.5% 0.5% 1% 0%;
blink: true;
}
inputbar {
children: [ prompt, textbox-prompt-colon, entry ];
background-color: @se;
text-color: @fg;
expand: false;
border: 0%;
border-radius: 100%;
border-color: @ac;
}
listview {
background-color: @al;
padding: 0px;
columns: 6;
lines: 3;
spacing: 1%;
cycle: false;
dynamic: true;
layout: vertical;
}
mainbox {
background-color: @al;
border: 10px 0px 10px 0px;
border-radius: 50px;
border-color: @ac;
children: [ inputbar, listview ];
spacing: 2%;
padding: 4% 2% 2% 2%;
}
element {
background-color: @bg;
text-color: @fg;
orientation: vertical;
border-radius: 0%;
padding: 0%;
}
element-icon {
background-color: inherit;
text-color: inherit;
horizontal-align: 0.5;
vertical-align: 0.5;
size: 64px;
border: 1%;
border-color: @se;
border-radius: 15px;
background-color: @se;
padding: 2% 1% 2% 1%;
}
element-text {
background-color: @al;
text-color: inherit;
expand: true;
horizontal-align: 0.5;
vertical-align: 0.5;
margin: 0.5% 0.25% 0.5% 0.25%;
padding: 1% 0.5% 1% 0.5%;
}
element-text selected {
expand: true;
horizontal-align: 0.5;
vertical-align: 0.5;
background-color: @ac;
text-color: @bg;
border-radius: 100%;
}

View File

@@ -1,119 +0,0 @@
/*
*
* Author : Aditya Shakya
* Mail : adi1090x@gmail.com
* Github : @adi1090x
* Twitter : @adi1090x
*
*/
configuration {
font: "Iosevka Nerd Font 10";
show-icons: true;
icon-theme: "Papirus";
display-drun: "";
drun-display-format: "{name}";
disable-history: false;
sidebar-mode: false;
}
@import "colors.rasi"
window {
transparency: "real";
background-color: @bg;
text-color: @fg;
border: 0px;
border-color: @ac;
border-radius: 12px;
width: 18%;
location: center;
x-offset: 0;
y-offset: 0;
}
prompt {
enabled: true;
padding: 0.30% 1% 0% -0.5%;
background-color: @al;
text-color: @bg;
font: "FantasqueSansMono Nerd Font 12";
}
entry {
background-color: @al;
text-color: @bg;
placeholder-color: @bg;
expand: true;
horizontal-align: 0;
placeholder: "Search";
padding: 0.10% 0% 0% 0%;
blink: true;
}
inputbar {
children: [ prompt, entry ];
background-color: @ac;
text-color: @bg;
expand: false;
border: 0% 0% 0% 0%;
border-radius: 0px;
border-color: @ac;
margin: 0% 0% 0% 0%;
padding: 1.5%;
}
listview {
background-color: @al;
padding: 0px;
columns: 1;
lines: 5;
spacing: 0%;
cycle: false;
dynamic: true;
layout: vertical;
}
mainbox {
background-color: @al;
border: 0% 0% 0% 0%;
border-radius: 0% 0% 0% 0%;
border-color: @ac;
children: [ inputbar, listview ];
spacing: 0%;
padding: 0%;
}
element {
background-color: @al;
text-color: @fg;
orientation: horizontal;
border-radius: 0%;
padding: 1% 0.5% 1% 0.5%;
}
element-icon {
background-color: inherit;
text-color: inherit;
horizontal-align: 0.5;
vertical-align: 0.5;
size: 32px;
border: 0px;
}
element-text {
background-color: @al;
text-color: inherit;
expand: true;
horizontal-align: 0;
vertical-align: 0.5;
margin: 0% 0.25% 0% 0.25%;
}
element selected {
background-color: @se;
text-color: @fg;
border: 0% 0% 0% 0%;
border-radius: 0px;
border-color: @bg;
}

View File

@@ -1,120 +0,0 @@
/*
*
* Author : Aditya Shakya
* Mail : adi1090x@gmail.com
* Github : @adi1090x
* Twitter : @adi1090x
*
*/
configuration {
font: "Iosevka Nerd Font 10";
show-icons: true;
icon-theme: "Papirus";
display-drun: "";
drun-display-format: "{name}";
disable-history: false;
sidebar-mode: false;
}
@import "colors.rasi"
window {
transparency: "real";
background-color: @bg;
text-color: @fg;
border: 0px;
border-color: @ac;
border-radius: 0px;
height: 100%;
width: 18%;
location: west;
x-offset: 0;
y-offset: 0;
}
prompt {
enabled: true;
padding: 0.30% 1% 0% -0.5%;
background-color: @al;
text-color: @bg;
font: "FantasqueSansMono Nerd Font 12";
}
entry {
background-color: @al;
text-color: @bg;
placeholder-color: @bg;
expand: true;
horizontal-align: 0;
placeholder: "Search";
padding: 0.10% 0% 0% 0%;
blink: true;
}
inputbar {
children: [ prompt, entry ];
background-color: @ac;
text-color: @bg;
expand: false;
border: 0% 0% 0% 0%;
border-radius: 0px;
border-color: @ac;
margin: 0% 0% 0% 0%;
padding: 1.5%;
}
listview {
background-color: @al;
padding: 0px;
columns: 1;
lines: 5;
spacing: 0%;
cycle: false;
dynamic: true;
layout: vertical;
}
mainbox {
background-color: @al;
border: 0% 0% 0% 0%;
border-radius: 0% 0% 0% 0%;
border-color: @ac;
children: [ inputbar, listview ];
spacing: 0%;
padding: 0%;
}
element {
background-color: @al;
text-color: @fg;
orientation: horizontal;
border-radius: 0%;
padding: 1% 0.5% 1% 0.5%;
}
element-icon {
background-color: inherit;
text-color: inherit;
horizontal-align: 0.5;
vertical-align: 0.5;
size: 32px;
border: 0px;
}
element-text {
background-color: @al;
text-color: inherit;
expand: true;
horizontal-align: 0;
vertical-align: 0.5;
margin: 0% 0.25% 0% 0.25%;
}
element selected {
background-color: @se;
text-color: @fg;
border: 0% 0% 0% 0%;
border-radius: 0px;
border-color: @bg;
}

View File

@@ -1,119 +0,0 @@
/*
*
* Author : Aditya Shakya
* Mail : adi1090x@gmail.com
* Github : @adi1090x
* Twitter : @adi1090x
*
*/
configuration {
font: "Iosevka Nerd Font 10";
show-icons: true;
icon-theme: "Papirus";
display-drun: "";
drun-display-format: "{name}";
disable-history: false;
sidebar-mode: false;
}
@import "colors.rasi"
window {
transparency: "real";
background-color: @bg;
text-color: @fg;
border: 0px;
border-color: @ac;
border-radius: 0px;
height: 100%;
width: 19%;
location: east;
x-offset: 0;
y-offset: 0;
}
prompt {
enabled: true;
padding: 0.30% 1% 0% -0.5%;
background-color: @al;
text-color: @bg;
font: "FantasqueSansMono Nerd Font 12";
}
entry {
background-color: @al;
text-color: @bg;
placeholder-color: @bg;
expand: true;
horizontal-align: 0;
placeholder: "Search";
padding: 0.10% 0% 0% 0%;
blink: true;
}
inputbar {
children: [ prompt, entry ];
background-color: @ac;
text-color: @bg;
expand: false;
border: 0% 0% 0% 0%;
border-radius: 0px;
border-color: @ac;
margin: 0% 0% 0% 0%;
padding: 1.5%;
}
listview {
background-color: @al;
padding: 10px 10px 0px 10px;
columns: 3;
spacing: 0%;
cycle: false;
dynamic: true;
layout: vertical;
}
mainbox {
background-color: @al;
border: 0% 0% 0% 0%;
border-radius: 0% 0% 0% 0%;
border-color: @ac;
children: [ inputbar, listview ];
spacing: 0%;
padding: 0%;
}
element {
background-color: @al;
text-color: @fg;
orientation: vertical;
border-radius: 0%;
padding: 2% 0% 2% 0%;
}
element-icon {
background-color: inherit;
text-color: inherit;
horizontal-align: 0.5;
vertical-align: 0.5;
size: 48px;
border: 0px;
}
element-text {
background-color: @al;
text-color: inherit;
expand: true;
horizontal-align: 0.5;
vertical-align: 0.5;
margin: 0.5% 0.5% -0.5% 0.5%;
}
element selected {
background-color: @se;
text-color: @fg;
border: 0% 0% 0% 0%;
border-radius: 0px;
border-color: @bg;
}

View File

@@ -1,119 +0,0 @@
/*
*
* Author : Aditya Shakya
* Mail : adi1090x@gmail.com
* Github : @adi1090x
* Twitter : @adi1090x
*
*/
configuration {
font: "Iosevka Nerd Font 10";
show-icons: true;
icon-theme: "Papirus";
display-drun: "";
drun-display-format: "{name}";
disable-history: false;
sidebar-mode: false;
}
@import "colors.rasi"
window {
transparency: "real";
background-color: @bg;
text-color: @fg;
border: 0px;
border-color: @ac;
border-radius: 0px;
width: 35%;
location: center;
x-offset: 0;
y-offset: 0;
}
prompt {
enabled: true;
padding: 0.30% 1% 0% -0.5%;
background-color: @al;
text-color: @bg;
font: "FantasqueSansMono Nerd Font 12";
}
entry {
background-color: @al;
text-color: @bg;
placeholder-color: @bg;
expand: true;
horizontal-align: 0;
placeholder: "Search";
padding: 0.10% 0% 0% 0%;
blink: true;
}
inputbar {
children: [ prompt, entry ];
background-color: @fg;
text-color: @bg;
expand: false;
border: 0% 0% 0% 0%;
border-radius: 0px;
border-color: @ac;
margin: 0% 0% 0% 0%;
padding: 1.5%;
}
listview {
background-color: @al;
padding: 10px;
columns: 2;
lines: 10;
spacing: 0%;
cycle: false;
dynamic: true;
layout: vertical;
}
mainbox {
background-color: @al;
border: 0% 0% 0% 0%;
border-radius: 0% 0% 0% 0%;
border-color: @ac;
children: [ inputbar, listview ];
spacing: 0%;
padding: 0%;
}
element {
background-color: @al;
text-color: @fg;
orientation: horizontal;
border-radius: 0%;
padding: 1% 0.5% 1% 0.5%;
}
element-icon {
background-color: inherit;
text-color: inherit;
horizontal-align: 0.5;
vertical-align: 0.5;
size: 24px;
border: 0px;
}
element-text {
background-color: @al;
text-color: inherit;
expand: true;
horizontal-align: 0;
vertical-align: 0.5;
margin: 0% 0.25% 0% 0.25%;
}
element selected {
background-color: @ac;
text-color: @bg;
border: 0% 0% 0% 0%;
border-radius: 0px;
border-color: @bg;
}

View File

@@ -1,116 +0,0 @@
/*
*
* Author : Aditya Shakya
* Mail : adi1090x@gmail.com
* Github : @adi1090x
* Twitter : @adi1090x
*
*/
configuration {
font: "Iosevka Nerd Font 10";
show-icons: true;
icon-theme: "Papirus";
display-drun: "";
drun-display-format: "{name}";
disable-history: false;
sidebar-mode: false;
}
@import "colors.rasi"
window {
transparency: "real";
background-color: @bg;
text-color: @fg;
border: 0px;
border-color: @ac;
border-radius: 0px;
width: 100%;
height: 100%;
}
prompt {
enabled: true;
padding: 0.30% 1% 0% -0.5%;
background-color: @al;
text-color: @bg;
font: "FantasqueSansMono Nerd Font 12";
}
entry {
background-color: @al;
text-color: @bg;
placeholder-color: @bg;
expand: true;
horizontal-align: 0;
placeholder: "Search";
padding: 0.10% 0% 0% 0%;
blink: true;
}
inputbar {
children: [ prompt, entry ];
background-color: @ac;
text-color: @bg;
expand: false;
border: 0% 0% 0% 0%;
border-radius: 100%;
border-color: @ac;
margin: 0% 54.5% 0% 0%;
padding: 1.5%;
}
listview {
background-color: @al;
padding: 0px;
columns: 10;
spacing: 0%;
cycle: false;
dynamic: true;
layout: vertical;
}
mainbox {
background-color: @al;
border: 0% 0% 0% 0%;
border-radius: 0% 0% 0% 0%;
border-color: @ac;
children: [ inputbar, listview ];
spacing: 2.5%;
padding: 20% 5% 20% 5%;
}
element {
background-color: @al;
text-color: @fg;
orientation: vertical;
border-radius: 0%;
padding: 4% 0% 4% 0%;
}
element-icon {
background-color: inherit;
text-color: inherit;
horizontal-align: 0.5;
vertical-align: 0.5;
size: 80px;
border: 0px;
}
element-text {
background-color: @al;
text-color: inherit;
expand: true;
horizontal-align: 0.5;
vertical-align: 0.5;
margin: 0.5% 0.5% -0.5% 0.5%;
}
element selected {
background-color: @se;
text-color: @fg;
border: 0% 0% 0.5% 0%;
border-radius: 25px;
border-color: @ac;
}

View File

@@ -1,118 +0,0 @@
/*
*
* Author : Aditya Shakya
* Mail : adi1090x@gmail.com
* Github : @adi1090x
* Twitter : @adi1090x
*
*/
configuration {
font: "Fira Code 10";
show-icons: true;
display-drun: "";
drun-display-format: "{name} {generic}";
disable-history: false;
sidebar-mode: false;
}
@import "colors.rasi"
window {
transparency: "real";
background-color: @bg;
text-color: @fg;
border: 0px;
border-color: @ac;
border-radius: 12px;
width: 88%;
height: 78%;
location: center;
x-offset: 0;
y-offset: 0;
}
prompt {
enabled: true;
padding: 0.30% 1% 0% -0.5%;
background-color: @al;
text-color: @fg;
}
entry {
background-color: @al;
text-color: @fg;
placeholder-color: @fg;
expand: true;
horizontal-align: 0;
placeholder: "Search";
padding: 0.10% 0% 0% 0%;
blink: true;
}
inputbar {
children: [ prompt, entry ];
background-color: @bg;
text-color: @fg;
expand: false;
border: 0% 0% 0% 0%;
border-radius: 0px;
border-color: @ac;
margin: 0% 0% 0% 0%;
padding: 1.5%;
}
listview {
background-color: @al;
padding: 10px;
columns: 1;
lines: 18;
spacing: 1%;
cycle: false;
dynamic: true;
layout: vertical;
}
mainbox {
background-color: @al;
border: 0% 0% 0% 0%;
border-radius: 0% 0% 0% 0%;
border-color: @ac;
children: [ inputbar, listview ];
spacing: 0%;
padding: 0%;
}
element {
background-color: @al;
text-color: @fg;
orientation: horizontal;
border-radius: 0%;
padding: 0.5% 0.5% 0.5% 0.5%;
}
element-icon {
background-color: inherit;
text-color: inherit;
horizontal-align: 0.5;
vertical-align: 0.5;
size: 24px;
border: 0px;
}
element-text {
background-color: @al;
text-color: inherit;
expand: true;
horizontal-align: 0;
vertical-align: 0.5;
margin: 0% 0.25% 0% 0.25%;
}
element selected {
background-color: @ac;
text-color: @bg;
border: 0% 0% 0% 0%;
border-radius: 12px;
border-color: @bg;
}

View File

@@ -1,125 +0,0 @@
/*
*
* Author : Aditya Shakya
* Mail : adi1090x@gmail.com
* Github : @adi1090x
* Twitter : @adi1090x
*
*/
configuration {
font: "Iosevka Nerd Font 10";
show-icons: true;
icon-theme: "Papirus";
display-drun: "Applications";
drun-display-format: "{name}";
disable-history: false;
sidebar-mode: false;
}
@import "colors.rasi"
window {
transparency: "real";
background-color: @bg;
text-color: @fg;
border: 0px;
border-color: @ac;
border-radius: 0px;
width: 35%;
location: center;
x-offset: 0;
y-offset: 0;
}
prompt {
enabled: true;
padding: 1% 0.75% 1% 0.75%;
background-color: @ac;
text-color: @fg;
font: "Iosevka Nerd Font 12";
}
textbox-prompt-colon {
padding: 1% 0% 1% 0%;
background-color: @se;
text-color: @fg;
expand: false;
str: " :: ";
}
entry {
background-color: @al;
text-color: @fg;
placeholder-color: @fg;
expand: true;
horizontal-align: 0;
placeholder: "Search...";
padding: 1.15% 0.5% 1% 0.5%;
blink: true;
}
inputbar {
children: [ prompt, entry ];
background-color: @se;
text-color: @fg;
expand: false;
border: 0% 0% 0% 0%;
border-radius: 0px;
border-color: @ac;
}
listview {
background-color: @al;
padding: 0px;
columns: 2;
lines: 7;
spacing: 1%;
cycle: false;
dynamic: true;
layout: vertical;
}
mainbox {
background-color: @al;
border: 0% 0% 0% 0%;
border-radius: 0% 0% 0% 0%;
border-color: @ac;
children: [ inputbar, listview ];
spacing: 2%;
padding: 4% 2% 4% 2%;
}
element {
background-color: @se;
text-color: @fg;
orientation: horizontal;
border-radius: 0%;
padding: 1% 0.5% 1% 0.75%;
}
element-icon {
background-color: inherit;
text-color: inherit;
horizontal-align: 0.5;
vertical-align: 0.5;
size: 24px;
border: 0px;
}
element-text {
background-color: @al;
text-color: inherit;
expand: true;
horizontal-align: 0;
vertical-align: 0.5;
margin: 0% 0.25% 0% 0.25%;
}
element selected {
background-color: @se;
text-color: @ac;
border: 0% 0% 0% 0.3%;
border-radius: 0px;
border-color: @ac;
}

View File

@@ -1,126 +0,0 @@
/*
*
* Author : Aditya Shakya
* Mail : adi1090x@gmail.com
* Github : @adi1090x
* Twitter : @adi1090x
*
*/
configuration {
font: "Iosevka Nerd Font 10";
show-icons: true;
icon-theme: "Papirus";
display-drun: "Applications";
drun-display-format: "{name}";
disable-history: false;
sidebar-mode: false;
}
@import "colors.rasi"
window {
transparency: "real";
background-color: @bg;
text-color: @fg;
border: 0px;
border-color: @ac;
border-radius: 15px;
width: 35%;
location: center;
x-offset: 0;
y-offset: 0;
}
prompt {
enabled: true;
padding: 1% 0.75% 1% 0.75%;
background-color: @ac;
text-color: @fg;
border-radius: 10px;
font: "Iosevka Nerd Font 12";
}
textbox-prompt-colon {
padding: 1% 0% 1% 0%;
background-color: @se;
text-color: @fg;
expand: false;
str: " :: ";
}
entry {
background-color: @al;
text-color: @fg;
placeholder-color: @fg;
expand: true;
horizontal-align: 0;
placeholder: "Search...";
padding: 1.15% 0.5% 1% 0.5%;
blink: true;
}
inputbar {
children: [ prompt, entry ];
background-color: @se;
text-color: @fg;
expand: false;
border: 0% 0% 0% 0%;
border-radius: 10px;
border-color: @ac;
}
listview {
background-color: @al;
padding: 0px;
columns: 2;
lines: 7;
spacing: 1%;
cycle: false;
dynamic: true;
layout: vertical;
}
mainbox {
background-color: @al;
border: 0% 0% 0% 0%;
border-radius: 0% 0% 0% 0%;
border-color: @ac;
children: [ inputbar, listview ];
spacing: 2%;
padding: 4% 2% 4% 2%;
}
element {
background-color: @se;
text-color: @fg;
orientation: horizontal;
border-radius: 12px;
padding: 1% 0.5% 1% 0.75%;
}
element-icon {
background-color: inherit;
text-color: inherit;
horizontal-align: 0.5;
vertical-align: 0.5;
size: 24px;
border: 0px;
}
element-text {
background-color: @al;
text-color: inherit;
expand: true;
horizontal-align: 0;
vertical-align: 0.5;
margin: 0% 0.25% 0% 0.25%;
}
element selected {
background-color: @se;
text-color: @ac;
border: 0% 0.3% 0% 0.3%;
border-radius: 12px;
border-color: @ac;
}

View File

@@ -4,7 +4,7 @@ configuration {
show-icons: true; show-icons: true;
terminal: "alacritty"; terminal: "alacritty";
sidebar-mode: false; sidebar-mode: false;
fullscreen: true; fullscreen: false;
/* Let rofi auto-detect DPI under Wayland/Xwayland to avoid blurry scaling. */ /* Let rofi auto-detect DPI under Wayland/Xwayland to avoid blurry scaling. */
dpi: 0; dpi: 0;
} }

View File

@@ -108,7 +108,7 @@ myConfig = def
, borderWidth = 0 , borderWidth = 0
, logHook , logHook
= updatePointer (0.5, 0.5) (0, 0) = updatePointer (0.5, 0.5) (0, 0)
<> toggleFadeInactiveLogHook 0.9 <> toggleFadeInactiveLogHook 0.65
<> workspaceHistoryHook <> workspaceHistoryHook
<> setWorkspaceNames <> setWorkspaceNames
<> logHook def <> logHook def
@@ -251,7 +251,7 @@ virtualClasses =
-- Commands -- Commands
codexCommand = "codex-desktop" codexCommand = "codex_desktop_scratchpad"
elementCommand = "element-desktop" elementCommand = "element-desktop"
emacsCommand = "emacsclient -c" emacsCommand = "emacsclient -c"
htopCommand = "ghostty --title=htop -e htop" htopCommand = "ghostty --title=htop -e htop"
@@ -1077,7 +1077,7 @@ addKeys conf@XConfig { modMask = modm } =
, ((hyper, xK_l), selectLayout) , ((hyper, xK_l), selectLayout)
, ((hyper, xK_k), spawn "rofi_kill_process.sh") , ((hyper, xK_k), spawn "rofi_kill_process.sh")
, ((hyper .|. shiftMask, xK_k), spawn "rofi_kill_all.sh") , ((hyper .|. shiftMask, xK_k), spawn "rofi_kill_all.sh")
, ((hyper, xK_r), spawn "rofi-systemd") , ((hyper, xK_r), spawn "rofi_systemd_mono")
, ((hyper, xK_9), spawn "start_synergy.sh") , ((hyper, xK_9), spawn "start_synergy.sh")
, ((hyper, xK_slash), spawn "toggle_taffybar") , ((hyper, xK_slash), spawn "toggle_taffybar")
, ((hyper, xK_backslash), spawn "$HOME/dotfiles/dotfiles/lib/functions/mpg341cx_input toggle") , ((hyper, xK_backslash), spawn "$HOME/dotfiles/dotfiles/lib/functions/mpg341cx_input toggle")

View File

@@ -0,0 +1,59 @@
#!/usr/bin/env bash
set -euo pipefail
app_id=codex-desktop
state_dir="${XDG_STATE_HOME:-$HOME/.local/state}/$app_id"
runtime_dir="${XDG_RUNTIME_DIR:-$state_dir}/$app_id"
pid_file="$state_dir/app.pid"
socket_path="$runtime_dir/launch-action.sock"
pid_is_alive() {
local pid="${1:-}"
case "$pid" in
""|*[!0-9]*) return 1 ;;
esac
[ -e "/proc/$pid/exe" ]
}
running_app_is_alive() {
local pid
[ -r "$pid_file" ] || return 1
pid="$(cat "$pid_file" 2>/dev/null || true)"
pid_is_alive "$pid"
}
send_launch_action() {
[ -S "$socket_path" ] || return 1
running_app_is_alive || return 1
python3 - "$socket_path" "$@" <<'PY'
import json
import socket
import sys
socket_path = sys.argv[1]
argv = sys.argv[2:]
payload = json.dumps({"argv": argv}, separators=(",", ":")).encode("utf-8") + b"\n"
client = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
client.settimeout(1.0)
try:
client.connect(socket_path)
client.sendall(payload)
response = client.recv(16)
finally:
client.close()
if not response.startswith(b"ok"):
raise SystemExit(1)
PY
}
if send_launch_action "$@"; then
exit 0
fi
exec codex-desktop "$@"

View File

@@ -0,0 +1,6 @@
#!/usr/bin/env bash
set -euo pipefail
script_dir="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
export ROFI_SYSTEMD_ROFI_COMMAND="${script_dir}/rofi_systemd_rofi -p"
exec rofi-systemd "$@"

View File

@@ -0,0 +1,2 @@
#!/usr/bin/env bash
exec rofi -dmenu -i -theme-str '* { font: "Hack 12"; }' "$@"

22
nixos/flake.lock generated
View File

@@ -113,11 +113,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1778282716, "lastModified": 1779132996,
"narHash": "sha256-fHo9PlYWu970hmdVkDB2Jqeu0VmhmqQ5iKOnPjf/I1E=", "narHash": "sha256-kFxdb7fMqtry1u3y760/W0KLaC0UCuvHksIe6o4ySSw=",
"owner": "sadjow", "owner": "sadjow",
"repo": "codex-cli-nix", "repo": "codex-cli-nix",
"rev": "7f0f3802287581e04501e2fea26b56d63df18ebd", "rev": "626d39797c8d7c100d03f4391decdb036164af0a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -137,15 +137,15 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1778908436, "lastModified": 1779133540,
"narHash": "sha256-b1UMwTp4ZZJPdvnTZ7xr4HSrkHUj1HNph6YAkE4kXs0=", "narHash": "sha256-zJweCjk5UMVtNiihRG/jptz4HeyvlQWiYNWCmtx3LAY=",
"owner": "colonelpanic8", "owner": "ilysenko",
"repo": "codex-desktop-linux", "repo": "codex-desktop-linux",
"rev": "b7e1a8654ce32e1985cedb0ce5ae4581913e9982", "rev": "01b1ad7ddf68f6f3d38ab858a78745e63968db89",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "colonelpanic8", "owner": "ilysenko",
"ref": "main", "ref": "main",
"repo": "codex-desktop-linux", "repo": "codex-desktop-linux",
"type": "github" "type": "github"
@@ -745,11 +745,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1778877751, "lastModified": 1779225912,
"narHash": "sha256-EWGEw2wvflMzTcKxo5cLYL5Cw4KqYGpRl1nQGp2VpiM=", "narHash": "sha256-GcapnSjC3NvJ2jkl4aFlPIxL4mWwvK12sfIQvXHqE0g=",
"owner": "colonelpanic8", "owner": "colonelpanic8",
"repo": "hyprexpo", "repo": "hyprexpo",
"rev": "bb53c1d9ed635ad88eaf5db287692d9babef9963", "rev": "76348a0412e51aceb44f51471fee6a6fee92dee9",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -237,7 +237,7 @@
}; };
codex-desktop-linux = { codex-desktop-linux = {
url = "github:colonelpanic8/codex-desktop-linux/main"; url = "github:ilysenko/codex-desktop-linux/main";
inputs = { inputs = {
nixpkgs.follows = "nixpkgs"; nixpkgs.follows = "nixpkgs";
flake-utils.follows = "flake-utils"; flake-utils.follows = "flake-utils";

View File

@@ -26,13 +26,7 @@
hyprlang = inputs.hyprlang.packages.${system}.hyprlang; hyprlang = inputs.hyprlang.packages.${system}.hyprlang;
hyprutils = inputs.hyprutils.packages.${system}.hyprutils; hyprutils = inputs.hyprutils.packages.${system}.hyprutils;
}; };
hyprexpo = inputs.hyprexpo.packages.${system}.hyprexpo.overrideAttrs (old: { hyprexpo = inputs.hyprexpo.packages.${system}.hyprexpo;
patches =
(old.patches or [])
++ [
../packages/hyprexpo-drag-windows.patch
];
});
tangledConfig = dotfilesOrgApi.org-agenda-custom-config; tangledConfig = dotfilesOrgApi.org-agenda-custom-config;
# Import container build logic # Import container build logic

View File

@@ -106,13 +106,7 @@
./packages/hyprwobbly-safe-geometry-and-idle-timer.patch ./packages/hyprwobbly-safe-geometry-and-idle-timer.patch
]; ];
}); });
hyprexpo = inputs.hyprexpo.packages.${system}.hyprexpo.overrideAttrs (old: { hyprexpo = inputs.hyprexpo.packages.${system}.hyprexpo;
patches =
(old.patches or [])
++ [
./packages/hyprexpo-drag-windows.patch
];
});
hyprlandPluginPackages = hyprlandPluginPackages =
[ [
inputs.hyprNStack.packages.${system}.hyprNStack inputs.hyprNStack.packages.${system}.hyprNStack

View File

@@ -1,198 +0,0 @@
--- a/Overview.hpp
+++ b/Overview.hpp
@@ -80,6 +80,12 @@
void updateHoveredFromMouse();
bool isTileValid(int id) const;
void ensureKeyboardFocus();
+ void beginWindowDrag();
+ bool finishWindowDrag();
+ void updateWindowDrag();
+ PHLWINDOW windowAtTilePoint(int id, const Vector2D& localPoint) const;
+ Vector2D tilePointToWorkspacePoint(int id, const Vector2D& localPoint) const;
+ PHLWORKSPACE ensureWorkspaceForTile(int id);
int SIDE_LENGTH = 3;
int GAP_WIDTH = 5;
@@ -94,6 +100,11 @@
int hoveredID = -1;
int kbFocusID = -1;
+ Vector2D dragStartLocal = Vector2D{};
+ int dragSourceID = -1;
+ bool dragMoved = false;
+ PHLWINDOW dragWindow;
+
std::vector<SWorkspaceImage> images;
PHLWORKSPACE startedOn;
--- a/Overview.cpp
+++ b/Overview.cpp
@@ -5,6 +5,7 @@
#include <cctype>
#include <cmath>
#include <optional>
+#include <string>
#define private public
#define protected public
#include <hyprland/src/render/Renderer.hpp>
@@ -79,6 +80,10 @@
return grad;
}
+static bool windowVisibleOnWorkspace(const PHLWINDOW& window, const PHLWORKSPACE& workspace) {
+ return window && workspace && window->m_workspace == workspace && window->m_isMapped && !window->isHidden() && !window->m_pinned;
+}
+
static void ensureFramebuffer(COverview::SWorkspaceImage& image, const CBox& monbox, uint32_t drmFormat) {
if (!image.fb)
image.fb = g_pHyprRenderer->createFB("hyprexpo");
@@ -337,9 +342,29 @@
info.cancelled = true;
lastMousePosLocal = g_pInputManager->getMouseCoordsInternal() - pMonitor->m_position;
updateHoveredFromMouse();
+ updateWindowDrag();
+ };
+
+ auto onCursorSelect = [this](IPointer::SButtonEvent event, Event::SCallbackInfo& info) {
+ if (closing)
+ return;
+
+ info.cancelled = true;
+
+ if (event.state == WL_POINTER_BUTTON_STATE_PRESSED) {
+ beginWindowDrag();
+ return;
+ }
+
+ if (finishWindowDrag())
+ return;
+
+ selectHoveredWorkspace();
+
+ close();
};
- auto onCursorSelect = [this](Event::SCallbackInfo& info) {
+ auto onTouchSelect = [this](Event::SCallbackInfo& info) {
if (closing)
return;
@@ -353,8 +378,107 @@
mouseMoveHook = Event::bus()->m_events.input.mouse.move.listen([onCursorMove](Vector2D, Event::SCallbackInfo& info) { onCursorMove(info); });
touchMoveHook = Event::bus()->m_events.input.touch.motion.listen([onCursorMove](ITouch::SMotionEvent, Event::SCallbackInfo& info) { onCursorMove(info); });
- mouseButtonHook = Event::bus()->m_events.input.mouse.button.listen([onCursorSelect](IPointer::SButtonEvent, Event::SCallbackInfo& info) { onCursorSelect(info); });
- touchDownHook = Event::bus()->m_events.input.touch.down.listen([onCursorSelect](ITouch::SDownEvent, Event::SCallbackInfo& info) { onCursorSelect(info); });
+ mouseButtonHook = Event::bus()->m_events.input.mouse.button.listen([onCursorSelect](IPointer::SButtonEvent event, Event::SCallbackInfo& info) { onCursorSelect(event, info); });
+ touchDownHook = Event::bus()->m_events.input.touch.down.listen([onTouchSelect](ITouch::SDownEvent, Event::SCallbackInfo& info) { onTouchSelect(info); });
+}
+
+Vector2D COverview::tilePointToWorkspacePoint(int id, const Vector2D& localPoint) const {
+ const Vector2D tileSize = pMonitor->m_size / SIDE_LENGTH;
+ const Vector2D tilePos = tileSize * Vector2D{id % SIDE_LENGTH, id / SIDE_LENGTH};
+ const Vector2D inTile = localPoint - tilePos;
+
+ return pMonitor->m_position + Vector2D{std::clamp(inTile.x / tileSize.x, 0.0, 1.0) * pMonitor->m_size.x, std::clamp(inTile.y / tileSize.y, 0.0, 1.0) * pMonitor->m_size.y};
+}
+
+PHLWINDOW COverview::windowAtTilePoint(int id, const Vector2D& localPoint) const {
+ if (!isTileValid(id))
+ return nullptr;
+
+ const auto WORKSPACE = images[id].pWorkspace ? images[id].pWorkspace : g_pCompositor->getWorkspaceByID(images[id].workspaceID);
+ if (!WORKSPACE)
+ return nullptr;
+
+ const auto POINT = tilePointToWorkspacePoint(id, localPoint);
+ for (auto it = g_pCompositor->m_windows.rbegin(); it != g_pCompositor->m_windows.rend(); ++it) {
+ const auto& window = *it;
+ if (!windowVisibleOnWorkspace(window, WORKSPACE))
+ continue;
+
+ if (window->getWindowMainSurfaceBox().containsPoint(POINT))
+ return window;
+ }
+
+ return nullptr;
+}
+
+void COverview::beginWindowDrag() {
+ updateHoveredFromMouse();
+ dragStartLocal = lastMousePosLocal;
+ dragSourceID = hoveredID;
+ dragMoved = false;
+ dragWindow = windowAtTilePoint(dragSourceID, dragStartLocal);
+}
+
+void COverview::updateWindowDrag() {
+ if (!dragWindow || dragMoved)
+ return;
+
+ const auto DX = lastMousePosLocal.x - dragStartLocal.x;
+ const auto DY = lastMousePosLocal.y - dragStartLocal.y;
+ if (std::hypot(DX, DY) < 12.0)
+ return;
+
+ dragMoved = true;
+ damage();
+}
+
+PHLWORKSPACE COverview::ensureWorkspaceForTile(int id) {
+ if (!isTileValid(id))
+ return nullptr;
+
+ auto& image = images[id];
+ if (image.pWorkspace)
+ return image.pWorkspace;
+
+ auto workspace = g_pCompositor->getWorkspaceByID(image.workspaceID);
+ if (!workspace)
+ workspace = g_pCompositor->createNewWorkspace(image.workspaceID, pMonitor->m_id, std::to_string(image.workspaceID), false);
+
+ image.pWorkspace = workspace;
+ return workspace;
+}
+
+bool COverview::finishWindowDrag() {
+ const auto WINDOW = dragWindow;
+ const int SOURCE = dragSourceID;
+ const bool MOVED = dragMoved;
+
+ dragWindow = nullptr;
+ dragSourceID = -1;
+ dragMoved = false;
+
+ if (!WINDOW)
+ return false;
+
+ if (!MOVED)
+ return false;
+
+ updateHoveredFromMouse();
+
+ const int TARGET = hoveredID;
+ if (!isTileValid(SOURCE) || !isTileValid(TARGET) || SOURCE == TARGET)
+ return true;
+
+ const auto SOURCEWS = images[SOURCE].pWorkspace;
+ const auto TARGETWS = ensureWorkspaceForTile(TARGET);
+ if (!windowVisibleOnWorkspace(WINDOW, SOURCEWS) || !TARGETWS || TARGETWS == SOURCEWS)
+ return true;
+
+ g_pCompositor->moveWindowToWorkspaceSafe(WINDOW, TARGETWS);
+ redrawID(SOURCE);
+ redrawID(TARGET);
+ damage();
+ return true;
}
void COverview::selectHoveredWorkspace() {
@@ -954,6 +1078,8 @@
drawBorder(openedID, *PBORDERCURRENT);
if (kbFocusID != -1)
drawBorder(kbFocusID, *PBORDERFOCUS);
+ if (dragMoved && dragSourceID != -1)
+ drawBorder(dragSourceID, *PBORDERFOCUS);
}
static float lerp(const float& from, const float& to, const float perc) {