ww
@@ -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' ''
|
||||||
|
|
||||||
@@ -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 '<b>' .. t .. '</b>' end,
|
||||||
|
shape = rounded_shape(4)
|
||||||
|
}
|
||||||
|
|
||||||
|
styles.header = {
|
||||||
|
fg_color = calendar_themes[theme].header_fg,
|
||||||
|
bg_color = calendar_themes[theme].bg,
|
||||||
|
markup = function(t) return '<b>' .. t .. '</b>' end
|
||||||
|
}
|
||||||
|
|
||||||
|
styles.weekday = {
|
||||||
|
fg_color = calendar_themes[theme].weekday_fg,
|
||||||
|
bg_color = calendar_themes[theme].bg,
|
||||||
|
markup = function(t) return '<b>' .. t .. '</b>' 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 })
|
||||||
|
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
killall -q polybar
|
||||||
@@ -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,
|
||||||
|
})
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
polybar left &
|
||||||
|
polybar right &
|
||||||
|
polybar middle &
|
||||||
|
polybar tray &
|
||||||
|
polybar xwindow &
|
||||||
@@ -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
|
||||||
@@ -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 = <label>
|
||||||
|
format-background = ${colors.Mantle}
|
||||||
|
format-foreground = ${colors.Lavender}
|
||||||
|
format-padding = 2
|
||||||
|
|
||||||
|
label = %title%
|
||||||
|
label-maxlen = 40
|
||||||
|
|
||||||
|
label-empty = ~/
|
||||||
|
label-empty-foreground = ${colors.disabled}
|
||||||
|
|
||||||
|
[module/pulseaudio]
|
||||||
|
type = internal/pulseaudio
|
||||||
|
format-volume-prefix = "墳 "
|
||||||
|
format-volume-prefix-foreground = ${colors.Rosewater}
|
||||||
|
format-volume = <label-volume>
|
||||||
|
format-volume-prefix-font = 3
|
||||||
|
|
||||||
|
label-volume = %percentage%%
|
||||||
|
|
||||||
|
label-muted = muted
|
||||||
|
label-muted-foreground = ${colors.disabled}
|
||||||
|
|
||||||
|
[network-base]
|
||||||
|
type = internal/network
|
||||||
|
interval = 5
|
||||||
|
format-connected = <label-connected>
|
||||||
|
format-disconnected = <label-disconnected>
|
||||||
|
label-disconnected = disconnected
|
||||||
|
format-connected-foreground = ${colors.Lavender}
|
||||||
|
|
||||||
|
[module/wlan]
|
||||||
|
inherit = network-base
|
||||||
|
interface-type = wireless
|
||||||
|
label-connected-font = 3
|
||||||
|
label-connected =
|
||||||
|
label-connected-foreground = ${colors.Rosewater}
|
||||||
|
|
||||||
|
[module/day]
|
||||||
|
type = internal/date
|
||||||
|
interval = 1
|
||||||
|
|
||||||
|
date = %A
|
||||||
|
|
||||||
|
label = %date%
|
||||||
|
label-foreground = ${colors.Lavender}
|
||||||
|
|
||||||
|
[module/date]
|
||||||
|
type = internal/date
|
||||||
|
interval = 1
|
||||||
|
|
||||||
|
date = %d-%m-%Y
|
||||||
|
|
||||||
|
label = %date%
|
||||||
|
label-foreground = ${colors.Lavender}
|
||||||
|
|
||||||
|
[module/time]
|
||||||
|
type = internal/date
|
||||||
|
interval = 1
|
||||||
|
|
||||||
|
date = %H:%M:%S
|
||||||
|
|
||||||
|
label = %date%
|
||||||
|
label-foreground = ${colors.Lavender}
|
||||||
|
|
||||||
|
[module/battery]
|
||||||
|
type = internal/battery
|
||||||
|
poll-interval = 5
|
||||||
|
full-at = 99
|
||||||
|
format-full-prefix = " "
|
||||||
|
format-charging-prefix = " "
|
||||||
|
format-discharging-prefix = " "
|
||||||
|
format-full-prefix-foreground = ${colors.Rosewater}
|
||||||
|
format-charging-prefix-foreground = ${colors.Rosewater}
|
||||||
|
format-discharging-prefix-foreground = ${colors.Red}
|
||||||
|
label-charging = %percentage%%
|
||||||
|
label-discharging = %percentage%%
|
||||||
|
label-full = %percentage%%
|
||||||
|
|
||||||
|
[module/backlight]
|
||||||
|
type = internal/backlight
|
||||||
|
|
||||||
|
; Use the following command to list available cards:
|
||||||
|
; $ ls -1 /sys/class/backlight/
|
||||||
|
|
||||||
|
card = amdgpu_bl1
|
||||||
|
use-actual-brightness = true
|
||||||
|
format-prefix = "盛 "
|
||||||
|
format-prefix-foreground = ${colors.Rosewater}
|
||||||
|
format-prefix-font = 3
|
||||||
|
enable-scroll = true
|
||||||
|
|
||||||
|
[module/tray]
|
||||||
|
type = internal/tray
|
||||||
|
format-margin = 8px
|
||||||
|
; tray-spacing = 8px
|
||||||
|
tray-padding = 4px
|
||||||
|
|
||||||
|
[module/power]
|
||||||
|
type = custom/text
|
||||||
|
content =
|
||||||
|
content-font = 3
|
||||||
|
content-foreground = ${colors.Red}
|
||||||
|
content-margin = 1
|
||||||
|
click-left = "sh ~/.config/rofi/powermenu/type-6/powermenu.sh"
|
||||||
|
|
||||||
|
[module/weather]
|
||||||
|
type = custom/script
|
||||||
|
exec = "sh ~/.config/polybar/weather.sh"
|
||||||
|
interval = 700
|
||||||
|
|
||||||
|
; decor
|
||||||
|
|
||||||
|
[module/sep]
|
||||||
|
type = custom/text
|
||||||
|
content = "|"
|
||||||
|
content-foreground = ${colors.disabled}
|
||||||
|
|
||||||
|
[module/space]
|
||||||
|
type = custom/text
|
||||||
|
content = " "
|
||||||
|
|
||||||
|
[settings]
|
||||||
|
screenchange-reload = true
|
||||||
|
pseudo-transparency = true
|
||||||
|
|
||||||
|
; vim:ft=dosini
|
||||||
@@ -0,0 +1,99 @@
|
|||||||
|
import json
|
||||||
|
import requests
|
||||||
|
|
||||||
|
def wc_extract(wc):
|
||||||
|
wc = str(wc)
|
||||||
|
if wc in ("0", "1"):
|
||||||
|
if day == "1":
|
||||||
|
return ("☀️")
|
||||||
|
else:
|
||||||
|
return("🌙")
|
||||||
|
elif wc == "2":
|
||||||
|
if day == "1":
|
||||||
|
return ("⛅")
|
||||||
|
else:
|
||||||
|
return("☁️")
|
||||||
|
elif wc in ("3", "45", "48"):
|
||||||
|
return ("☁️")
|
||||||
|
elif wc in ("51", "53", "55", "61", "63", "65", "80", "81", "82"):
|
||||||
|
return ("🌧️")
|
||||||
|
elif wc in ("56", "57", "66", "67", "85", "86"):
|
||||||
|
return ("🌨️")
|
||||||
|
elif wc in ("71", "73", "75", "77"):
|
||||||
|
return ("❄️")
|
||||||
|
elif wc in ("95", "96", "99"):
|
||||||
|
return ("⛈️")
|
||||||
|
|
||||||
|
def json_extract(obj, path):
|
||||||
|
'''
|
||||||
|
Extracts an element from a nested dictionary or
|
||||||
|
a list of nested dictionaries along a specified path.
|
||||||
|
If the input is a dictionary, a list is returned.
|
||||||
|
If the input is a list of dictionary, a list of lists is returned.
|
||||||
|
obj - list or dict - input dictionary or list of dictionaries
|
||||||
|
path - list - list of strings that form the path to the desired element
|
||||||
|
'''
|
||||||
|
def extract(obj, path, ind, arr):
|
||||||
|
'''
|
||||||
|
Extracts an element from a nested dictionary
|
||||||
|
along a specified path and returns a list.
|
||||||
|
obj - dict - input dictionary
|
||||||
|
path - list - list of strings that form the JSON path
|
||||||
|
ind - int - starting index
|
||||||
|
arr - list - output list
|
||||||
|
'''
|
||||||
|
key = path[ind]
|
||||||
|
if ind + 1 < len(path):
|
||||||
|
if isinstance(obj, dict):
|
||||||
|
if key in obj.keys():
|
||||||
|
extract(obj.get(key), path, ind + 1, arr)
|
||||||
|
else:
|
||||||
|
arr.append(None)
|
||||||
|
elif isinstance(obj, list):
|
||||||
|
if not obj:
|
||||||
|
arr.append(None)
|
||||||
|
else:
|
||||||
|
for item in obj:
|
||||||
|
extract(item, path, ind, arr)
|
||||||
|
else:
|
||||||
|
arr.append(None)
|
||||||
|
if ind + 1 == len(path):
|
||||||
|
if isinstance(obj, list):
|
||||||
|
if not obj:
|
||||||
|
arr.append(None)
|
||||||
|
else:
|
||||||
|
for item in obj:
|
||||||
|
arr.append(item.get(key, None))
|
||||||
|
elif isinstance(obj, dict):
|
||||||
|
arr.append(obj.get(key, None))
|
||||||
|
else:
|
||||||
|
arr.append(None)
|
||||||
|
return arr
|
||||||
|
if isinstance(obj, dict):
|
||||||
|
return extract(obj, path, 0, [])
|
||||||
|
elif isinstance(obj, list):
|
||||||
|
outer_arr = []
|
||||||
|
for item in obj:
|
||||||
|
outer_arr.append(extract(item, path, 0, []))
|
||||||
|
return outer_arr
|
||||||
|
|
||||||
|
latitude = 26.50
|
||||||
|
longitude = 80.24
|
||||||
|
|
||||||
|
wurl = "https://api.open-meteo.com/v1/forecast?latitude=" + str(latitude) + "&longitude=" + str(longitude) + "&hourly=temperature_2m,is_day¤t_weather=true&timezone=auto"
|
||||||
|
|
||||||
|
wjson = requests.get(wurl).content
|
||||||
|
wjson = json.loads(wjson)
|
||||||
|
tmp = str(json_extract(wjson, ["current_weather", "temperature"])[0])
|
||||||
|
day = str(json_extract(wjson, ["current_weather", "is_day"])[0])
|
||||||
|
wcode = wc_extract(str(json_extract(wjson, ["current_weather", "weathercode"])[0]))
|
||||||
|
|
||||||
|
temp = ""
|
||||||
|
for i in tmp:
|
||||||
|
if i == ".":
|
||||||
|
break
|
||||||
|
else:
|
||||||
|
temp += i
|
||||||
|
|
||||||
|
print(wcode, temp+"°C")
|
||||||
|
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
sleep 5
|
||||||
|
if 2>/dev/null 1>&2 ping -c 1 www.archlinux.org; then
|
||||||
|
python3 ~/.config/polybar/weather.py
|
||||||
|
else
|
||||||
|
echo '\_(ツ)_/'
|
||||||
|
fi
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
* Author : Aditya Shakya (adi1090x)
|
||||||
|
* Github : @adi1090x
|
||||||
|
*
|
||||||
|
* Colors
|
||||||
|
**/
|
||||||
|
|
||||||
|
* {
|
||||||
|
background: #222D32FF;
|
||||||
|
background-alt: #29353BFF;
|
||||||
|
foreground: #B8C2C6FF;
|
||||||
|
selected: #00BCD4FF;
|
||||||
|
active: #21FF90FF;
|
||||||
|
urgent: #FF4B60FF;
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
* Author : Aditya Shakya (adi1090x)
|
||||||
|
* Github : @adi1090x
|
||||||
|
*
|
||||||
|
* Colors
|
||||||
|
**/
|
||||||
|
|
||||||
|
* {
|
||||||
|
background: #2F343FFF;
|
||||||
|
background-alt: #383C4AFF;
|
||||||
|
foreground: #BAC5D0FF;
|
||||||
|
selected: #5294E2FF;
|
||||||
|
active: #98C379FF;
|
||||||
|
urgent: #E06B74FF;
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
* Author : Aditya Shakya (adi1090x)
|
||||||
|
* Github : @adi1090x
|
||||||
|
*
|
||||||
|
* Colors
|
||||||
|
**/
|
||||||
|
|
||||||
|
* {
|
||||||
|
background: #000000FF;
|
||||||
|
background-alt: #101010FF;
|
||||||
|
foreground: #FFFFFFFF;
|
||||||
|
selected: #62AEEFFF;
|
||||||
|
active: #98C379FF;
|
||||||
|
urgent: #E06B74FF;
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
* Author : Aditya Shakya (adi1090x)
|
||||||
|
* Github : @adi1090x
|
||||||
|
*
|
||||||
|
* Colors
|
||||||
|
**/
|
||||||
|
|
||||||
|
* {
|
||||||
|
background: #1E1D2FFF;
|
||||||
|
background-alt: #282839FF;
|
||||||
|
foreground: #D9E0EEFF;
|
||||||
|
selected: #7AA2F7FF;
|
||||||
|
active: #ABE9B3FF;
|
||||||
|
urgent: #F28FADFF;
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
* Author : Aditya Shakya (adi1090x)
|
||||||
|
* Github : @adi1090x
|
||||||
|
*
|
||||||
|
* Colors
|
||||||
|
**/
|
||||||
|
|
||||||
|
* {
|
||||||
|
background: #000B1EFF;
|
||||||
|
background-alt: #0A1528FF;
|
||||||
|
foreground: #0ABDC6FF;
|
||||||
|
selected: #0ABDC6FF;
|
||||||
|
active: #00FF00FF;
|
||||||
|
urgent: #FF0000FF;
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
* Author : Aditya Shakya (adi1090x)
|
||||||
|
* Github : @adi1090x
|
||||||
|
*
|
||||||
|
* Colors
|
||||||
|
**/
|
||||||
|
|
||||||
|
* {
|
||||||
|
background: #1E1F29FF;
|
||||||
|
background-alt: #282A36FF;
|
||||||
|
foreground: #FFFFFFFF;
|
||||||
|
selected: #BD93F9FF;
|
||||||
|
active: #50FA7BFF;
|
||||||
|
urgent: #FF5555FF;
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
* Author : Aditya Shakya (adi1090x)
|
||||||
|
* Github : @adi1090x
|
||||||
|
*
|
||||||
|
* Colors
|
||||||
|
**/
|
||||||
|
|
||||||
|
* {
|
||||||
|
background: #323D43FF;
|
||||||
|
background-alt: #3C474DFF;
|
||||||
|
foreground: #DAD1BEFF;
|
||||||
|
selected: #7FBBB3FF;
|
||||||
|
active: #A7C080FF;
|
||||||
|
urgent: #E67E80FF;
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
* Author : Aditya Shakya (adi1090x)
|
||||||
|
* Github : @adi1090x
|
||||||
|
*
|
||||||
|
* Colors
|
||||||
|
**/
|
||||||
|
|
||||||
|
* {
|
||||||
|
background: #282828FF;
|
||||||
|
background-alt: #353535FF;
|
||||||
|
foreground: #EBDBB2FF;
|
||||||
|
selected: #83A598FF;
|
||||||
|
active: #B8BB26FF;
|
||||||
|
urgent: #FB4934FF;
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
* Author : Aditya Shakya (adi1090x)
|
||||||
|
* Github : @adi1090x
|
||||||
|
*
|
||||||
|
* Colors
|
||||||
|
**/
|
||||||
|
|
||||||
|
* {
|
||||||
|
background: #1D1F28FF;
|
||||||
|
background-alt: #282A36FF;
|
||||||
|
foreground: #FDFDFDFF;
|
||||||
|
selected: #79E6F3FF;
|
||||||
|
active: #5ADECDFF;
|
||||||
|
urgent: #F37F97FF;
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
* Author : Aditya Shakya (adi1090x)
|
||||||
|
* Github : @adi1090x
|
||||||
|
*
|
||||||
|
* Colors
|
||||||
|
**/
|
||||||
|
|
||||||
|
* {
|
||||||
|
background: #021B21FF;
|
||||||
|
background-alt: #0C252BFF;
|
||||||
|
foreground: #F2F1B9FF;
|
||||||
|
selected: #44B5B1FF;
|
||||||
|
active: #7CBF9EFF;
|
||||||
|
urgent: #C2454EFF;
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
* Author : Aditya Shakya (adi1090x)
|
||||||
|
* Github : @adi1090x
|
||||||
|
*
|
||||||
|
* Colors
|
||||||
|
**/
|
||||||
|
|
||||||
|
* {
|
||||||
|
background: #2E3440FF;
|
||||||
|
background-alt: #383E4AFF;
|
||||||
|
foreground: #E5E9F0FF;
|
||||||
|
selected: #81A1C1FF;
|
||||||
|
active: #A3BE8CFF;
|
||||||
|
urgent: #BF616AFF;
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
* Author : Aditya Shakya (adi1090x)
|
||||||
|
* Github : @adi1090x
|
||||||
|
*
|
||||||
|
* Colors
|
||||||
|
**/
|
||||||
|
|
||||||
|
* {
|
||||||
|
background: #1E2127FF;
|
||||||
|
background-alt: #282B31FF;
|
||||||
|
foreground: #FFFFFFFF;
|
||||||
|
selected: #61AFEFFF;
|
||||||
|
active: #98C379FF;
|
||||||
|
urgent: #E06C75FF;
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
* Author : Aditya Shakya (adi1090x)
|
||||||
|
* Github : @adi1090x
|
||||||
|
*
|
||||||
|
* Colors
|
||||||
|
**/
|
||||||
|
|
||||||
|
* {
|
||||||
|
background: #F1F1F1FF;
|
||||||
|
background-alt: #E0E0E0FF;
|
||||||
|
foreground: #252525FF;
|
||||||
|
selected: #008EC4FF;
|
||||||
|
active: #10A778FF;
|
||||||
|
urgent: #C30771FF;
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
* Author : Aditya Shakya (adi1090x)
|
||||||
|
* Github : @adi1090x
|
||||||
|
*
|
||||||
|
* Colors
|
||||||
|
**/
|
||||||
|
|
||||||
|
* {
|
||||||
|
background: #002B36FF;
|
||||||
|
background-alt: #073642FF;
|
||||||
|
foreground: #EEE8D5FF;
|
||||||
|
selected: #268BD2FF;
|
||||||
|
active: #859900FF;
|
||||||
|
urgent: #DC322FFF;
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
* Author : Levi Lacoss (fishyfishfish55)
|
||||||
|
* Github : @fishyfishfish55
|
||||||
|
*
|
||||||
|
* Colors
|
||||||
|
**/
|
||||||
|
|
||||||
|
* {
|
||||||
|
background: #15161EFF;
|
||||||
|
background-alt: #1A1B26FF;
|
||||||
|
foreground: #C0CAF5FF;
|
||||||
|
selected: #33467CFF;
|
||||||
|
active: #414868FF;
|
||||||
|
urgent: #F7768EFF;
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
* Author : Aditya Shakya (adi1090x)
|
||||||
|
* Github : @adi1090x
|
||||||
|
*
|
||||||
|
* Colors
|
||||||
|
**/
|
||||||
|
|
||||||
|
* {
|
||||||
|
background: #F5E7DEFF;
|
||||||
|
background-alt: #EBDCD2FF;
|
||||||
|
foreground: #34302DFF;
|
||||||
|
selected: #D97742FF;
|
||||||
|
active: #BF8F60FF;
|
||||||
|
urgent: #B23636FF;
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 266 KiB |
|
After Width: | Height: | Size: 693 KiB |
|
After Width: | Height: | Size: 931 KiB |
|
After Width: | Height: | Size: 197 KiB |
|
After Width: | Height: | Size: 223 KiB |
|
After Width: | Height: | Size: 2.4 MiB |
|
After Width: | Height: | Size: 1.4 MiB |
|
After Width: | Height: | Size: 441 KiB |
|
After Width: | Height: | Size: 648 KiB |
|
After Width: | Height: | Size: 339 KiB |
|
After Width: | Height: | Size: 125 KiB |
|
After Width: | Height: | Size: 1.5 MiB |
|
After Width: | Height: | Size: 666 KiB |
|
After Width: | Height: | Size: 1.1 MiB |
|
After Width: | Height: | Size: 2.0 MiB |
|
After Width: | Height: | Size: 1.3 MiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 96 KiB |
|
After Width: | Height: | Size: 2.0 MiB |
|
After Width: | Height: | Size: 964 KiB |
@@ -0,0 +1,19 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
## Author : Aditya Shakya (adi1090x)
|
||||||
|
## Github : @adi1090x
|
||||||
|
#
|
||||||
|
## Rofi : Launcher (Modi Drun, Run, File Browser, Window)
|
||||||
|
#
|
||||||
|
## Available Styles
|
||||||
|
#
|
||||||
|
## style-1 style-2 style-3 style-4 style-5
|
||||||
|
## style-6 style-7 style-8 style-9 style-10
|
||||||
|
|
||||||
|
dir="$HOME/.config/rofi/launchers/type-6"
|
||||||
|
theme='style-10'
|
||||||
|
|
||||||
|
## Run
|
||||||
|
rofi \
|
||||||
|
-show drun \
|
||||||
|
-theme ${dir}/${theme}.rasi
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
dir="$HOME/.config/rofi/launchers/type-6"
|
||||||
|
theme='style-10'
|
||||||
|
|
||||||
|
## Run
|
||||||
|
rofi \
|
||||||
|
-show window \
|
||||||
|
-theme ${dir}/${theme}.rasi
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
dir="$HOME/.config/rofi/launchers/type-6"
|
||||||
|
theme='style-10'
|
||||||
|
|
||||||
|
## Run
|
||||||
|
rofi \
|
||||||
|
-show run \
|
||||||
|
-theme ${dir}/${theme}.rasi
|
||||||
@@ -0,0 +1,208 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
* Author : Aditya Shakya (adi1090x)
|
||||||
|
* Github : @adi1090x
|
||||||
|
*
|
||||||
|
* Rofi Theme File
|
||||||
|
* Rofi Version: 1.7.3
|
||||||
|
**/
|
||||||
|
|
||||||
|
/*****----- Configuration -----*****/
|
||||||
|
configuration {
|
||||||
|
modi: "drun,run,window";
|
||||||
|
show-icons: true;
|
||||||
|
display-drun: "Apps";
|
||||||
|
display-run: "Run";
|
||||||
|
display-window: "Window";
|
||||||
|
drun-display-format: "{name}";
|
||||||
|
window-format: "{w} · {c} · {t}";
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****----- Global Properties -----*****/
|
||||||
|
* {
|
||||||
|
font: "ProductSans 11";
|
||||||
|
background: #181825;
|
||||||
|
background-alt: #181825;
|
||||||
|
foreground: #FFFFFF;
|
||||||
|
selected: #292c3c;
|
||||||
|
active: #292c3c;
|
||||||
|
urgent: #292c3c;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****----- Main Window -----*****/
|
||||||
|
window {
|
||||||
|
/* properties for window widget */
|
||||||
|
transparency: "real";
|
||||||
|
location: center;
|
||||||
|
anchor: center;
|
||||||
|
fullscreen: false;
|
||||||
|
width: 1000px;
|
||||||
|
x-offset: 0px;
|
||||||
|
y-offset: 0px;
|
||||||
|
|
||||||
|
/* properties for all widgets */
|
||||||
|
enabled: true;
|
||||||
|
border-radius: 15px;
|
||||||
|
cursor: "default";
|
||||||
|
background-color: @background;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****----- Main Box -----*****/
|
||||||
|
mainbox {
|
||||||
|
enabled: true;
|
||||||
|
spacing: 0px;
|
||||||
|
background-color: transparent;
|
||||||
|
orientation: horizontal;
|
||||||
|
children: [ "imagebox", "listbox" ];
|
||||||
|
}
|
||||||
|
|
||||||
|
imagebox {
|
||||||
|
padding: 20px;
|
||||||
|
background-color: transparent;
|
||||||
|
background-image: url("~/.config/rofi/images/alena-aenami-bluehour-1k-crop.png", height);
|
||||||
|
orientation: vertical;
|
||||||
|
children: [ "inputbar", "dummy", "mode-switcher" ];
|
||||||
|
}
|
||||||
|
|
||||||
|
listbox {
|
||||||
|
spacing: 20px;
|
||||||
|
padding: 20px;
|
||||||
|
background-color: transparent;
|
||||||
|
orientation: vertical;
|
||||||
|
children: [ "message", "listview" ];
|
||||||
|
}
|
||||||
|
|
||||||
|
dummy {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****----- Inputbar -----*****/
|
||||||
|
inputbar {
|
||||||
|
enabled: true;
|
||||||
|
spacing: 10px;
|
||||||
|
padding: 15px;
|
||||||
|
border-radius: 10px;
|
||||||
|
background-color: @background-alt;
|
||||||
|
text-color: @foreground;
|
||||||
|
children: [ "textbox-prompt-colon", "entry" ];
|
||||||
|
}
|
||||||
|
textbox-prompt-colon {
|
||||||
|
enabled: true;
|
||||||
|
expand: false;
|
||||||
|
str: "";
|
||||||
|
background-color: inherit;
|
||||||
|
text-color: inherit;
|
||||||
|
}
|
||||||
|
entry {
|
||||||
|
enabled: true;
|
||||||
|
background-color: inherit;
|
||||||
|
text-color: inherit;
|
||||||
|
cursor: text;
|
||||||
|
placeholder: "Search";
|
||||||
|
placeholder-color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****----- Mode Switcher -----*****/
|
||||||
|
mode-switcher{
|
||||||
|
enabled: true;
|
||||||
|
spacing: 20px;
|
||||||
|
background-color: transparent;
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
button {
|
||||||
|
padding: 15px;
|
||||||
|
border-radius: 10px;
|
||||||
|
background-color: @background-alt;
|
||||||
|
text-color: inherit;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
button selected {
|
||||||
|
background-color: @selected;
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****----- Listview -----*****/
|
||||||
|
listview {
|
||||||
|
enabled: true;
|
||||||
|
columns: 1;
|
||||||
|
lines: 8;
|
||||||
|
cycle: true;
|
||||||
|
dynamic: true;
|
||||||
|
scrollbar: false;
|
||||||
|
layout: vertical;
|
||||||
|
reverse: false;
|
||||||
|
fixed-height: true;
|
||||||
|
fixed-columns: true;
|
||||||
|
|
||||||
|
spacing: 10px;
|
||||||
|
background-color: transparent;
|
||||||
|
text-color: @foreground;
|
||||||
|
cursor: "default";
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****----- Elements -----*****/
|
||||||
|
element {
|
||||||
|
enabled: true;
|
||||||
|
spacing: 15px;
|
||||||
|
padding: 8px;
|
||||||
|
border-radius: 10px;
|
||||||
|
background-color: transparent;
|
||||||
|
text-color: @foreground;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
element normal.normal {
|
||||||
|
background-color: inherit;
|
||||||
|
text-color: inherit;
|
||||||
|
}
|
||||||
|
element normal.urgent {
|
||||||
|
background-color: @urgent;
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
element normal.active {
|
||||||
|
background-color: @active;
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
element selected.normal {
|
||||||
|
background-color: @selected;
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
element selected.urgent {
|
||||||
|
background-color: @urgent;
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
element selected.active {
|
||||||
|
background-color: @urgent;
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
element-icon {
|
||||||
|
background-color: transparent;
|
||||||
|
text-color: inherit;
|
||||||
|
size: 32px;
|
||||||
|
cursor: inherit;
|
||||||
|
}
|
||||||
|
element-text {
|
||||||
|
background-color: transparent;
|
||||||
|
text-color: inherit;
|
||||||
|
cursor: inherit;
|
||||||
|
vertical-align: 0.5;
|
||||||
|
horizontal-align: 0.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****----- Message -----*****/
|
||||||
|
message {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
textbox {
|
||||||
|
padding: 15px;
|
||||||
|
border-radius: 10px;
|
||||||
|
background-color: @background-alt;
|
||||||
|
text-color: @foreground;
|
||||||
|
vertical-align: 0.5;
|
||||||
|
horizontal-align: 0.0;
|
||||||
|
}
|
||||||
|
error-message {
|
||||||
|
padding: 15px;
|
||||||
|
border-radius: 20px;
|
||||||
|
background-color: @background;
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
@@ -0,0 +1,107 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
## Author : Aditya Shakya (adi1090x)
|
||||||
|
## Github : @adi1090x
|
||||||
|
#
|
||||||
|
## Rofi : Power Menu
|
||||||
|
#
|
||||||
|
## Available Styles
|
||||||
|
#
|
||||||
|
## style-1 style-2 style-3 style-4 style-5
|
||||||
|
|
||||||
|
# Current Theme
|
||||||
|
dir="$HOME/.config/rofi/powermenu/type-6"
|
||||||
|
theme='style-1'
|
||||||
|
|
||||||
|
# CMDs
|
||||||
|
lastlogin="`last $USER | head -n1 | tr -s ' ' | cut -d' ' -f5,6,7`"
|
||||||
|
uptime="`uptime -p | sed -e 's/up //g'`"
|
||||||
|
host=`hostname`
|
||||||
|
|
||||||
|
# Options
|
||||||
|
hibernate=''
|
||||||
|
shutdown=''
|
||||||
|
reboot=''
|
||||||
|
lock=''
|
||||||
|
suspend=''
|
||||||
|
logout=''
|
||||||
|
yes=''
|
||||||
|
no=''
|
||||||
|
|
||||||
|
# Rofi CMD
|
||||||
|
rofi_cmd() {
|
||||||
|
rofi -dmenu \
|
||||||
|
-p " $USER@$host" \
|
||||||
|
-mesg " Uptime: $uptime" \
|
||||||
|
-theme ${dir}/${theme}.rasi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Confirmation CMD
|
||||||
|
confirm_cmd() {
|
||||||
|
rofi -theme-str 'window {location: center; anchor: center; fullscreen: false; width: 350px;}' \
|
||||||
|
-theme-str 'mainbox {orientation: vertical; children: [ "message", "listview" ];}' \
|
||||||
|
-theme-str 'listview {columns: 2; lines: 1;}' \
|
||||||
|
-theme-str 'element-text {horizontal-align: 0.5;}' \
|
||||||
|
-theme-str 'textbox {horizontal-align: 0.5;}' \
|
||||||
|
-dmenu \
|
||||||
|
-p 'Confirmation' \
|
||||||
|
-mesg 'Are you Sure?' \
|
||||||
|
-theme ${dir}/${theme}.rasi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Ask for confirmation
|
||||||
|
confirm_exit() {
|
||||||
|
echo -e "$yes\n$no" | confirm_cmd
|
||||||
|
}
|
||||||
|
|
||||||
|
# Pass variables to rofi dmenu
|
||||||
|
run_rofi() {
|
||||||
|
echo -e "$lock\n$suspend\n$logout\n$hibernate\n$reboot\n$shutdown" | rofi_cmd
|
||||||
|
}
|
||||||
|
|
||||||
|
# Execute Command
|
||||||
|
run_cmd() {
|
||||||
|
selected="$(confirm_exit)"
|
||||||
|
if [[ "$selected" == "$yes" ]]; then
|
||||||
|
if [[ $1 == '--shutdown' ]]; then
|
||||||
|
systemctl poweroff
|
||||||
|
elif [[ $1 == '--reboot' ]]; then
|
||||||
|
systemctl reboot
|
||||||
|
elif [[ $1 == '--hibernate' ]]; then
|
||||||
|
systemctl hibernate
|
||||||
|
elif [[ $1 == '--suspend' ]]; then
|
||||||
|
systemctl suspend
|
||||||
|
elif [[ $1 == '--logout' ]]; then
|
||||||
|
betterlockscreen -l
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Actions
|
||||||
|
chosen="$(run_rofi)"
|
||||||
|
case ${chosen} in
|
||||||
|
$shutdown)
|
||||||
|
run_cmd --shutdown
|
||||||
|
;;
|
||||||
|
$reboot)
|
||||||
|
run_cmd --reboot
|
||||||
|
;;
|
||||||
|
$hibernate)
|
||||||
|
run_cmd --hibernate
|
||||||
|
;;
|
||||||
|
$lock)
|
||||||
|
if [[ -x '/usr/bin/betterlockscreen' ]]; then
|
||||||
|
betterlockscreen -l
|
||||||
|
elif [[ -x '/usr/bin/i3lock' ]]; then
|
||||||
|
i3lock
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
$suspend)
|
||||||
|
run_cmd --suspend
|
||||||
|
;;
|
||||||
|
$logout)
|
||||||
|
run_cmd --logout
|
||||||
|
;;
|
||||||
|
esac
|
||||||
@@ -0,0 +1,147 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
* Author : Aditya Shakya (adi1090x)
|
||||||
|
* Github : @adi1090x
|
||||||
|
*
|
||||||
|
* Rofi Theme File
|
||||||
|
* Rofi Version: 1.7.3
|
||||||
|
**/
|
||||||
|
|
||||||
|
/*****----- Configuration -----*****/
|
||||||
|
configuration {
|
||||||
|
show-icons: false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****----- Global Properties -----*****/
|
||||||
|
* {
|
||||||
|
font: "ProductSans 11";
|
||||||
|
background: #181825;
|
||||||
|
background-alt: #1e1e2e;
|
||||||
|
foreground: #FFFFFF;
|
||||||
|
selected: #b4befe;
|
||||||
|
active: #1e1e2e;
|
||||||
|
urgent: #1e1e2e;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
USE_BUTTONS=YES
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*****----- Main Window -----*****/
|
||||||
|
window {
|
||||||
|
transparency: "real";
|
||||||
|
location: center;
|
||||||
|
anchor: center;
|
||||||
|
fullscreen: false;
|
||||||
|
width: 760px;
|
||||||
|
x-offset: 0px;
|
||||||
|
y-offset: 0px;
|
||||||
|
|
||||||
|
padding: 0px;
|
||||||
|
border: 0px solid;
|
||||||
|
border-radius: 15px;
|
||||||
|
border-color: @selected;
|
||||||
|
cursor: "default";
|
||||||
|
background-color: @background;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****----- Main Box -----*****/
|
||||||
|
mainbox {
|
||||||
|
background-color: transparent;
|
||||||
|
orientation: horizontal;
|
||||||
|
children: [ "imagebox", "listview" ];
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****----- Imagebox -----*****/
|
||||||
|
imagebox {
|
||||||
|
spacing: 30px;
|
||||||
|
padding: 20px;
|
||||||
|
background-color: transparent;
|
||||||
|
background-image: url("~/.config/rofi/images/alena-aenami-portal-crop.png", height);
|
||||||
|
children: [ "inputbar", "dummy", "message" ];
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****----- User -----*****/
|
||||||
|
userimage {
|
||||||
|
margin: 0px 0px;
|
||||||
|
border: 10px;
|
||||||
|
border-radius: 10px;
|
||||||
|
border-color: @background-alt;
|
||||||
|
background-color: transparent;
|
||||||
|
background-image: url("~/.config/rofi/images/a.png", height);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****----- Inputbar -----*****/
|
||||||
|
inputbar {
|
||||||
|
padding: 15px;
|
||||||
|
border-radius: 10px;
|
||||||
|
background-color: @urgent;
|
||||||
|
text-color: @foreground;
|
||||||
|
children: [ "dummy", "prompt", "dummy"];
|
||||||
|
}
|
||||||
|
|
||||||
|
dummy {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
prompt {
|
||||||
|
background-color: inherit;
|
||||||
|
text-color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****----- Message -----*****/
|
||||||
|
message {
|
||||||
|
enabled: true;
|
||||||
|
margin: 0px;
|
||||||
|
padding: 15px;
|
||||||
|
border-radius: 10px;
|
||||||
|
background-color: @background;
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
textbox {
|
||||||
|
background-color: inherit;
|
||||||
|
text-color: inherit;
|
||||||
|
vertical-align: 0.5;
|
||||||
|
horizontal-align: 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****----- Listview -----*****/
|
||||||
|
listview {
|
||||||
|
enabled: true;
|
||||||
|
columns: 2;
|
||||||
|
lines: 3;
|
||||||
|
cycle: true;
|
||||||
|
dynamic: true;
|
||||||
|
scrollbar: false;
|
||||||
|
layout: vertical;
|
||||||
|
reverse: false;
|
||||||
|
fixed-height: true;
|
||||||
|
fixed-columns: true;
|
||||||
|
|
||||||
|
spacing: 30px;
|
||||||
|
margin: 30px;
|
||||||
|
background-color: transparent;
|
||||||
|
cursor: "default";
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****----- Elements -----*****/
|
||||||
|
element {
|
||||||
|
enabled: true;
|
||||||
|
padding: 40px 10px;
|
||||||
|
border-radius: 10px;
|
||||||
|
background-color: @background-alt;
|
||||||
|
text-color: @foreground;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
element-text {
|
||||||
|
font: "feather bold 32";
|
||||||
|
background-color: transparent;
|
||||||
|
text-color: inherit;
|
||||||
|
cursor: inherit;
|
||||||
|
vertical-align: 0.5;
|
||||||
|
horizontal-align: 0.5;
|
||||||
|
}
|
||||||
|
element selected.normal {
|
||||||
|
background-color: var(selected);
|
||||||
|
text-color: var(background);
|
||||||
|
}
|
||||||