Compare commits

...

2 Commits

Author SHA1 Message Date
jasonhilder ccd02e718b Cleanup/updates for new software.
Dropped xfwm for awesomewm
Themed it accordingly, theme, icons, cursor, rofi
Cleaned up picom for awesome and made better animations
Install script cleanup and removed unneeded tools
2026-07-01 10:31:20 +02:00
jasonhilder 179f2a10fe Cleanup, no longer in use config + scripts. 2026-07-01 10:06:05 +02:00
14 changed files with 809 additions and 598 deletions
+1 -2
View File
@@ -2,7 +2,6 @@ config/fish/conf.d
config/fish/functions config/fish/functions
config/fish/fish_variables config/fish/fish_variables
config/nvim/nvim-pack-lock.json config/nvim/nvim-pack-lock.json
config/alacritty/dank-theme.toml config/awesome/bling
scripts/bin/Obsidian scripts/bin/Obsidian
scripts/bin/ols scripts/bin/ols
+1 -1
View File
@@ -20,7 +20,7 @@ background = '#101010'
[colors.normal] [colors.normal]
# black is gray0 # black is gray0
black = '#080808' black = '#111111'
red = '#C11F1F' red = '#C11F1F'
green = '#789978' green = '#789978'
yellow = '#ffAA88' yellow = '#ffAA88'
+437
View File
@@ -0,0 +1,437 @@
pcall(require, "luarocks.loader")
local gears = require("gears")
local awful = require("awful")
require("awful.autofocus")
local wibox = require("wibox")
local beautiful = require("beautiful")
local bling = require("bling")
local naughty = require("naughty")
local menubar = require("menubar")
local hotkeys_popup = require("awful.hotkeys_popup")
-- {{{ Error handling
if awesome.startup_errors then
naughty.notify({ preset = naughty.config.presets.critical,
title = "Error during startup",
text = awesome.startup_errors })
end
do
local in_error = false
awesome.connect_signal("debug::error", function (err)
if in_error then return end
in_error = true
naughty.notify({ preset = naughty.config.presets.critical,
title = "An error happened",
text = tostring(err) })
in_error = false
end)
end
-- }}}
-- {{{ Variable definitions
beautiful.init(gears.filesystem.get_themes_dir() .. "default/theme.lua")
-- Gaps
beautiful.useless_gap = 8
beautiful.gap_single_client = true
-- ---- Qogir / polybar-matched palette ------------------------------------
local colors = {
background = "#111111",
background_alt = "#1a1a1a",
foreground = "#d3dae3",
accent = "#616161",
accent_alt = "#6ba0e8",
red = "#e35b5b",
green = "#98c379",
yellow = "#e5c07b",
disabled = "#707880",
white = "#ffffff",
}
-- Bar font (matches your polybar JetBrainsMono Nerd Font; bump the number to 14
-- if you want it as large as polybar's size=14).
beautiful.font = "JetBrainsMono Nerd Font 12"
-- Window borders
beautiful.border_width = 4
beautiful.border_normal = colors.background_alt
beautiful.border_focus = colors.accent
-- Taglist colors to mirror polybar's xworkspaces module
beautiful.taglist_bg_focus = colors.accent
beautiful.taglist_fg_focus = colors.background
beautiful.taglist_fg_occupied = colors.white
beautiful.taglist_bg_occupied = colors.background
beautiful.taglist_fg_empty = colors.disabled
beautiful.taglist_bg_empty = colors.background
beautiful.taglist_bg_urgent = colors.red
beautiful.taglist_fg_urgent = colors.background
-- Systray styling
beautiful.bg_systray = colors.background
beautiful.systray_icon_spacing = 4
terminal = "alacritty"
editor = os.getenv("EDITOR") or "nano"
-- THE modkey. "Mod1" = Alt. Use "Mod4" for the Super/Windows key.
modkey = "Mod1"
-- Layouts: suit.tile = master column LEFT, stack column RIGHT.
awful.layout.layouts = {
awful.layout.suit.tile,
awful.layout.suit.max,
awful.layout.suit.floating,
}
-- }}}
-- {{{ Bar helpers ---------------------------------------------------------
-- "ICON value" with ICON tinted accent, like polybar's *-prefix-foreground.
local function label(icon, val)
return string.format("<span foreground='%s'>%s</span> %s",
colors.accent, icon, val or "")
end
-- A slim "|" separator in the disabled color, like polybar's separator.
local function sep()
local w = wibox.widget.textbox()
w.markup = string.format("<span foreground='%s'> │ </span>", colors.disabled)
return w
end
-- Wrap a widget in a small margin so bar modules aren't crammed together.
local function padded(w, left, right)
return wibox.container.margin(w, left or 8, right or 8)
end
-- Focused window title (polybar xwindow / %title%)
local function make_title()
local t = wibox.widget.textbox()
local function update()
local c = client.focus
t.markup = c and string.format("<span foreground='%s'>%s</span>", colors.white, gears.string.xml_escape(c.name or "")) or ""
end
client.connect_signal("focus", update)
client.connect_signal("unfocus", update)
client.connect_signal("property::name", update)
return t
end
-- CPU usage % (two top samples so the reading is accurate)
local function make_cpu()
return awful.widget.watch(
{ "bash", "-c",
[[LANG=C top -bn2 -d0.3 | grep -m2 '^%Cpu' | tail -1 | awk '{printf "%.0f", 100 - $8}']] },
3,
function(w, out) w.markup = label("CPU", out:gsub("%s+$","") .. "%") end)
end
-- Volume: click to mute, scroll to adjust, right-click for the mixer.
-- Keeps its own refresh() so button presses update instantly instead of
-- waiting on the polling timer.
local function make_vol()
local w = wibox.widget.textbox()
local vol_script = [[
sink=$(LANG=C pactl get-default-sink 2>/dev/null)
m=$(LANG=C pactl get-sink-mute "$sink" 2>/dev/null | grep -oE 'yes|no')
v=$(LANG=C pactl get-sink-volume "$sink" 2>/dev/null | grep -oE '[0-9]+%' | head -n1)
echo "$m $v"
]]
local function shell_quote(s)
return "'" .. s:gsub("'", "'\\''") .. "'"
end
local vol_cmd = "sh -c " .. shell_quote(vol_script)
local function refresh()
awful.spawn.easy_async_with_shell(vol_cmd, function(out)
local muted, pct = out:match("(%a+)%s+(%d+)%%")
if muted == nil and pct == nil then
-- Command failed entirely (no sink found / pactl error).
w.markup = string.format("<span foreground='%s'>VOL n/a</span>", colors.disabled)
return
end
muted = muted == "yes"
pct = pct or "0"
if muted then
w.markup = string.format("<span foreground='%s'>MUTE</span>", colors.disabled)
else
w.markup = label("VOL", pct .. "%")
end
end)
end
w:buttons(gears.table.join(
-- left click: toggle mute
awful.button({ }, 1, function () awful.spawn.easy_async_with_shell( [[sh -c 'pactl set-sink-mute "$(pactl get-default-sink)" toggle']], function() refresh() end) end),
-- right click: open the mixer
awful.button({ }, 3, function () awful.spawn("pavucontrol") end),
-- scroll up: +2%
awful.button({ }, 4, function () awful.spawn.easy_async_with_shell( [[sh -c 'pactl set-sink-volume "$(pactl get-default-sink)" +2%']], function() refresh() end) end),
-- scroll down: -2%
awful.button({ }, 5, function () awful.spawn.easy_async_with_shell( [[sh -c 'pactl set-sink-volume "$(pactl get-default-sink)" -2%']], function() refresh() end) end)
))
-- Poll too, in case volume changes elsewhere (media keys, another app).
gears.timer {
timeout = 2,
call_now = true,
autostart = true,
callback = refresh,
}
return w
end
-- {{{ Wibar widgets
local mytextclock = wibox.widget.textclock("%Y-%m-%d %H:%M")
local taglist_buttons = gears.table.join(
awful.button({ }, 1, function(t) t:view_only() end),
awful.button({ modkey }, 1, function(t)
if client.focus then client.focus:move_to_tag(t) end
end),
awful.button({ }, 3, awful.tag.viewtoggle)
)
local function set_wallpaper(s)
if beautiful.wallpaper then
local wp = beautiful.wallpaper
if type(wp) == "function" then wp = wp(s) end
gears.wallpaper.maximized(wp, s, true)
end
end
screen.connect_signal("property::geometry", set_wallpaper)
awful.screen.connect_for_each_screen(function(s)
set_wallpaper(s)
-- Workspaces 1..5
awful.tag({ "1", "2", "3", "4", "5" }, s, awful.layout.layouts[1])
s.mypromptbox = awful.widget.prompt()
s.mylayoutbox = awful.widget.layoutbox(s)
s.mylayoutbox:buttons(gears.table.join(
awful.button({ }, 1, function () awful.layout.inc( 1) end),
awful.button({ }, 3, function () awful.layout.inc(-1) end)
))
s.mytaglist = awful.widget.taglist {
screen = s,
filter = awful.widget.taglist.filter.all,
buttons = taglist_buttons,
style = {
shape = function(cr, w, h) gears.shape.rounded_rect(cr, w, h, 4) end,
},
layout = {
spacing = 4,
layout = wibox.layout.fixed.horizontal,
},
widget_template = {
{
{
id = "text_role",
widget = wibox.widget.textbox,
},
left = 10,
right = 10,
top = 4,
bottom = 4,
widget = wibox.container.margin,
},
id = "background_role",
widget = wibox.container.background,
},
}
-- Per-screen monitor widgets (created here so multi-monitor stays valid)
local title = make_title()
local vol = make_vol()
local cpu = make_cpu()
local right = wibox.layout.fixed.horizontal()
local function push(w) right:add(padded(w, 4, 4)) end
push(vol); right:add(sep())
push(cpu); right:add(sep())
push(mytextclock)
right:add(sep())
push(wibox.widget.systray())
right:add(sep())
push(s.mylayoutbox)
s.mywibox = awful.wibar({
position = "top",
screen = s,
height = 36,
bg = colors.background,
fg = colors.foreground,
shape = function(cr, w, h) gears.shape.rounded_rect(cr, w, h, 0) end,
})
s.mywibox:setup {
layout = wibox.layout.align.horizontal,
{ -- Left: workspaces + focused window title
layout = wibox.layout.fixed.horizontal,
padded(s.mytaglist, 8, 4),
s.mypromptbox,
{ title, left = 8, widget = wibox.container.margin },
},
nil, -- empty center
padded(right, 4, 12),
}
end)
-- }}}
-- {{{ Helper: launcher (prefer rofi, fall back to built-in menubar)
local function launcher()
awful.spawn.easy_async_with_shell("command -v rofi", function(out)
if out and out:match("%S") then
awful.spawn("rofi -show drun")
else
menubar.show()
end
end)
end
-- }}}
-- {{{ Global keys
globalkeys = gears.table.join(
awful.key({ modkey }, "s", hotkeys_popup.show_help, {description = "show help", group = "awesome"}),
-- Directional focus (vim keys)
awful.key({ modkey }, "h", function () awful.client.focus.bydirection("left") end, {description = "focus left", group = "client"}),
awful.key({ modkey }, "j", function () awful.client.focus.bydirection("down") end, {description = "focus down", group = "client"}),
awful.key({ modkey }, "k", function () awful.client.focus.bydirection("up") end, {description = "focus up", group = "client"}),
awful.key({ modkey }, "l", function () awful.client.focus.bydirection("right") end, {description = "focus right", group = "client"}),
-- Directional move (swap clients in the tiling layout)
awful.key({ modkey, "Shift" }, "h", function () awful.client.swap.bydirection("left") end, {description = "move left", group = "client"}),
awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.bydirection("down") end, {description = "move down", group = "client"}),
awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.bydirection("up") end, {description = "move up", group = "client"}),
awful.key({ modkey, "Shift" }, "l", function () awful.client.swap.bydirection("right") end, {description = "move right", group = "client"}),
-- Resize the master/other split
awful.key({ modkey, "Control" }, "h", function () awful.tag.incmwfact(-0.05) end, {description = "shrink master", group = "layout"}),
awful.key({ modkey, "Control" }, "l", function () awful.tag.incmwfact( 0.05) end, {description = "grow master", group = "layout"}),
-- Launching / layout
awful.key({ modkey }, "Return", function () awful.spawn(terminal) end, {description = "open a terminal", group = "launcher"}),
awful.key({ modkey }, "space", launcher, {description = "application launcher", group = "launcher"}),
awful.key({ modkey }, "e", function () awful.spawn("thunar") end, {description = "Filemanager", group = "system"}),
awful.key({ modkey }, "b", function () awful.spawn("chromium") end, {description = "Browswer", group = "internet"}),
awful.key({ modkey }, "t", function () awful.layout.inc(1) end, {description = "next layout", group = "layout"}),
awful.key({ modkey }, "p", function () awful.spawn("xfce4-screenshooter") end, {description = "screenshot", group = "system"}),
-- Alt tab only in max mode
awful.key({ "Mod1" }, "Tab", function () if awful.layout.get(mouse.screen) == awful.layout.suit.max then awful.client.focus.byidx(1) if client.focus then client.focus:raise() end end end),
-- Media keys: volume up/down/mute (works even without a hardware key
-- if you bind these in your compositor/DE too)
awful.key({ }, "XF86AudioRaiseVolume", function () awful.spawn.easy_async_with_shell([[sh -c 'pactl set-sink-volume "$(pactl get-default-sink)" +2%']]) end, {description = "volume up", group = "media"}),
awful.key({ }, "XF86AudioLowerVolume", function () awful.spawn.easy_async_with_shell([[sh -c 'pactl set-sink-volume "$(pactl get-default-sink)" -2%']]) end, {description = "volume down", group = "media"}),
awful.key({ }, "XF86AudioMute", function () awful.spawn.easy_async_with_shell([[sh -c 'pactl set-sink-mute "$(pactl get-default-sink)" toggle']]) end, {description = "toggle mute", group = "media"}),
-- Awesome control
awful.key({ modkey, "Shift" }, "r", awesome.restart, {description = "reload awesome", group = "awesome"}),
awful.key({ modkey, "Shift" }, "e", awesome.quit, {description = "quit awesome", group = "awesome"})
)
-- Workspace keys 1..5: Alt+N view, Alt+Shift+N move client to tag
for i = 1, 5 do
globalkeys = gears.table.join(globalkeys,
awful.key({ modkey }, "#" .. i + 9, function ()
local screen = awful.screen.focused()
local tag = screen.tags[i]
if tag then tag:view_only() end
end,
{description = "view tag #" .. i, group = "tag"}),
awful.key({ modkey, "Shift" }, "#" .. i + 9, function ()
if client.focus then
local tag = client.focus.screen.tags[i]
if tag then client.focus:move_to_tag(tag) end
end
end,
{description = "move focused client to tag #" .. i, group = "tag"})
)
end
-- }}}
-- {{{ Per-client keys
clientkeys = gears.table.join(
awful.key({ modkey }, "q", function (c) c:kill() end, {description = "kill window", group = "client"}),
awful.key({ modkey }, "f", function (c) c.fullscreen = not c.fullscreen c:raise() end, {description = "toggle fullscreen", group = "client"}),
awful.key({ modkey }, "m", function (c) c:swap(awful.client.getmaster()) end, {description = "make master", group = "client"}),
awful.key({ modkey, "Shift" }, "space", awful.client.floating.toggle, {description = "toggle floating", group = "client"})
)
clientbuttons = gears.table.join(
awful.button({ }, 1, function (c) c:emit_signal("request::activate", "mouse_click", {raise = true}) end),
awful.button({ modkey }, 1, function (c) c:emit_signal("request::activate", "mouse_click", {raise = true}) awful.mouse.client.move(c) end),
awful.button({ modkey }, 3, function (c) c:emit_signal("request::activate", "mouse_click", {raise = true}) awful.mouse.client.resize(c) end)
)
root.keys(globalkeys)
-- }}}
-- {{{ Rules
awful.rules.rules = {
{ rule = { },
properties = {
border_width = beautiful.border_width,
border_color = beautiful.border_normal,
focus = awful.client.focus.filter,
raise = true,
keys = clientkeys,
buttons = clientbuttons,
screen = awful.screen.preferred,
placement = awful.placement.no_overlap + awful.placement.no_offscreen,
}
},
{ rule_any = {
instance = { "pinentry" },
class = { "Arandr", "Blueman-manager", "Gpick", "Pavucontrol" },
name = { "Event Tester" },
role = { "AlarmWindow", "pop-up" },
}, properties = { floating = true }},
}
-- }}}
-- {{{ Signals
client.connect_signal("manage", function (c)
if awesome.startup
and not c.size_hints.user_position
and not c.size_hints.program_position then
awful.placement.no_offscreen(c)
end
-- New windows open into the stack (to the right); first window becomes master.
if not awesome.startup then
awful.client.setslave(c)
end
c.shape = function(cr, width, height)
-- 8 = corner radius in px
gears.shape.rounded_rect(cr, width, height, 13)
end
end)
-- Focus follows mouse (i3-like). Comment out for click-to-focus only.
client.connect_signal("mouse::enter", function(c)
c:emit_signal("request::activate", "mouse_enter", {raise = false})
end)
client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)
client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
-- }}}
-- Wallpaper
bling.module.wallpaper.setup {
wallpaper = {"/home/jason/Pictures/Wallpapers/farewell.jpg"},
position = "fit",
background = "#181818"
}
-8
View File
@@ -1,8 +0,0 @@
[general]
always_show_help.enabled = true
collapsed_sections = ["staged_changes"]
refresh_on_file_change.enabled = true
stash_list_limit = 20
recent_commits_limit = 100
mouse_support = true
mouse_scroll_lines = 3
-2
View File
@@ -48,11 +48,9 @@ vim.pack.add({
{ src = 'https://github.com/lukas-reineke/indent-blankline.nvim' }, { src = 'https://github.com/lukas-reineke/indent-blankline.nvim' },
{ src = 'https://github.com/slugbyte/lackluster.nvim' }, { src = 'https://github.com/slugbyte/lackluster.nvim' },
{ src = 'https://github.com/xiyaowong/transparent.nvim' }, { src = 'https://github.com/xiyaowong/transparent.nvim' },
{ src = 'https://github.com/norcalli/nvim-colorizer.lua' }
}) })
require("terminal") require("terminal")
require("colorizer").setup()
require("mini.completion").setup() require("mini.completion").setup()
require('mini.statusline').setup({}) require('mini.statusline').setup({})
require("tree-sitter-manager").setup() require("tree-sitter-manager").setup()
+249 -36
View File
@@ -1,41 +1,220 @@
################################# #################################
# Fading # # Fading #
################################# #################################
fading = true; fading = false;
fade-in-step = 0.08; fade-in-step = 0.04;
fade-out-step = 0.08; fade-out-step = 0.04;
#################################
# Transparency / Opacity #
#################################
frame-opacity = 1.0;
################################# #################################
# Corners # # Corners #
################################# #################################
corner-radius = 13; corner-radius = 12;
################################# #################################
# FAST SNAPPY ANIMATIONS # # FAST SNAPPY ANIMATIONS #
################################# #################################
match = "window_type = 'normal'";
animations = ( animations = (
{
triggers = ["open", "show"];
preset = "appear";
duration = 0.20;
},
{
triggers = ["close", "hide"];
preset = "disappear";
duration = 0.20;
},
{
triggers = ["geometry"];
preset = "geometry-change";
duration = 0.30;
}
);
{
triggers = ["close"];
opacity = {
curve = "cubic-bezier(0,1,1,1)";
duration = 0.3;
start = "window-raw-opacity-before";
end = 0;
};
blur-opacity = "opacity";
shadow-opacity = "opacity";
scale-x = {
curve = "cubic-bezier(0,1.3,1,1)";
duration = 0.3;
start = 1;
end = 0.6;
};
scale-y = "scale-x";
offset-x = "(1 - scale-x) / 2 * window-width";
offset-y = "(1 - scale-y) / 2 * window-height";
shadow-scale-x = "scale-x";
shadow-scale-y = "scale-y";
shadow-offset-x = "offset-x";
shadow-offset-y = "offset-y";
},
{
triggers = ["open"];
opacity = {
curve = "cubic-bezier(0,1,1,1)";
duration = 0.5;
start = 0;
end = "window-raw-opacity";
};
blur-opacity = "opacity";
shadow-opacity = "opacity";
scale-x = {
curve = "cubic-bezier(0,1.3,1,1)";
duration = 0.5;
start = 0.6;
end = 1;
};
scale-y = "scale-x";
offset-x = "(1 - scale-x) / 2 * window-width";
offset-y = "(1 - scale-y) / 2 * window-height";
shadow-scale-x = "scale-x";
shadow-scale-y = "scale-y";
shadow-offset-x = "offset-x";
shadow-offset-y = "offset-y";
},
{
triggers = ["geometry"];
scale-x = {
curve = "cubic-bezier(0,0,0,1.28)";
duration = 0.5;
start = "window-width-before / window-width";
end = 1;
};
scale-x-reverse = {
curve = "cubic-bezier(0,0,0,1.28)";
duration = 0.3;
start = "window-width / window-width-before";
end = 1;
};
scale-y = {
curve = "cubic-bezier(0,0,0,1.28)";
duration = 0.5;
start = "window-height-before / window-height";
end = 1;
};
scale-y-reverse = {
curve = "cubic-bezier(0,0,0,1.28)";
duration = 0.5;
start = "window-height / window-height-before";
end = 1;
};
offset-x = {
curve = "cubic-bezier(0,0,0,1.28)";
duration = 0.5;
start = "window-x-before - window-x";
end = 0;
};
offset-y = {
curve = "cubic-bezier(0,0,0,1.28)";
duration = 0.5;
start = "window-y-before - window-y";
end = 0;
};
shadow-scale-x = "scale-x";
shadow-scale-y = "scale-y";
shadow-offset-x = "offset-x";
shadow-offset-y = "offset-y";
},
)
################################# #################################
# General Settings # # General Settings #
################################# #################################
@@ -47,19 +226,53 @@ detect-client-opacity = true;
detect-transient = true; detect-transient = true;
use-damage = true; use-damage = true;
log-level = "warn"; log-level = "warn";
################################# #################################
# Window Rules # # Window Rules #
################################# #################################
rules: ( rules: (
# No rounded corners on dock and desktop # No rounded corners on dock and desktop
{
match = "window_type = 'dock' || window_type = 'desktop'";
corner-radius = 0;
},
{ {
match = "window_type = 'dock' || window_type = 'desktop'"; match = "class_g = 'Rofi'";
corner-radius = 0; animations = (
{
triggers = ["open", "show"];
opacity = {
curve = "cubic-bezier(0, 1, 1, 1)";
duration = 0.2;
start = 0;
end = "window-raw-opacity";
};
shadow-opacity = "opacity";
scale-y = {
curve = "cubic-bezier(0.2, 0, 0, 1)";
duration = 0.2;
start = 0.55;
end = 1;
};
shadow-scale-y = "scale-y";
},
{
triggers = ["close", "hide"];
opacity = {
curve = "cubic-bezier(0, 1, 1, 1)";
duration = 0.15;
start = "window-raw-opacity-before";
end = 0;
};
shadow-opacity = "opacity";
scale-y = {
curve = "cubic-bezier(0.2, 0, 0, 1)";
duration = 0.15;
start = 1;
end = 0.55;
};
shadow-scale-y = "scale-y";
},
);
}, },
# Dim all app windows besides systems stuff
{
match = "focused = 0 && window_type = 'normal' && class_g != 'Rofi'";
dim = 0.45;
}
) )
-132
View File
@@ -1,132 +0,0 @@
;==========================================================
; Polybar config - Qogir themed
; Place at ~/.config/polybar/config.ini
;==========================================================
[colors]
background = #212121
background-alt = #3c3c3c
foreground = #d3dae3
foreground-alt = #000000
accent = #616161
accent-alt = #6ba0e8
red = #e35b5b
green = #98c379
yellow = #e5c07b
disabled = #707880
[bar/main]
width = 100%
height = 35px
radius = 0
fixed-center = true
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 0px
line-color = ${colors.accent}
border-size = 0px
border-color = #00000000
padding-left = 1
padding-right = 1
module-margin = 1
separator = "|"
separator-foreground = ${colors.disabled}
font-0 = "JetBrainsMono Nerd Font:size=14;3"
font-1 = "JetBrainsMono Nerd Font:size=14;3"
modules-left = xworkspaces xwindow
modules-right = filesystem pulseaudio memory cpu eth date tray
cursor-click = pointer
cursor-scroll = ns-resize
enable-ipc = true
;==========================================================
; Workspaces
;==========================================================
[module/xworkspaces]
type = internal/xworkspaces
label-active = " %name% "
label-active-background = ${colors.accent}
label-active-foreground = ${colors.background}
label-active-underline = ${colors.accent-alt}
label-active-padding = 1
label-occupied = " %name% "
label-occupied-foreground = #ffffff
label-occupied-padding = 1
label-urgent = " %name% "
label-urgent-background = ${colors.red}
label-urgent-foreground = ${colors.background}
label-urgent-padding = 1
label-empty = " %name% "
label-empty-foreground = ${colors.disabled}
label-empty-padding = 1
;==========================================================
; Focused window title - focus indicator
;==========================================================
[module/xwindow]
type = internal/xwindow
label = %title%
label-foreground = #ffffff
label-padding = 1
;==========================================================
; Date / time
;==========================================================
[module/date]
type = internal/date
interval = 1
;date = %Y-%m-%d %H:%M:%S
date = %Y-%m-%d %H:%M
date-alt = %H:%M
label = %date%
label-foreground = ${colors.foreground}
label-padding = 1
;==========================================================
; Pulseaudio
;==========================================================
[module/pulseaudio]
type = internal/pulseaudio
format-volume-prefix = "VOL "
format-volume-prefix-foreground = ${colors.accent}
format-volume = <label-volume>
label-volume = %percentage%%
label-volume-padding = 1
label-muted = "MUTED"
label-muted-foreground = ${colors.disabled}
label-muted-padding = 1
;==========================================================
; Pulseaudio
;==========================================================
[module/tray]
type = internal/tray
tray-maxsize = 16
tray-padding = 4
tray-background = ${colors.background}
;==========================================================
; Settings
;==========================================================
[settings]
screenchange-reload = true
pseudo-transparency = false
-9
View File
@@ -1,9 +0,0 @@
#!/usr/bin/env bash
# Terminate already running bar instances
pkill -x polybar
# Wait until the processes have been shut down
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
polybar main &
+118 -115
View File
@@ -1,142 +1,145 @@
configuration { * {
display-run: "# "; /* -- Palette, matches colors{} in awesome rc.lua -- */
display-drun: "App "; bg0: #111111; /* colors.background */
font: "Inter 14"; bg1: #1a1a1a; /* colors.background_alt */
auto-select: false; fg0: #d3dae3; /* colors.foreground */
terminal: "terminator"; fg-selected: #ffffff; /* colors.white */
run-shell-command: "{terminal} -e \"bash -c '{cmd};bash'\""; accent: #616161; /* colors.accent */
separator-style: "solid"; accent-alt: #6ba0e8; /* colors.accent_alt */
show-icons: true; red: #e35b5b; /* colors.red */
kb-row-last: ""; disabled: #707880; /* colors.disabled */
kb-row-first: "";
kb-move-front: "Home"; font: "JetBrainsMono Nerd Font 14";
kb-move-end: "End";
kb-element-next: "Alt+Tab"; background-color: transparent;
kb-element-prev: "Alt+Shift+Tab"; text-color: @fg0;
kb-row-select: "Tab";
kb-row-down: "Control+n";
kb-row-up: "Control+p";
kb-clear-line: "Control+a";
click-to-exit: false;
disable-history: false;
run,drun {
fallback-icon: "exec";
}
} }
window { window {
width: 700px; transparency: "real";
background-color: #212121;
border: 0; /* Anchor top-center, right below the wibar. */
padding: 0; location: north;
children: [ vertbox ]; anchor: north;
orientation: vertical; y-offset: 38px;
children: [ inputbar, listview ];
spacing: 0; width: 32em;
height: 26em; /* fixed — box size no longer changes with result count */
background-color: @bg0;
border: 3px;
border-color: @accent;
border-radius: 13px; /* matches gears.shape.rounded_rect radius in rc.lua */
padding: 14px;
} }
mode-switcher { mainbox {
margin: 0; children: [ inputbar, message, listview, mode-switcher ];
expand: true; spacing: 10px;
} background-color: transparent;
button {
font: "Inter 13";
expand: false;
padding: 3px 15px 7px 20px;
text-color: #707880;
border: 2px 0 0 0;
border-color: transparent;
}
button selected.normal {
text-color: #d3dae3;
border-color: #5294e2;
border: 2px 0 0 0;
background-color: transparent;
}
error-message {
border: 0;
background-color: #212121;
padding: 10px 25px;
} }
/* -- Search field -- */
inputbar { inputbar {
font: "Inter 15"; children: [ prompt, entry ];
background-color: #212121; spacing: 10px;
border-color: #1c1c1c; background-color: @bg1;
border: 0 0 1px solid 0; border-radius: 10px;
padding: 10px 15px; padding: 10px 14px;
children: [ prompt, entry, num-filtered-rows, textbox-slash, num-rows ];
}
textbox-slash {
padding: 0 5px;
content: "/";
expand: false;
text-color: #707880;
}
entry {
placeholder: "";
text-color: #d3dae3;
} }
prompt { prompt {
text-color: #5294e2; text-color: @accent-alt;
} }
num-filtered-rows, entry {
num-rows { placeholder: "Search";
text-color: #707880; placeholder-color: @disabled;
text-color: @fg0;
cursor: text;
} }
/* -- List/grid toggle icons, top-right (matches screenshot) -- */
mode-switcher {
enabled: false; /* flip to true if you use rofi's built-in mode tabs */
}
/* -- Results -- */
listview { listview {
scrollbar: false; lines: 8;
expand: true; columns: 1;
border: 0 0 1px 0; spacing: 6px;
border-color: #1c1c1c; scrollbar: false;
padding: 0; background-color: transparent;
background-color: #212121; fixed-height: true; /* box height stays locked, doesn't shrink/grow with result count */
children: [element-icon, element-text]; dynamic: false; /* don't resize dynamically as you type either */
}
scrollbar {
handle-color: #707880;
border-radius: 5px;
}
toolbar {
orientation: horizontal;
children: [ mode-switcher ];
expand: false;
padding: 0 5px 3px 0;
background-color: #212121;
} }
/*
* Rofi tracks row state as a combination of position (normal/alternate,
* i.e. even/odd rows for banding) and status (normal/urgent/active/selected).
* Each combination needs its own selector or a competing @theme import
* (if you have one elsewhere in your rofi config) can still win on states
* this file doesn't explicitly cover. Pinning all of them here.
*/
element { element {
padding: 9px 10px; padding: 10px 12px;
cursor: default; border-radius: 10px;
orientation: horizontal;
} }
element.normal.normal, element normal.normal,
element.normal.urgent, element alternate.normal {
element.normal.active, background-color: @bg1;
element.alternate.normal, text-color: @fg0;
element.alternate.urgent,
element.alternate.active {
background-color: #212121;
text-color: #d3dae3;
} }
element.selected.normal, element normal.urgent,
element.selected.urgent, element alternate.urgent {
element.selected.active { background-color: @bg1;
background-color: #424242; text-color: @red;
text-color: #d3dae3; }
element normal.active,
element alternate.active {
background-color: @bg1;
text-color: @accent-alt;
}
element selected.normal {
background-color: @accent;
text-color: @fg-selected;
}
element selected.urgent {
background-color: @red;
text-color: @fg-selected;
}
element selected.active {
background-color: @accent-alt;
text-color: @bg0;
} }
element-icon { element-icon {
padding: 0 7px 0 0; size: 24px;
padding: 0 12px 0 0;
vertical-align: 0.5;
background-color: transparent;
}
element-text {
vertical-align: 0.5;
text-color: inherit;
background-color: transparent;
}
message {
background-color: @bg1;
border-radius: 10px;
padding: 8px 12px;
}
textbox {
text-color: @fg0;
} }
+3 -3
View File
@@ -88,7 +88,7 @@ if [ "$DO_LINKS" = true ]; then
link_file "$DOTFILES_DIR/config/alacritty" "$HOME/.config/alacritty" link_file "$DOTFILES_DIR/config/alacritty" "$HOME/.config/alacritty"
link_file "$DOTFILES_DIR/config/lf" "$HOME/.config/lf" link_file "$DOTFILES_DIR/config/lf" "$HOME/.config/lf"
link_file "$DOTFILES_DIR/config/picom" "$HOME/.config/picom" link_file "$DOTFILES_DIR/config/picom" "$HOME/.config/picom"
link_file "$DOTFILES_DIR/config/polybar" "$HOME/.config/polybar" link_file "$DOTFILES_DIR/config/awesome" "$HOME/.config/awesome"
link_file "$DOTFILES_DIR/config/rofi" "$HOME/.config/rofi" link_file "$DOTFILES_DIR/config/rofi" "$HOME/.config/rofi"
link_file "$DOTFILES_DIR/config/nvim" "$HOME/.config/nvim" link_file "$DOTFILES_DIR/config/nvim" "$HOME/.config/nvim"
link_file "$DOTFILES_DIR/scripts/bin" "$HOME/.local/bin" link_file "$DOTFILES_DIR/scripts/bin" "$HOME/.local/bin"
@@ -153,11 +153,11 @@ if [ "$DO_INSTALL" = true ]; then
# core utilities # core utilities
git unzip jq fzf tree direnv make git unzip jq fzf tree direnv make
# modern cli replacements # modern cli replacements
lf fd ripgrep bat delta lf fd ripgrep bat delta lazygit
# shell & terminal # shell & terminal
fish-shell alacritty fish-shell alacritty
# build & dev tools # build & dev tools
base-devel valgrind tree-sitter-cli go base-devel valgrind tree-sitter-cli go
# system # system
pfetch fuse pfetch fuse
# window manager & desktop # window manager & desktop
-6
View File
@@ -1,6 +0,0 @@
#!/bin/bash
/usr/bin/alacritty &
sleep 0.1
# xdotool windowactivate
/home/jason/.local/bin/tile
-6
View File
@@ -1,6 +0,0 @@
#!/bin/bash
/usr/bin/chromium --password-store=basic &
sleep 0.4
# xdotool windowactivate
/home/jason/.local/bin/tile
-200
View File
@@ -1,200 +0,0 @@
#!/bin/bash
set -e
# --- CONFIG ---
TOP_BAR=36
DECOR_H=30
DECOR_W=5
MASTER_RATIO_NUM=1
MASTER_RATIO_DEN=2
OUTER_GAP=8
INNER_GAP=8
# Master selection:
# focused = currently focused window
# first = first window on desktop
# last = last window on desktop
MASTER_MODE="focused"
# ----------------
# Get current screen resolution
read SCREEN_W SCREEN_H <<< $(xrandr | awk '
/\*/ {
split($1,a,"x")
print a[1], a[2]
exit
}')
USABLE_H=$((SCREEN_H - TOP_BAR))
# Work area after outer gaps
WORK_X=$OUTER_GAP
WORK_Y=$((TOP_BAR + OUTER_GAP))
WORK_W=$((SCREEN_W - 2 * OUTER_GAP))
WORK_H=$((USABLE_H - 2 * OUTER_GAP))
# --- focused window ---
FOCUSED=$(printf "0x%08x" "$(xdotool getactivewindow)")
# --- current desktop ---
CUR_DESKTOP=$(xdotool get_desktop)
# --- collect windows on current desktop ---
ALL_WINDOWS=$(wmctrl -l -x | awk '$2!="-1" {print $1}')
WINDOWS=()
for w in $ALL_WINDOWS; do
win_desktop=$(xdotool get_desktop_for_window "$(printf "%d" "$w")" 2>/dev/null) || continue
if [ "$win_desktop" = "$CUR_DESKTOP" ]; then
WINDOWS+=("$w")
fi
done
if [ ${#WINDOWS[@]} -eq 0 ]; then
echo "No windows found on current desktop."
exit 1
fi
# ----------------------------------------------------
# Determine master window
# ----------------------------------------------------
case "$MASTER_MODE" in
focused)
MASTER="$FOCUSED"
;;
first)
MASTER="${WINDOWS[0]}"
;;
last)
MASTER="${WINDOWS[$((${#WINDOWS[@]} - 1))]}"
;;
*)
echo "Invalid MASTER_MODE: $MASTER_MODE"
exit 1
;;
esac
# --- separate master from stack ---
STACK=()
for w in "${WINDOWS[@]}"; do
if [ "$w" != "$MASTER" ]; then
STACK+=("$w")
fi
done
place() {
local id=$1
local x=$2
local y=$3
local raw_w=$4
local raw_h=$5
local class decor_h decor_w x_offset y_offset
x_offset=0
y_offset=0
class=$(xprop -id "$id" WM_CLASS 2>/dev/null | sed -r 's/.*"(.*)"$/\1/')
case "$class" in
Alacritty)
decor_h=42
decor_w=8
;;
Chromium)
decor_h=42
decor_w=5
;;
obsidian)
decor_h=5
decor_w=0
x_offset=-0
y_offset=-0
;;
dev.zed.Zed)
decor_h=-19
decor_w=-23
x_offset=-13
y_offset=-13
;;
*)
decor_h=$DECOR_H
decor_w=$DECOR_W
;;
esac
local w=$((raw_w - decor_w))
local h=$((raw_h - decor_h))
local fx=$((x + x_offset))
local fy=$((y + y_offset))
wmctrl -i -r "$id" -b remove,maximized_vert,maximized_horz
wmctrl -i -r "$id" -e 1,"$fx","$fy","$w","$h"
}
# ----------------------------------------------------
# Single window
# ----------------------------------------------------
if [ ${#WINDOWS[@]} -eq 1 ]; then
place \
"$MASTER" \
"$WORK_X" \
"$WORK_Y" \
"$WORK_W" \
"$WORK_H"
exit 0
fi
# ----------------------------------------------------
# Master / Stack layout
# ----------------------------------------------------
MID=$((WORK_W * MASTER_RATIO_NUM / MASTER_RATIO_DEN))
MASTER_X=$WORK_X
MASTER_Y=$WORK_Y
MASTER_W=$((MID - INNER_GAP / 2))
MASTER_H=$WORK_H
STACK_X=$((WORK_X + MID + INNER_GAP / 2))
STACK_Y=$WORK_Y
STACK_W=$((WORK_W - MID - INNER_GAP / 2))
STACK_H=$WORK_H
# --- place master ---
place \
"$MASTER" \
"$MASTER_X" \
"$MASTER_Y" \
"$MASTER_W" \
"$MASTER_H"
# --- place stack ---
COUNT=${#STACK[@]}
if [ "$COUNT" -gt 0 ]; then
SLOT_H=$(((STACK_H - INNER_GAP * (COUNT - 1)) / COUNT))
i=0
for w in "${STACK[@]}"; do
SLOT_Y=$((STACK_Y + i * (SLOT_H + INNER_GAP)))
place \
"$w" \
"$STACK_X" \
"$SLOT_Y" \
"$STACK_W" \
"$SLOT_H"
i=$((i + 1))
done
fi
-78
View File
@@ -1,78 +0,0 @@
#!/bin/bash
# focus-dir.sh - focus the nearest window in a given direction (h/j/k/l)
# Usage: focus-dir.sh h|j|k|l (or left/down/up/right)
DIR=$1
if [ -z "$DIR" ]; then
echo "Usage: $0 h|j|k|l"
exit 1
fi
# --- get current desktop ---
CUR_DESKTOP=$(xdotool get_desktop)
# --- get focused window geometry ---
FOCUSED=$(xdotool getactivewindow)
read -r FX FY FW FH < <(xdotool getwindowgeometry --shell "$FOCUSED" | awk -F= '
/^X=/ {x=$2} /^Y=/ {y=$2} /^WIDTH=/ {w=$2} /^HEIGHT=/ {h=$2}
END {print x, y, w, h}
')
FCX=$((FX + FW / 2))
FCY=$((FY + FH / 2))
# --- get list of normal windows on current desktop ---
ALL_WINDOWS=$(wmctrl -l -x | awk '$2!="-1" {print $1}')
BEST=""
BEST_DIST=""
for w in $ALL_WINDOWS; do
wid=$(printf "%d" "$w")
[ "$wid" = "$FOCUSED" ] && continue
win_desktop=$(xdotool get_desktop_for_window "$wid" 2>/dev/null) || continue
[ "$win_desktop" = "$CUR_DESKTOP" ] || continue
read -r WX WY WW WH < <(xdotool getwindowgeometry --shell "$wid" | awk -F= '
/^X=/ {x=$2} /^Y=/ {y=$2} /^WIDTH=/ {w=$2} /^HEIGHT=/ {h=$2}
END {print x, y, w, h}
')
WCX=$((WX + WW / 2))
WCY=$((WY + WH / 2))
DX=$((WCX - FCX))
DY=$((WCY - FCY))
case "$DIR" in
h|left)
[ "$DX" -ge 0 ] && continue
;;
l|right)
[ "$DX" -le 0 ] && continue
;;
k|up)
[ "$DY" -ge 0 ] && continue
;;
j|down)
[ "$DY" -le 0 ] && continue
;;
*)
echo "Invalid direction: $DIR"
exit 1
;;
esac
# Manhattan distance, weighted to prefer windows roughly in line
DIST=$(( (DX<0?-DX:DX) + (DY<0?-DY:DY) ))
if [ -z "$BEST_DIST" ] || [ "$DIST" -lt "$BEST_DIST" ]; then
BEST_DIST=$DIST
BEST=$wid
fi
done
if [ -n "$BEST" ]; then
xdotool windowactivate "$BEST"
fi