diff --git a/awesome/.config/awesome/autorun.sh b/awesome/.config/awesome/autorun.sh new file mode 100755 index 0000000..8c7447e --- /dev/null +++ b/awesome/.config/awesome/autorun.sh @@ -0,0 +1,29 @@ +#!/bin/sh + +run() { + if ! pgrep -f "$1" ; + then + "$@"& + fi +} + +run "picom" +run "unclutter" +run "firefox" +run "copyq" +run "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1" +run "nm-applet" +run "batsignal" +run "redshift" +run "sunshine" + +killall -q polybar +polybar left & +polybar right & +polybar middle & +polybar tray & +polybar xwindow & + +pkill xidlehook +xidlehook --detect-sleep --not-when-audio --timer 300 'cool-retro-term --fullscreen -e sh ~/cmatrix.sh' '' --timer 600 'pkill cool-retro-term && systemctl suspend' '' + diff --git a/awesome/.config/awesome/calendar.lua b/awesome/.config/awesome/calendar.lua new file mode 100644 index 0000000..4900913 --- /dev/null +++ b/awesome/.config/awesome/calendar.lua @@ -0,0 +1,269 @@ +------------------------------------------------- +-- Calendar Widget for Awesome Window Manager +-- Shows the current month and supports scroll up/down to switch month +-- More details could be found here: +-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/calendar-widget + +-- @author Pavel Makhov +-- @copyright 2019 Pavel Makhov +------------------------------------------------- + +local awful = require("awful") +local beautiful = require("beautiful") +local wibox = require("wibox") +local gears = require("gears") +local naughty = require("naughty") + +local calendar_widget = {} + +local function worker(user_args) + + local calendar_themes = { + nord = { + bg = '#2E3440', + fg = '#D8DEE9', + focus_date_bg = '#88C0D0', + focus_date_fg = '#000000', + weekend_day_bg = '#3B4252', + weekday_fg = '#88C0D0', + header_fg = '#E5E9F0', + border = '#4C566A' + }, + outrun = { + bg = '#0d0221', + fg = '#D8DEE9', + focus_date_bg = '#650d89', + focus_date_fg = '#2de6e2', + weekend_day_bg = '#261447', + weekday_fg = '#2de6e2', + header_fg = '#f6019d', + border = '#261447' + }, + dark = { + bg = '#000000', + fg = '#ffffff', + focus_date_bg = '#ffffff', + focus_date_fg = '#000000', + weekend_day_bg = '#444444', + weekday_fg = '#ffffff', + header_fg = '#ffffff', + border = '#333333' + }, + light = { + bg = '#ffffff', + fg = '#000000', + focus_date_bg = '#000000', + focus_date_fg = '#ffffff', + weekend_day_bg = '#AAAAAA', + weekday_fg = '#000000', + header_fg = '#000000', + border = '#CCCCCC' + }, + monokai = { + bg = '#272822', + fg = '#F8F8F2', + focus_date_bg = '#AE81FF', + focus_date_fg = '#ffffff', + weekend_day_bg = '#75715E', + weekday_fg = '#FD971F', + header_fg = '#F92672', + border = '#75715E' + }, + catppuccin = { + bg = '#181825', + fg = '#F8F8F2', + focus_date_bg = '#b4befe', + focus_date_fg = '#ffffff', + weekend_day_bg = '#1e1e2e', + weekday_fg = '#f2cdcd', + header_fg = '#cba6f7', + border = '#181825' + }, + naughty = { + bg = beautiful.notification_bg or beautiful.bg, + fg = beautiful.notification_fg or beautiful.fg, + focus_date_bg = beautiful.notification_fg or beautiful.fg, + focus_date_fg = beautiful.notification_bg or beautiful.bg, + weekend_day_bg = beautiful.bg_focus, + weekday_fg = beautiful.fg, + header_fg = beautiful.fg, + border = beautiful.border_normal + } + + } + + local args = user_args or {} + + if args.theme ~= nil and calendar_themes[args.theme] == nil then + naughty.notify({ + preset = naughty.config.presets.critical, + title = 'Calendar Widget', + text = 'Theme "' .. args.theme .. '" not found, fallback to default'}) + args.theme = 'naughty' + end + + local theme = args.theme or 'naughty' + local placement = args.placement or 'top' + local radius = args.radius or 8 + local next_month_button = args.next_month_button or 4 + local previous_month_button = args.previous_month_button or 5 + local start_sunday = args.start_sunday or false + + local styles = {} + local function rounded_shape(size) + return function(cr, width, height) + gears.shape.rounded_rect(cr, width, height, size) + end + end + + styles.month = { + padding = 4, + bg_color = calendar_themes[theme].bg, + border_width = 0, + } + + styles.normal = { + markup = function(t) return t end, + shape = rounded_shape(4) + } + + styles.focus = { + fg_color = calendar_themes[theme].focus_date_fg, + bg_color = calendar_themes[theme].focus_date_bg, + markup = function(t) return '' .. t .. '' end, + shape = rounded_shape(4) + } + + styles.header = { + fg_color = calendar_themes[theme].header_fg, + bg_color = calendar_themes[theme].bg, + markup = function(t) return '' .. t .. '' end + } + + styles.weekday = { + fg_color = calendar_themes[theme].weekday_fg, + bg_color = calendar_themes[theme].bg, + markup = function(t) return '' .. t .. '' end, + } + + local function decorate_cell(widget, flag, date) + if flag == 'monthheader' and not styles.monthheader then + flag = 'header' + end + + -- highlight only today's day + if flag == 'focus' then + local today = os.date('*t') + if not (today.month == date.month and today.year == date.year) then + flag = 'normal' + end + end + + local props = styles[flag] or {} + if props.markup and widget.get_text and widget.set_markup then + widget:set_markup(props.markup(widget:get_text())) + end + -- Change bg color for weekends + local d = { year = date.year, month = (date.month or 1), day = (date.day or 1) } + local weekday = tonumber(os.date('%w', os.time(d))) + local default_bg = (weekday == 0 or weekday == 6) + and calendar_themes[theme].weekend_day_bg + or calendar_themes[theme].bg + local ret = wibox.widget { + { + { + widget, + halign = 'center', + widget = wibox.container.place + }, + margins = (props.padding or 2) + (props.border_width or 0), + widget = wibox.container.margin + }, + shape = props.shape, + shape_border_color = props.border_color or '#000000', + shape_border_width = props.border_width or 0, + fg = props.fg_color or calendar_themes[theme].fg, + bg = props.bg_color or default_bg, + widget = wibox.container.background + } + + return ret + end + + local cal = wibox.widget { + date = os.date('*t'), + font = beautiful.get_font(), + fn_embed = decorate_cell, + long_weekdays = true, + start_sunday = start_sunday, + widget = wibox.widget.calendar.month + } + + local popup = awful.popup { + ontop = true, + visible = false, + shape = rounded_shape(radius), + offset = { y = 5 }, + border_width = 1, + border_color = calendar_themes[theme].border, + widget = cal + } + + popup:buttons( + awful.util.table.join( + awful.button({}, next_month_button, function() + local a = cal:get_date() + a.month = a.month + 1 + cal:set_date(nil) + cal:set_date(a) + popup:set_widget(cal) + end), + awful.button({}, previous_month_button, function() + local a = cal:get_date() + a.month = a.month - 1 + cal:set_date(nil) + cal:set_date(a) + popup:set_widget(cal) + end) + ) + ) + + function calendar_widget.toggle() + + if popup.visible then + -- to faster render the calendar refresh it and just hide + cal:set_date(nil) -- the new date is not set without removing the old one + cal:set_date(os.date('*t')) + popup:set_widget(nil) -- just in case + popup:set_widget(cal) + popup.visible = not popup.visible + else + if placement == 'top' then + awful.placement.top(popup, { margins = { top = 50 }, parent = awful.screen.focused() }) + elseif placement == 'top_right' then + awful.placement.top_right(popup, { margins = { top = 30, right = 10}, parent = awful.screen.focused() }) + elseif placement == 'top_left' then + awful.placement.top_left(popup, { margins = { top = 30, left = 10}, parent = awful.screen.focused() }) + elseif placement == 'bottom_right' then + awful.placement.bottom_right(popup, { margins = { bottom = 30, right = 10}, + parent = awful.screen.focused() }) + elseif placement == 'bottom_left' then + awful.placement.bottom_left(popup, { margins = { bottom = 30, left = 10}, + parent = awful.screen.focused() }) + else + awful.placement.top(popup, { margins = { top = 50 }, parent = awful.screen.focused() }) + end + + popup.visible = true + + end + end + + return calendar_widget + +end + +return setmetatable(calendar_widget, { __call = function(_, ...) + return worker(...) +end }) + diff --git a/awesome/.config/awesome/kpolybar.sh b/awesome/.config/awesome/kpolybar.sh new file mode 100755 index 0000000..90aea8c --- /dev/null +++ b/awesome/.config/awesome/kpolybar.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +killall -q polybar diff --git a/awesome/.config/awesome/rc.lua b/awesome/.config/awesome/rc.lua new file mode 100644 index 0000000..1e011c1 --- /dev/null +++ b/awesome/.config/awesome/rc.lua @@ -0,0 +1,688 @@ +-- awesome_mode: api-level=4:screen=on +-- If LuaRocks is installed, make sure that packages installed through it are +-- found (e.g. lgi). If LuaRocks is not installed, do nothing. +pcall(require, "luarocks.loader") + +-- Standard awesome library +local gears = require("gears") +local awful = require("awful") +require("awful.autofocus") +-- Widget and layout library +local wibox = require("wibox") +-- Theme handling library +local beautiful = require("beautiful") +-- Notification library +local naughty = require("naughty") +-- Declarative object management +local ruled = require("ruled") +local hotkeys_popup = require("awful.hotkeys_popup") +-- Enable hotkeys help widget for VIM and other apps +-- when client with a matching name is opened: +require("awful.hotkeys_popup.keys") + +local dpi = beautiful.xresources.apply_dpi + +-- {{{ Error handling +-- Check if awesome encountered an error during startup and fell back to +-- another config (This code will only ever execute for the fallback config) +naughty.connect_signal("request::display_error", function(message, startup) + naughty.notification({ + urgency = "critical", + title = "Oops, an error happened" .. (startup and " during startup!" or "!"), + message = message, + }) +end) +-- }}} + +-- {{{ Variable definitions +-- Themes define colours, icons, font and wallpapers. +beautiful.init("~/.config/awesome/theme-def.lua") + +-- This is used later as the default terminal and editor to run. +terminal = "wezterm" +editor = os.getenv("EDITOR") or "nvim" +editor_cmd = terminal .. " -e " .. editor + +-- Default modkey. +-- Usually, Mod4 is the key with a logo between Control and Alt. +-- If you do not like this or do not have such a key, +-- I suggest you to remap Mod4 to another key using xmodmap or other tools. +-- However, you can use another modifier like Mod1, but it may interact with others. +modkey = "Mod4" +-- }}} + +-- {{{ Menu + +polybar = { + { + "Kill bar", + function() + awful.spawn.with_shell("sh ~/.config/awesome/kpolybar.sh") + end, + }, + { + "Spawn bar", + function() + awful.spawn.with_shell("sh ~/.config/awesome/spolybar.sh") + end, + }, +} + +mymainmenu = awful.menu({ + items = { + { + "Apps", + function() + awful.spawn.with_shell("sleep 0.5s && sh ~/.config/rofi/launchers/type-6/launcher.sh") + end, + }, + { + "Nemo", + function() + awful.spawn.with_shell("nemo") + end, + }, + { + "Scrshot", + function() + awful.spawn.with_shell("sleep 0.5s && flameshot full") + end, + }, + { "Terminal", terminal }, + { "Polybar", polybar, beautiful.menu_submenu_icon }, + { + "Xkill", + function() + awful.spawn.with_shell("sleep 0.5s && xkill") + end, + }, + { "Restart", awesome.restart }, + { + "Quit", + function() + awesome.quit() + end, + }, + }, +}) + +-- {{{ Tag layout +-- Table of layouts to cover with awful.layout.inc, order matters. +tag.connect_signal("request::default_layouts", function() + awful.layout.append_default_layouts({ + awful.layout.suit.spiral.dwindle, + awful.layout.suit.floating, + }) +end) +-- }}} + +-- {{{ Wallpaper +screen.connect_signal("request::wallpaper", function(s) + awful.wallpaper({ + screen = s, + widget = { + { + image = beautiful.wallpaper, + upscale = true, + downscale = true, + widget = wibox.widget.imagebox, + }, + valign = "center", + halign = "center", + tiled = false, + widget = wibox.container.tile, + }, + }) +end) +-- }}} + +-- {{{ Tags +screen.connect_signal("request::desktop_decoration", function(s) + -- Each screen has its own tag table. + local names = { "1", "2", "3", "4", "5" } + local l = awful.layout.suit + local layouts = { l.spiral.dwindle, l.spiral.dwindle, l.spiral.dwindle, l.spiral.dwindle, l.floating } + awful.tag(names, s, layouts) +end) +-- }}} + +-- {{{ Mouse bindings +awful.mouse.append_global_mousebindings({ + awful.button({}, 3, function() + mymainmenu:toggle() + end), + awful.button({}, 4, awful.tag.viewprev), + awful.button({}, 5, awful.tag.viewnext), +}) +-- }}} + +-- {{{ Calendar widget +local calendar_widget = require("calendar") +local cw = calendar_widget({ + theme = "catppuccin", + placement = "top center", + start_sunday = false, + radius = 8, +}) +-- }}} + +-- {{{ Key bindings + +-- General Awesome keys +awful.keyboard.append_global_keybindings({ + awful.key({ modkey }, "s", hotkeys_popup.show_help, { description = "show help", group = "awesome" }), + awful.key({ modkey, "Control" }, "r", awesome.restart, { description = "reload awesome", group = "awesome" }), + awful.key({ modkey, "Shift" }, "q", awesome.quit, { description = "quit awesome", group = "awesome" }), + awful.key({ modkey }, "Return", function() + awful.spawn(terminal) + end, { description = "open a terminal", group = "launcher" }), + + awful.key({}, "XF86AudioRaiseVolume", function() + awful.spawn.with_shell("pactl set-sink-volume @DEFAULT_SINK@ +5%") + end), + + awful.key({}, "XF86AudioMute", function() + awful.spawn.with_shell("pactl set-sink-mute @DEFAULT_SINK@ toggle") + end), + + awful.key({}, "F6", function() + awful.util.spawn("playerctl play-pause", false) + end), + + awful.key({}, "F8", function() + awful.util.spawn("playerctl next", false) + end), + + awful.key({}, "F7", function() + awful.util.spawn("playerctl previous", false) + end), + + awful.key({}, "XF86AudioLowerVolume", function() + awful.spawn.with_shell("pactl set-sink-volume @DEFAULT_SINK@ -5%") + end), + + awful.key({}, "XF86MonBrightnessDown", function() + awful.util.spawn("brightnessctl s 10%-") + end), + + awful.key({}, "XF86MonBrightnessUp", function() + awful.util.spawn("brightnessctl s +10%") + end), +}) + +-- Tags related keybindings +awful.keyboard.append_global_keybindings({ + awful.key({ modkey }, "Left", awful.tag.viewprev, { description = "view previous", group = "tag" }), + awful.key({ modkey }, "Right", awful.tag.viewnext, { description = "view next", group = "tag" }), + awful.key({ modkey }, "Escape", awful.tag.history.restore, { description = "go back", group = "tag" }), +}) + +-- Focus related keybindings +awful.keyboard.append_global_keybindings({ + awful.key({ "Mod1" }, "Tab", function() + awful.client.focus.byidx(1) + end, { description = "focus next by index", group = "client" }), + awful.key({ modkey, "Control" }, "j", function() + awful.screen.focus_relative(1) + end, { description = "focus the next screen", group = "screen" }), + awful.key({ modkey, "Control" }, "k", function() + awful.screen.focus_relative(-1) + end, { description = "focus the previous screen", group = "screen" }), + awful.key({ modkey, "Control" }, "n", function() + local c = awful.client.restore() + -- Focus restored client + if c then + c:activate({ raise = true, context = "key.unminimize" }) + end + end, { description = "restore minimized", group = "client" }), +}) + +-- Layout related keybindings +awful.keyboard.append_global_keybindings({ + awful.key({ modkey, "Shift" }, "j", function() + awful.client.swap.byidx(1) + end, { description = "swap with next client by index", group = "client" }), + awful.key({ modkey, "Shift" }, "k", function() + awful.client.swap.byidx(-1) + end, { description = "swap with previous client by index", group = "client" }), + awful.key({ modkey }, "u", awful.client.urgent.jumpto, { description = "jump to urgent client", group = "client" }), + awful.key({ modkey }, "l", function() + awful.tag.incmwfact(0.05) + end, { description = "increase master width factor", group = "layout" }), + awful.key({ modkey }, "h", function() + awful.tag.incmwfact(-0.05) + end, { description = "decrease master width factor", group = "layout" }), + awful.key({ modkey, "Shift" }, "h", function() + awful.tag.incnmaster(1, nil, true) + end, { description = "increase the number of master clients", group = "layout" }), + awful.key({ modkey, "Shift" }, "l", function() + awful.tag.incnmaster(-1, nil, true) + end, { description = "decrease the number of master clients", group = "layout" }), + awful.key({ modkey, "Control" }, "h", function() + awful.tag.incncol(1, nil, true) + end, { description = "increase the number of columns", group = "layout" }), + awful.key({ modkey, "Control" }, "l", function() + awful.tag.incncol(-1, nil, true) + end, { description = "decrease the number of columns", group = "layout" }), + awful.key({ modkey, "Control" }, "space", function() + awful.layout.inc(1) + end, { description = "select next", group = "layout" }), + awful.key({ modkey, "Shift" }, "space", function() + awful.layout.inc(-1) + end, { description = "select previous", group = "layout" }), + + -- Prompt + awful.key({ modkey }, "a", function() + awful.spawn.with_shell("sh ~/.config/rofi/launchers/type-6/launcher.sh") + end, { description = "run rofi apps", group = "launcher" }), + + awful.key({ modkey }, "r", function() + awful.spawn.with_shell("sh ~/.config/rofi/launchers/type-6/launcher2.sh") + end, { description = "run rofi programs", group = "launcher" }), + + awful.key({ modkey }, "w", function() + awful.spawn.with_shell("sh ~/.config/rofi/launchers/type-6/launcher1.sh") + end, { description = "run rofi windows", group = "launcher" }), + + awful.key({ modkey }, "e", function() + awful.spawn.with_shell("nemo") + end, { description = "run nemo", group = "launcher" }), + + awful.key({ modkey }, "`", function() + awful.spawn.with_shell("sh ~/.config/rofi/powermenu/type-6/powermenu.sh") + end, { description = "power options", group = "awesome" }), + + awful.key({ modkey }, "c", function() + cw.toggle() + end, { description = "calendar popup", group = "launcher" }), + + awful.key({}, "F4", function() + awful.spawn.with_shell("flameshot gui") + end, { description = "run flameshot", group = "launcher" }), + + awful.key({ modkey }, "p", function() + awful.spawn.with_shell("scrcpy -S --power-off-on-close --window-x 10") + end, { description = "run scrcpy", group = "launcher" }), + + awful.key({ modkey }, "z", function() + awful.spawn.with_shell("sh ~/.config/awesome/kpolybar.sh") + end, { description = "kill polybar", group = "launcher" }), + + awful.key({ modkey }, "x", function() + awful.spawn.with_shell("sh ~/.config/awesome/spolybar.sh") + end, { description = "run polybar", group = "launcher" }), +}) + +awful.keyboard.append_global_keybindings({ + awful.key({ + modifiers = { modkey }, + keygroup = "numrow", + description = "only view tag", + group = "tag", + on_press = function(index) + local screen = awful.screen.focused() + local tag = screen.tags[index] + if tag then + tag:view_only() + end + end, + }), + awful.key({ + modifiers = { modkey, "Shift" }, + keygroup = "numrow", + description = "move focused client to tag", + group = "tag", + on_press = function(index) + if client.focus then + local tag = client.focus.screen.tags[index] + if tag then + client.focus:move_to_tag(tag) + end + end + end, + }), +}) + +client.connect_signal("request::default_mousebindings", function() + awful.mouse.append_client_mousebindings({ + awful.button({}, 1, function(c) + c:activate({ context = "mouse_click" }) + end), + awful.button({ modkey }, 1, function(c) + c:activate({ context = "mouse_click", action = "mouse_move" }) + end), + awful.button({ modkey }, 3, function(c) + c:activate({ context = "mouse_click", action = "mouse_resize" }) + end), + }) +end) + +client.connect_signal("request::default_keybindings", function() + awful.keyboard.append_client_keybindings({ + awful.key({ modkey }, "f", function(c) + c.fullscreen = not c.fullscreen + c:raise() + end, { description = "toggle fullscreen", group = "client" }), + awful.key({ modkey }, "q", function(c) + c:kill() + end, { description = "close", group = "client" }), + awful.key({ modkey }, "space", function(c) + awful.client.floating.toggle(c) + c.width = 1000 + c.height = 550 + awful.placement.centered(c) + end, { description = "toggle floating", group = "client" }), + awful.key({ modkey, "Control" }, "Return", function(c) + c:swap(awful.client.getmaster()) + end, { description = "move to master", group = "client" }), + awful.key({ modkey }, "o", function(c) + c:move_to_screen() + end, { description = "move to screen", group = "client" }), + awful.key({ modkey }, "t", function(c) + c.ontop = not c.ontop + end, { description = "toggle keep on top", group = "client" }), + awful.key({ modkey }, "n", function(c) + -- The client currently has the input focus, so it cannot be + -- minimized, since minimized clients can't have the focus. + c.minimized = true + end, { description = "minimize", group = "client" }), + awful.key({ modkey }, "m", function(c) + c.maximized = not c.maximized + c:raise() + end, { description = "(un)maximize", group = "client" }), + awful.key({ modkey, "Control" }, "m", function(c) + c.maximized_vertical = not c.maximized_vertical + c:raise() + end, { description = "(un)maximize vertically", group = "client" }), + awful.key({ modkey, "Shift" }, "m", function(c) + c.maximized_horizontal = not c.maximized_horizontal + c:raise() + end, { description = "(un)maximize horizontally", group = "client" }), + }) +end) + +-- }}} + +-- {{{ Rules +-- Rules to apply to new clients. +ruled.client.connect_signal("request::rules", function() + -- All clients will match this rule. + ruled.client.append_rule({ + id = "global", + rule = {}, + properties = { + focus = awful.client.focus.filter, + raise = true, + screen = awful.screen.preferred, + placement = awful.placement.no_overlap + awful.placement.no_offscreen, + }, + }) + + -- Floating clients. + ruled.client.append_rule({ + id = "floating", + rule_any = { + instance = { "copyq", "pinentry" }, + class = { + "Arandr", + "Blueman-manager", + "Gpick", + "Kruler", + "Sxiv", + "Tor Browser", + "Wpa_gui", + "veromix", + "xtightvncviewer", + }, + -- Note that the name property shown in xprop might be set slightly after creation of the client + -- and the name shown there might not match defined rules here. + name = { + "Event Tester", -- xev. + }, + role = { + "AlarmWindow", -- Thunderbird's calendar. + "ConfigManager", -- Thunderbird's about:config. + "pop-up", -- e.g. Google Chrome's (detached) Developer Tools. + }, + }, + properties = { floating = true }, + }) + + -- Add titlebars to normal clients and dialogs + ruled.client.append_rule({ + id = "titlebars", + rule_any = { type = { "normal", "dialog" } }, + properties = { titlebars_enabled = false }, + }) + + ruled.client.append_rule({ + rule_any = { + class = { "firefox" }, + }, + properties = { screen = 1 }, + }) + ruled.client.append_rule({ + rule = { instance = "chromium" }, + properties = { screen = 1, tag = "4", floating = true }, + }) + ruled.client.append_rule({ + rule = { instance = "Steam" }, + properties = { screen = 1, tag = "4", floating = true }, + }) + ruled.client.append_rule({ + rule = { instance = "discord" }, + properties = { screen = 1, tag = "2" }, + }) + ruled.client.append_rule({ + rule = { instance = "discord-screenaudio" }, + properties = { screen = 1, tag = "2" }, + }) + ruled.client.append_rule({ + rule_any = { + instance = { "youtube music" }, + }, + properties = { screen = 1, tag = "3" }, + }) + ruled.client.append_rule({ + rule_any = { + class = { "thunderbird" }, + }, + properties = { screen = 1, tag = "3" }, + }) + ruled.client.append_rule({ + rule = { instance = "vscodium" }, + properties = { screen = 1, tag = "4" }, + }) + ruled.client.append_rule({ + rule = { instance = "dolphin-emu" }, + properties = { floating = true }, + }) + ruled.client.append_rule({ + rule = { instance = "Windscribe" }, + properties = { floating = true }, + }) + ruled.client.append_rule({ + rule = { instance = "feh" }, + properties = { floating = true }, + }) + ruled.client.append_rule({ + rule = { instance = "nm-connection-editor" }, + properties = { floating = true }, + }) + + ruled.client.append_rule({ + rule = { instance = "scrcpy" }, + properties = { floating = true }, + }) + ruled.client.append_rule({ + rule = { instance = "polybar" }, + properties = { border_width = 0 }, + }) +end) +-- }}} + +-- {{{ Notifications + +naughty.config.defaults.ontop = true +naughty.config.defaults.screen = awful.screen.focused() +naughty.config.defaults.timeout = 4 +naughty.config.defaults.title = "Notification" +naughty.config.defaults.position = "top_right" +naughty.config.defaults.border_width = 0 +beautiful.notification_spacing = 16 + +local function create_notif(n) + local icon_visibility + + if n.icon == nil then + icon_visibility = false + else + icon_visibility = true + end + + -- Action widget + local action_widget = { + { + { + id = "text_role", + align = "center", + font = "Product Sans 10", + widget = wibox.widget.textbox, + }, + margins = { left = dpi(3), right = dpi(3) }, + widget = wibox.container.margin, + }, + widget = wibox.container.background, + } + + -- Apply action widget ^ + local actions = wibox.widget({ + notification = n, + base_layout = wibox.widget({ + spacing = dpi(20), + layout = wibox.layout.flex.horizontal, + }), + widget_template = action_widget, + widget = naughty.list.actions, + }) + + local function space_h(length, circumstances) + return wibox.widget({ + forced_width = length, + visible = circumstances, + layout = wibox.layout.fixed.horizontal, + }) + end + + -- Make other widgets + local title = wibox.widget.textbox() + title.font = "Product Sans Bold 12" + title.align = "center" + title.markup = n.title + + local message = wibox.widget.textbox() + message.font = "Product Sans 12" + message.align = "left" + message.markup = n.message + + local icon = wibox.widget({ + nil, + { + { + image = n.icon, + visible = icon_visibility, + widget = wibox.widget.imagebox, + }, + strategy = "max", + width = dpi(115), + height = dpi(115), + widget = wibox.container.constraint, + }, + expand = "none", + layout = wibox.layout.align.vertical, + }) + + local container = wibox.widget({ + { + title, + { + icon, + space_h(dpi(25), icon_visibility), + message, + layout = wibox.layout.fixed.horizontal, + }, + actions, + spacing = dpi(20), + layout = wibox.layout.fixed.vertical, + }, + margins = dpi(15), + widget = wibox.container.margin, + }) + + naughty.layout.box({ + notification = n, + type = "notification", + bg = beautiful.bg, + border_width = 0, + shape = function(cr, w, h) + gears.shape.rounded_rect(cr, w, h, 5) + end, + widget_template = { + { + { + { + widget = container, + }, + strategy = "max", + width = dpi(300), + height = dpi(200), + widget = wibox.container.constraint, + }, + strategy = "min", + width = dpi(300), + height = dpi(130), + widget = wibox.container.constraint, + }, + bg = beautiful.bg, + widget = wibox.container.background, + }, + }) +end + +naughty.connect_signal("request::display", function(n) + create_notif(n) +end) + +ruled.notification.connect_signal("request::rules", function() + ruled.notification.append_rule({ + rule = {}, + properties = { + screen = awful.screen.focused(), + implicit_timeout = 4, + }, + }) +end) + +-- }}} + +-- Autostart + +awful.spawn.with_shell("sh ~/.config/awesome/autorun.sh") +awful.spawn.with_shell("pkill http-server") +awful.spawn.with_shell("http-server ~/.config/chevron/dist") +awful.spawn.with_shell("sleep 20s && conky -c ~/.config/conky/mocha.conf") +awful.spawn.with_shell("kdeconnect-indicator") +awful.spawn.with_shell("feh --no-fehbg --bg-fill ~/Downloads/alena-aenami-stardust-1k.jpg") + +-- Garbage collection + +collectgarbage("setpause", 110) +collectgarbage("setstepmul", 1000) +gears.timer({ + timeout = 5, + autostart = true, + call_now = true, + callback = function() + collectgarbage("collect") + end, +}) diff --git a/awesome/.config/awesome/spolybar.sh b/awesome/.config/awesome/spolybar.sh new file mode 100755 index 0000000..e54246e --- /dev/null +++ b/awesome/.config/awesome/spolybar.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +polybar left & +polybar right & +polybar middle & +polybar tray & +polybar xwindow & diff --git a/awesome/.config/awesome/theme-def.lua b/awesome/.config/awesome/theme-def.lua new file mode 100644 index 0000000..cb930a0 --- /dev/null +++ b/awesome/.config/awesome/theme-def.lua @@ -0,0 +1,56 @@ +--------------------------- +-- Default awesome theme -- +--------------------------- + +local theme_assets = require("beautiful.theme_assets") +local xresources = require("beautiful.xresources") +local dpi = xresources.apply_dpi + +local gfs = require("gears.filesystem") +local themes_path = gfs.get_themes_dir() + +local theme = {} + +theme.font = "Product Sans 11" + +theme.bg_normal = "#181825" +theme.bg_focus = "#1e1e2e" +theme.bg_urgent = "#eba0ac" +theme.bg_minimize = "#313244" +theme.bg_systray = theme.bg_normal + +theme.fg_normal = "#cdd6f4" +theme.fg_focus = "#737994" +theme.fg_urgent = "#ea999c" +theme.fg_minimize = "#99d1db" + +theme.useless_gap = dpi(5) +theme.border_normal = "#1e1e2e" +theme.border_focus = "#1e1e2e" +theme.border_marked = "#1e1e2e" +theme.border_radius = dpi(8) +theme.border_width = dpi(0) + +theme.menu_height = 30 +theme.menu_width = 120 + +-- Generate taglist squares: +local taglist_square_size = dpi(4) +theme.taglist_squares_sel = theme_assets.taglist_squares_sel( + taglist_square_size, theme.fg_normal +) +theme.taglist_squares_unsel = theme_assets.taglist_squares_unsel( + taglist_square_size, theme.fg_normal +) + +--Signals +client.connect_signal("focus", function(c) + c.border_color = theme.border_focus end) +client.connect_signal("unfocus", function(c) + c.border_color = theme.border_normal end) + +theme.icon_theme = nil + +return theme + +-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80 diff --git a/hypr/.config/hypr/hyprland.conf b/hypr/.config/hypr/hyprland.conf new file mode 100644 index 0000000..c82d9b7 --- /dev/null +++ b/hypr/.config/hypr/hyprland.conf @@ -0,0 +1,193 @@ + +# ####################################################################################### +# AUTOGENERATED HYPR CONFIG. +# PLEASE USE THE CONFIG PROVIDED IN THE GIT REPO /examples/hypr.conf AND EDIT IT, +# OR EDIT THIS ONE ACCORDING TO THE WIKI INSTRUCTIONS. +# ####################################################################################### + +# +# Please note not all available settings / options are set here. +# For a full list, see the wiki +# + +# See https://wiki.hyprland.org/Configuring/Monitors/ +monitor=,preferred,auto,auto +monitor = DP-1, 1920x1080@144, auto, auto + +# See https://wiki.hyprland.org/Configuring/Keywords/ for more + +# Execute your favorite apps at launch +# exec-once = waybar & hyprpaper & firefox +exec-once = waybar +exec-once = hyprpaper + +# Source a file (multi-file configs) +# source = ~/.config/hypr/myColors.conf + +# Set programs that you use +$terminal = kitty +$fileManager = nautilus +$menu = sh /home/pjark/.config/wofi/run.sh + +# Some default env vars. +env = XCURSOR_THEME,oreo_red +env = XCURSOR_SIZE,24 +env = QT_QPA_PLATFORMTHEME,qt5ct # change to qt6ct if you have that +env = WLR_NO_HARDWARE_CURSORS,1 + +# For all categories, see https://wiki.hyprland.org/Configuring/Variables/ +input { + kb_layout = us + kb_variant = + kb_model = + kb_options = + kb_rules = + + follow_mouse = 1 + + touchpad { + natural_scroll = no + } + + sensitivity = -0.1 # -1.0 to 1.0, 0 means no modification. + accel_profile = flat +} + + +general { + # See https://wiki.hyprland.org/Configuring/Variables/ for more + + gaps_in = 6 + gaps_out = 14 + border_size = 4 + col.active_border = rgba(e78284ff) rgba(85c1dcff) rgba(ea999cff) rgba(ca9ee6ff) 45deg + col.inactive_border = rgba(1e1e2eff) + + layout = dwindle + + # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on + allow_tearing = false +} + +decoration { + # See https://wiki.hyprland.org/Configuring/Variables/ for more + + rounding = 10 + + blur { + enabled = true + size = 3 + passes = 1 + } + + drop_shadow = yes + shadow_range = 4 + shadow_render_power = 3 + col.shadow = rgba(1a1a1aee) +} + +animations { + enabled = yes + + # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more + + bezier = myBezier, 0.05, 0.9, 0.1, 1.05 + + animation = windows, 1, 7, myBezier + animation = windowsOut, 1, 7, default, popin 80% + animation = border, 1, 10, default + animation = borderangle, 1, 8, default + animation = fade, 1, 7, default + animation = workspaces, 1, 6, default +} + +dwindle { + # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more + pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below + preserve_split = yes # you probably want this +} + +master { + # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more + new_is_master = true +} + +gestures { + # See https://wiki.hyprland.org/Configuring/Variables/ for more + workspace_swipe = off +} + +misc { + # See https://wiki.hyprland.org/Configuring/Variables/ for more + force_default_wallpaper = -1 # Set to 0 or 1 to disable the anime mascot wallpapers +} + +# Example per-device config +# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more +device { + name = epic-mouse-v1 + sensitivity = -0.5 +} + +# Example windowrule v1 +# windowrule = float, ^(kitty)$ +# Example windowrule v2 +# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ +# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more +windowrulev2 = suppressevent maximize, class:.* # You'll probably like this. + + +# See https://wiki.hyprland.org/Configuring/Keywords/ for more +$mainMod = SUPER + +# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more +bind = $mainMod, Q, exec, $terminal +bind = $mainMod, C, killactive, +bind = $mainMod, M, exit, +bind = $mainMod, E, exec, $fileManager +bind = $mainMod, V, togglefloating, +bind = $mainMod, space, exec, $menu +bind = $mainMod, P, pseudo, # dwindle +bind = $mainMod, R, togglesplit, # dwindle + +# Move focus with mainMod + arrow keys +bind = $mainMod, H, movefocus, l +bind = $mainMod, l, movefocus, r +bind = $mainMod, k, movefocus, u +bind = $mainMod, j, movefocus, d + +# Switch workspaces with mainMod + [0-9] +bind = $mainMod, 1, workspace, 1 +bind = $mainMod, 2, workspace, 2 +bind = $mainMod, 3, workspace, 3 +bind = $mainMod, 4, workspace, 4 +bind = $mainMod, 5, workspace, 5 +bind = $mainMod, 6, workspace, 6 +bind = $mainMod, 7, workspace, 7 +bind = $mainMod, 8, workspace, 8 +bind = $mainMod, 9, workspace, 9 +bind = $mainMod, 0, workspace, 10 + +# Move active window to a workspace with mainMod + SHIFT + [0-9] +bind = $mainMod SHIFT, 1, movetoworkspace, 1 +bind = $mainMod SHIFT, 2, movetoworkspace, 2 +bind = $mainMod SHIFT, 3, movetoworkspace, 3 +bind = $mainMod SHIFT, 4, movetoworkspace, 4 +bind = $mainMod SHIFT, 5, movetoworkspace, 5 +bind = $mainMod SHIFT, 6, movetoworkspace, 6 +bind = $mainMod SHIFT, 7, movetoworkspace, 7 +bind = $mainMod SHIFT, 8, movetoworkspace, 8 +bind = $mainMod SHIFT, 9, movetoworkspace, 9 +bind = $mainMod SHIFT, 0, movetoworkspace, 10 + +# Example special workspace (scratchpad) +bind = $mainMod, S, togglespecialworkspace, magic +bind = $mainMod SHIFT, S, movetoworkspace, special:magic + +# Scroll through existing workspaces with mainMod + scroll +bind = $mainMod, mouse_down, workspace, e+1 +bind = $mainMod, mouse_up, workspace, e-1 + +# Move/resize windows with mainMod + LMB/RMB and dragging +bindm = $mainMod, mouse:272, movewindow +bindm = $mainMod, mouse:273, resizewindow diff --git a/hypr/.config/hypr/hyprpaper.conf b/hypr/.config/hypr/hyprpaper.conf new file mode 100644 index 0000000..74256f0 --- /dev/null +++ b/hypr/.config/hypr/hyprpaper.conf @@ -0,0 +1,3 @@ +preload = /home/pjark/.wallpapers/catppuccin_waves.png +wallpaper = , /home/pjark/.wallpapers/catppuccin_waves.png +splash = false diff --git a/kitty/.config/kitty/kitty.conf b/kitty/.config/kitty/kitty.conf new file mode 100644 index 0000000..25d25cb --- /dev/null +++ b/kitty/.config/kitty/kitty.conf @@ -0,0 +1,90 @@ +# vim:ft=kitty + +shell zsh + + +# The basic colors +foreground #cdd6f4 +background #1e1e2e +selection_foreground #1e1e2e +selection_background #f5e0dc + +# Cursor colors +cursor #f5e0dc +cursor_text_color #1e1e2e + +# URL underline color when hovering with mouse +url_color #f5e0dc + +# Kitty window border colors +active_border_color #b4befe +inactive_border_color #6c7086 +bell_border_color #f9e2af + +# OS Window titlebar colors +wayland_titlebar_color system +macos_titlebar_color system + +# Tab bar colors +active_tab_foreground #11111b +active_tab_background #cba6f7 +inactive_tab_foreground #cdd6f4 +inactive_tab_background #181825 +tab_bar_background #11111b + +# Colors for marks (marked text in the terminal) +mark1_foreground #1e1e2e +mark1_background #b4befe +mark2_foreground #1e1e2e +mark2_background #cba6f7 +mark3_foreground #1e1e2e +mark3_background #74c7ec + +# The 16 terminal colors + +# black +color0 #45475a +color8 #585b70 + +# red +color1 #f38ba8 +color9 #f38ba8 + +# green +color2 #a6e3a1 +color10 #a6e3a1 + +# yellow +color3 #f9e2af +color11 #f9e2af + +# blue +color4 #89b4fa +color12 #89b4fa + +# magenta +color5 #f5c2e7 +color13 #f5c2e7 + +# cyan +color6 #94e2d5 +color14 #94e2d5 + +# white +color7 #bac2de +color15 #a6adc8 + +# fonts +font_family JetBrainsMono Nerd Font Mono +bold_font auto +bold_italic_font auto +italic_font auto + +# tab bar +tab_bar_edge bottom + +# tabs +map alt+c new_tab +map alt+x close_tab +map alt+n next_tab +map alt+b previous_tab diff --git a/polybar/.config/polybar/config.ini b/polybar/.config/polybar/config.ini new file mode 100644 index 0000000..734af34 --- /dev/null +++ b/polybar/.config/polybar/config.ini @@ -0,0 +1,284 @@ +[colors] +disabled = #707880 +Rosewater = #f5e0dc +Flamingo = #f2cdcd +Pink = #f5c2e7 +Mauve = #cba6f7 +Red = #f38ba8 +Maroon = #eba0ac +Peach = #fab387 +Yellow = #f9e2af +Green = #a6e3a1 +Teal = #94e2d5 +Sky = #89dceb +Sapphire = #74c7ec +Blue = #89b4fa +Lavender = #b4befe +Base = #1e1e2e +Mantle = #181825 + +[bar/left] + +width = 16% +offset-x = 1% +offset-y = 1% +height = 22pt +fixed-center = true + +background = ${colors.Mantle} +foreground = ${colors.Lavender} + +line-size = 1pt + +font-0 = "RobotoMono Nerd Font:weight=bold:size=9;2" +font-1 = "RobotoMono Nerd Font:size=10;3" +font-2 = "RobotoMono Nerd Font:size=11;3" +font-3 = "NotoEmoji:scale=11;3" +font-4 = "Noto Sans CJK JP:size=10;3" + +modules-left = space space power xworkspaces sep space weather + +enable-ipc = true + +wm-restack = generic + +[bar/middle] + +width = 14% +offset-x = 43% +offset-y = 1% +height = 22pt +fixed-center = true + +background = ${colors.Mantle} +foreground = ${colors.Lavender} + +line-size = 1pt + +font-0 = "RobotoMono Nerd Font:weight=bold:size=9;2" +font-1 = "RobotoMono Nerd Font:size=10;3" +font-2 = "RobotoMono Nerd Font:size=11;3" + +modules-center = day space sep space date space sep space time + +enable-ipc = true + +wm-restack = generic + +[bar/right] + +width = 8% +offset-x = 91% +offset-y = 1% +height = 22pt +fixed-center = true + +background = ${colors.Mantle} +foreground = ${colors.Lavender} + +line-size = 1pt + +font-0 = "RobotoMono Nerd Font:weight=bold:size=9;2" +font-1 = "RobotoMono Nerd Font:size=10;3" +font-2 = "RobotoMono Nerd Font:size=11;3" + +modules-center = space pulseaudio space sep space backlight space +enable-ipc = true + +wm-restack = generic + +[bar/tray] + +width = 9% +offset-x = 81% +offset-y = 1% +height = 22pt +fixed-center = true + +background = ${colors.Mantle} +foreground = ${colors.Lavender} + +line-size = 1pt + +font-0 = "RobotoMono Nerd Font:size=10;3" + +modules-center = tray + +; tray-position = center + +; tray-detached = false + +; tray-maxsize = 16 + +enable-ipc = true + +wm-restack = generic + +[bar/xwindow] + +width = 19% +offset-x = 18% +offset-y = 1% +height = 22pt +fixed-center = true + +background = ${colors.Mantle} +foreground = ${colors.Lavender} + +line-size = 1pt + +font-0 = "RobotoMono Nerd Font:weight=bold:size=10;3" +font-1 = "Noto Sans CJK JP:style=Regular;size=10;1" + +modules-center = space xwindow space +enable-ipc = true + +wm-restack = generic + +[module/xworkspaces] +type = internal/xworkspaces + +label-active =  +label-active-padding = 2 +label-active-foreground = ${colors.Lavender} +label-active-font = 2 + +label-occupied =  +label-occupied-padding = 2 +label-occupied-font = 2 + +label-empty =  +label-empty-foreground = ${colors.disabled} +label-empty-padding = 2 +label-empty-font = 2 + +[module/xwindow] + +type = internal/xwindow +format =