feat: more aesthetic stuff

This commit is contained in:
rxyhn 2022-03-31 11:32:27 +07:00
parent 406691986e
commit 3f1ebe2fc4
11 changed files with 165 additions and 121 deletions

134
.github/README.md vendored
View file

@ -6,7 +6,7 @@
<br>
<div align="center">
<img src="assets/awesome.png">
<img src="assets/awesome.png" alt="Rice Preview">
</div>
<br>
@ -44,78 +44,81 @@ These dotfiles are made with love, for sure.
<details>
<summary><strong>S E T U P</strong></summary>
1. Install dependencies and enable services
> This is step-by-step how to install these dotfiles. Just [R.T.F.M](https://en.wikipedia.org/wiki/RTFM).
+ Dependencies
1. Install dependencies and enable services
- **Arch Linux** (and all Arch-based distributions)
+ Dependencies
*Assuming your AUR helper is* `yay`
- **Arch Linux** (and all Arch-based distributions)
*Assuming your AUR helper is* `yay`
```shell
yay -Sy awesome-git picom-git alacritty rofi todo-bin acpi acpid \
wireless_tools jq inotify-tools polkit-gnome xdotool xclip maim \
brightnessctl alsa-utils alsa-tools pulseaudio lm_sensors \
mpd mpc mpdris2 ncmpcpp playerctl --needed
```
+ Services
```shell
yay -Sy awesome-git picom-jonaburg-fix alacritty rofi todo-bin acpi acpid \
wireless_tools jq inotify-tools polkit-gnome xdotool xclip maim \
brightnessctl alsa-utils alsa-tools pulseaudio lm_sensors \
mpd mpc mpdris2 ncmpcpp playerctl --needed
# For automatically launching mpd on login
systemctl --user enable mpd.service
systemctl --user start mpd.service
# For charger plug/unplug events (if you have a battery)
sudo systemctl enable acpid.service
sudo systemctl start acpid.service
```
+ Services
2. Install needed fonts
You will need to install a few fonts (mainly icon fonts) in order for text and icons to be rendered properly.
Necessary fonts:
+ **Iosevka** - [here](https://github.com/ryanoasis/nerd-fonts/)
+ **Icomoon** - [here](https://www.dropbox.com/s/hrkub2yo9iapljz/icomoon.zip?dl=0)
+ **Material** - [here](https://github.com/google/material-design-icons)
Once you download them and unpack them, place them into `~/.fonts` or `~/.local/share/fonts`.
3. Install my AwesomeWM configuration files
> Clone this repository
```shell
# For automatically launching mpd on login
systemctl --user enable mpd.service
systemctl --user start mpd.service
# For charger plug/unplug events (if you have a battery)
sudo systemctl enable acpid.service
sudo systemctl start acpid.service
git clone https://github.com/rxyhn/dotfiles.git
cd dotfiles
```
2. Install needed fonts
> Copy config and binaries files
You will need to install a few fonts (mainly icon fonts) in order for text and icons to be rendered properly.
```shell
cp -r config/* ~/.config/
cp -r bin/* ~/.local/bin/
cp -r misc/. ~/
```
Necessary fonts:
+ **Iosevka** - [here](https://github.com/ryanoasis/nerd-fonts/)
+ **Icomoon** - [here](https://www.dropbox.com/s/hrkub2yo9iapljz/icomoon.zip?dl=0)
+ **Material** - [here](https://github.com/google/material-design-icons)
> You have to add `TODO_PATH` in your env variable
Once you download them and unpack them, place them into `~/.fonts` or `~/.local/share/fonts`.
3. Install my AwesomeWM configuration files
```shell
export TODO_PATH="path/to/todo"
```
> Clone this repository
4. Configure stuff
```shell
git clone https://github.com/rxyhn/dotfiles.git
cd dotfiles
```
The relevant files are inside your `~/.config/awesome` directory.
> Copy config and binaries files
+ User preferences and default applications
```shell
cp -r config/* ~/.config/
cp -r bin/* ~/.local/bin/
cp -r misc/. ~/
```
In `rc.lua` there is a *Default Applications* section where user preferences and default applications are defined.
You should change those to your liking.
> You have to add `TODO_PATH` in your env variable
Note: For the weather widgets to work, you will also need to create an account on [openweathermap](https://openweathermap.org), get your key, look for your city ID, and set `openweathermap_key` and `openweathermap_city_id` accordingly.
```shell
export TODO_PATH="path/to/todo"
```
4. Configure stuff
The relevant files are inside your `~/.config/awesome` directory.
+ User preferences and default applications
In `rc.lua` there is a *Default Applications* section where user preferences and default applications are defined.
You should change those to your liking.
Note: For the weather widgets to work, you will also need to create an account on [openweathermap](https://openweathermap.org), get your key, look for your city ID, and set `openweathermap_key` and `openweathermap_city_id` accordingly.
5. Lastly, log out from your current desktop session and log in into AwesomeWM.
5. Lastly, log out from your current desktop session and log in into AwesomeWM.
</details>
@ -126,18 +129,37 @@ These dotfiles are made with love, for sure.
<b>These are the features included in my AwesomeWM setups!</b>
+ Beautiful `colorscheme` ikr, named `night` and created by [ner0z](https://github.com/ner0z)
+ Aesthetic `Dashboard` ngl.
+ Custom mouse-friendly `ncmpcpp` UI with album art ofc.
- <details>
<summary>Preview</summary>
*this is so aesthetic isn't it?*
<div align="left">
<img src="assets/ncmpcpp.png" width="500px" alt="ncmpcpp preview">
</div>
</details>
+ `Word Clock Lockscreen` with PAM Integration
- <details>
*A beautiful word clock is on the lockscreen!*
<summary>Preview</summary>
<div align="left">
<img src="assets/lockscreen.png" width="500px" alt="word clock lockscreen preview">
</div>
</details>
+ Notification Center
+ Control Panel
+ ToDo Reminder
+ Battery Indicator
+ PopUp Notifications
+ Applications Launcher
+ Custom mouse-friendly `ncmpcpp` UI with album art ofc.
+ `Word Clock Lockscreen` with PAM Integration
+ Some Tooltip Widget
+ Hardware Monitor
+ Beautiful `colorscheme` ikr, named `night` and created by [ner0z](https://github.com/ner0z)
</details>

BIN
.github/assets/lockscreen.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

BIN
.github/assets/ncmpcpp.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
# stolen from snap
<<screensht

View file

@ -0,0 +1,21 @@
#!/bin/sh
start() {
if ! pgrep -f $1 ;
then
$@&
fi
}
# music
start mpd
start mpDris2 # add playerctl support to mpd
# compositor
start picom -b --experimental-backends --dbus --config $HOME/.config/awesome/theme/picom.conf
# auth
start /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
# load X colors
start xrdb $HOME/.Xresources

View file

@ -1,23 +0,0 @@
local awful = require("awful")
local gears = require("gears")
local function run_once(cmd)
local findme = cmd
local firstspace = cmd:find(' ')
if firstspace then findme = cmd:sub(0, firstspace - 1) end
awful.spawn.with_shell(string.format(
'pgrep -u $USER -x %s > /dev/null || (%s)',
findme, cmd), false)
end
-- music
run_once("mpd")
run_once("mpDris2")
-- picom
run_once("picom --config " .. theme_dir .. "picom.conf")
-- auth
run_once("/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1")
return autostart

View file

@ -3,6 +3,9 @@ local awful = require("awful")
local hotkeys_popup = require("awful.hotkeys_popup")
local beautiful = require("beautiful")
-- Helpers
local helpers = require("helpers")
-- Create a launcher widget and a main menu
awful.screen.connect_for_each_screen(function(s)
@ -39,5 +42,7 @@ awful.screen.connect_for_each_screen(function(s)
}
})
mymainmenu.wibox.shape = helpers.rrect(beautiful.border_radius)
end)

View file

@ -1,4 +1,3 @@
pcall(require, "luarocks.loader")
--[[
_____ __ _ __ _____ _____ _____ _______ _____
| | | | | ___| ___| | | ___|
@ -7,7 +6,7 @@ pcall(require, "luarocks.loader")
~ AestheticArch ~
rxyhn
--]]
pcall(require, "luarocks.loader")
-- Standard awesome library
local gfs = require("gears.filesystem")
@ -15,7 +14,6 @@ local awful = require("awful")
-- Theme handling library
local beautiful = require("beautiful")
theme_dir = gfs.get_configuration_dir() .. "theme/"
dpi = beautiful.xresources.apply_dpi
beautiful.init(gfs.get_configuration_dir() .. "theme/theme.lua")
@ -24,7 +22,7 @@ terminal = "alacritty"
editor = terminal .. " -e " .. os.getenv("EDITOR")
vscode = "code"
browser = "firefox"
launcher = "rofi -show drun -theme " .. theme_dir .. "rofi.rasi"
launcher = "rofi -show drun -theme " .. os.getenv("HOME") .. "/.config/awesome/theme/rofi.rasi"
file_manager = "nautilus"
music_client = terminal .. " --class music -e ncmpcpp"
@ -38,7 +36,7 @@ screen_width = awful.screen.focused().geometry.width
screen_height = awful.screen.focused().geometry.height
-- Autostart
local autostart = require("configuration.autostart")
awful.spawn.with_shell(gfs.get_configuration_dir() .. "configuration/autostart")
-- Import Configuration
require("configuration")

View file

@ -1,3 +1,15 @@
#========================= Corners =========================#
corner-radius = 12;
rounded-corners-exclude = [
# "!window_type = 'normal'",
# "class_g ?= 'rofi'",
];
round-borders = 1;
round-borders-exclude = [
#"class_g = 'TelegramDesktop'",
];
#========================= Shadows =========================#
shadow = true;
shadow-radius = 14;
@ -26,38 +38,42 @@ fade-exclude = [
"class_g = 'slop'" # maim
]
#========================= Corners =========================#
corner-radius = 12;
rounded-corners-exclude = [
# "!window_type = 'normal'",
# "class_g ?= 'rofi'",
];
round-borders = 1;
round-borders-exclude = [
#"class_g = 'TelegramDesktop'",
];
#========================= Opacity =========================#
inactive-opacity = 1;
frame-opacity = 1;
inactive-opacity-override = false;
active-opacity = 1.0;
inactive-dim = 0.0;
focus-exclude = [
"class_g = 'Cairo-clock'",
"class_g ?= 'rofi'",
"class_g ?= 'slop'"
];
opacity-rule = [
"85:class_g = 'splash'"
];
#========================= Blurring =========================#
blur-kern = "11x11gaussian";
blur-method = "dual_kawase";
blur-strength = 8.0;
blur: {
method = "dual_kawase";
strength = 5.0;
deviation = 1.0;
kernel = "11x11gaussian";
}
blur-background = false;
blur-background-frame = true;
blur-background-fixed = true;
blur-background-exclude = [
"!window_type = 'splash'",
"class_g = 'slop'" # maim
"class_g = 'slop'",
"class_g = 'Firefox' && argb",
"_GTK_FRAME_EXTENTS@:c"
];
#========================= General Settings =========================#
experimental-backends = true;
backend = "glx";
vsync = true;
daemon = false;
@ -66,13 +82,11 @@ mark-wmwin-focused = true;
mark-ovredir-focused = true;
detect-rounded-corners = true;
detect-client-opacity = true;
refresh-rate = 0;
detect-client-leader = true;
detect-transient = true;
glx-no-stencil = true;
use-damage = true;
resize-damage = 1;
xrender-sync-fence = true;
glx-use-copysubbuffer-mesa = false;
transparent-clipping = false;
wintypes:

View file

@ -171,8 +171,8 @@ theme.playerctl_position_update_interval = 1
-- Mainmenu
theme.menu_font = theme.font_name .. "medium 10"
theme.menu_height = dpi(30)
theme.menu_width = dpi(150)
theme.menu_height = dpi(30)
theme.menu_width = dpi(150)
theme.menu_bg_normal = theme.xbackground
theme.menu_bg_focus = theme.lighter_bg
theme.menu_fg_normal= theme.xforeground
@ -189,7 +189,7 @@ theme.hotkeys_modifiers_fg = theme.xforeground
theme.hotkeys_font = theme.font_name .. "11"
theme.hotkeys_description_font = theme.font_name .. "9"
theme.hotkeys_shape = helpers.rrect(theme.border_radius)
theme.hotkeys_group_margin = dpi(33)
theme.hotkeys_group_margin = dpi(40)
-- Layout List
theme.layoutlist_border_color = theme.lighter_bg

View file

@ -27,6 +27,7 @@ local lock_screen = require("ui.lockscreen")
lock_screen_box = wibox({visible = false, ontop = true, type = "splash", screen = screen.primary})
awful.placement.maximize(lock_screen_box)
-- lock_screen_box.bg = beautiful.transparent
lock_screen_box.bg = beautiful.xbackground .. "22"
-- Add lockscreen to each screen
@ -34,7 +35,7 @@ awful.screen.connect_for_each_screen(function(s)
if s == screen.primary then
s.mylockscreen = lock_screen_box
else
s.mylockscreen = helpers.screen_mask(s, beautiful.xbackground)
s.mylockscreen = helpers.screen_mask(s, beautiful.lock_screen_bg or beautiful.exit_screen_bg or beautiful.xbackground)
end
end)
@ -134,7 +135,7 @@ end
local var_count = 0
for i, m in pairs(time_char) do
-- local text = helpers.colorize_text(m, "#162026")
local text = helpers.colorize_text(m, beautiful.xcolor8 .. "55")
local text = helpers.colorize_text(m, beautiful.lighter_bg .. "55")
var_count = var_count + 1
local create_dummy_text = true
@ -172,7 +173,7 @@ local function deactivate_word(w)
for i, m in pairs(char_map[w]) do
local text = m.text
m.markup = helpers.colorize_text(text, beautiful.xcolor8 .. "55")
m.markup = helpers.colorize_text(text, beautiful.lighter_bg .. "55")
end
end
@ -383,7 +384,7 @@ local function grab_password()
end
function lock_screen_show()
set_visibility(true)
set_visibility(true)
grab_password()
end
@ -394,16 +395,22 @@ lock_screen_box:setup {
-- Vertical centering
nil,
{
helpers.vertical_pad(dpi(80)),
time,
{
visible = false,
expand = "none",
layout = wibox.layout.align.horizontal
{
helpers.vertical_pad(dpi(10)),
time,
lock_animation,
spacing = dpi(50),
layout = wibox.layout.fixed.vertical
},
bottom = dpi(60),
right = dpi(60),
left = dpi(60),
widget = wibox.container.margin
},
lock_animation,
spacing = dpi(60),
layout = wibox.layout.fixed.vertical
shape = helpers.rrect(beautiful.border_radius),
bg = beautiful.xbackground,
widget = wibox.container.background
},
expand = "none",
layout = wibox.layout.align.vertical