Compare commits

13 Commits

Author SHA1 Message Date
Kievits Rene
3f141601e1 Merge pull request #37 from psimovec/fix_layout_list_multiple_screens
Fix layout_list widget for multiple screens
2022-11-22 16:54:18 +01:00
Pavel Simovec
fa98699646 fix layout_list widget for multiple screens 2022-11-21 21:45:28 +01:00
Kievits Rene
5458e438fe Add nvidia-smi as dependency 2022-07-10 19:53:28 +02:00
Rene Kievits
d9a1b356a9 Add pearl backup script for pactl get-default-source/sink #24 2022-06-16 00:21:52 +02:00
Kievits Rene
028320cce7 Added install script to readme 2022-06-13 11:34:32 +02:00
Kievits Rene
a63d01c176 Merge pull request #27 from JulianGR/main
[ENHANCEMENT] Autoinstall scripts for Arch and Pop_OS!
2022-06-13 11:25:12 +02:00
Julián Gómez
c62383b277 added flex, bison, check as dep. Also changed typo and sudo 2022-06-13 10:22:35 +02:00
Julián Gómez
6ad3b557fa hot fix for rofi installation 2022-06-10 11:12:42 +02:00
Julián Gómez
12d2453601 adding missing dependencies, alacritty and installing fonts in ~/.fonts 2022-06-10 09:26:13 +02:00
Julián Gómez
ee2316dd5d added autoinstall scripts for arch and pop_os 2022-06-09 10:45:55 +02:00
Kievits Rene
688885be92 Readded picom to autostart, fix #23 2022-06-02 02:24:10 +02:00
Kievits Rene
904870ee28 remove default autostart to avoid confusion #21 2022-06-02 00:31:22 +02:00
Kievits Rene
471dd36519 #20 Add MesloLGS NF as dependency
#20 Add MesloLGS NF as dependency
2022-06-01 20:42:09 +02:00
8 changed files with 247 additions and 42 deletions

View File

@@ -53,6 +53,26 @@ Everything you see is done purely because I hate myself and like to give myself
2. Important dependencies but can be replaced, the theme might behave weird without these or without proper reconfiguration!
3. Nice to have and are the default. Can be easily changed without any worries!
#### Using the install script (Thanks to @JulianGR)
>**Arch**
```bash
git clone https://github.com/Crylia/crylia-theme
cd crylia-theme
chmod +x autoinstall_arch.sh
./autoinstall_arch.sh
```
>**Pop!_OS/Ubuntu**
```bash
git clone https://github.com/Crylia/crylia-theme
cd crylia-theme
chmod +x autoinstall_pop_os.sh
./autoinstall_pop_os.sh
```
<details>
<summary><b>1. Dependencies</b></summary>
@@ -102,6 +122,14 @@ meson --buildtype=release . build
sudo ninja -C build install
```
#### **nvidia-smi**
> **Ubuntu**
```bash
sudo apt install nvidia-smi
```
</details>
<details>
@@ -224,6 +252,24 @@ sudo pacman -S lightdm light-locker
```bash
sudo apt install lightdm light-locker
```
#### **MesloLGS NF Font**
> **Arch**
```bash
sudo pacman -S ttf-meslo-nerd-font-powerlevel10k
```
> **Ubuntu**
```bash
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttf
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold.ttf
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Italic.ttf
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold%20Italic.ttf
```
</details>
<details>

23
autoinstall_arch.sh Normal file
View File

@@ -0,0 +1,23 @@
#!/bin/bash
echo " "
echo " ___ __ ____________ ____________ ____ _______ "
echo " / | / / / /_ __/ __ \/ ____/ __ \ \/ / / / _/ | "
echo " / /| |/ / / / / / / / / / / / /_/ /\ / / / // /| | "
echo " / ___ / /_/ / / / / /_/ / /___/ _, _/ / / /____/ // ___ | "
echo " /_/ |_\____/ /_/ \____/\____/_/ |_| /_/_____/___/_/ |_| "
echo " "
yay -S awesome-git rofi-git picom-jonaburg-git ttf-meslo-nerd-font-powerlevel10k
sudo pacman -S papirus-icon-theme pulseaudio-alsa upower bluez bluez-utils xorg-setxkbmap xfce4-power-manager playerctl lightdm light-locker alacritty thunar flameshot
cd
git clone --recurse-submodules https://github.com/Crylia/crylia-theme
cd crylia-theme
cp -r awesome ~/.config/.
cp -r picom.conf ~/.config/.
cp -r rofi ~/.config/.
cp -r alacritty ~/.config/.
echo " ===== make sure to reboot and select awesome desktop ====== "

58
autoinstall_pop_os.sh Normal file
View File

@@ -0,0 +1,58 @@
#!/bin/bash
echo " "
echo " ___ __ ____________ ____________ ____ _______ "
echo " / | / / / /_ __/ __ \/ ____/ __ \ \/ / / / _/ | "
echo " / /| |/ / / / / / / / / / / / /_/ /\ / / / // /| | "
echo " / ___ / /_/ / / / / /_/ / /___/ _, _/ / / /____/ // ___ | "
echo " /_/ |_\____/ /_/ \____/\____/_/ |_| /_/_____/___/_/ |_| "
echo " "
# dependencies for meson, ninja, rofi, awesome and all extra optional packages
sudo apt -y install meson ninja-build cmake cmake-data pkg-config papirus-icon-theme xorg build-essential git make autoconf automake flex bison check go-md2man doxygen cppcheck ohcount pulseaudio-utils upower bluez xorg xfce4-power-manager playerctl lightdm light-locker libxcb-ewmh-dev libxcb-xfixes0-dev libev-dev libxcb-damage0-dev libxcb-sync-dev libxcb-composite0-dev libxcb-present-dev uthash-dev libconfig-dev libgl-dev alacritty bison flex check
# fonts
cd
mkdir .fonts
cd .fonts
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttf
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold.ttf
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Italic.ttf
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold%20Italic.ttf
# awesome-git (awesome from apt does NOT work)
cd
sudo apt build-dep -y awesome
git clone https://github.com/awesomewm/awesome
cd awesome
make package
cd build/
sudo dpkg -i awesome*.deb
# rofi (rofi from apt does NOT work)
cd
git clone https://github.com/davatorium/rofi/
cd rofi
meson setup build
ninja -C build
ninja -C build install
# picom (picom from apt does NOT work)
cd
git clone https://github.com/jonaburg/picom
cd picom
meson --buildtype=release . build
sudo ninja -C build
sudo ninja -C build install
cd
git clone --recurse-submodules https://github.com/Crylia/crylia-theme
cd crylia-theme
cp -r awesome ~/.config/.
cp -r picom.conf ~/.config/.
cp -r rofi ~/.config/.
cp -r alacritty ~/.config/.
echo " ===== make sure to reboot and select awesome desktop ====== "

View File

@@ -31,7 +31,7 @@ awful.screen.connect_for_each_screen(
s.date = require("src.widgets.date")()
s.clock = require("src.widgets.clock")()
--s.bluetooth = require("src.widgets.bluetooth")()
s.layoutlist = require("src.widgets.layout_list")()
s.layoutlist = require("src.widgets.layout_list")(s)
s.powerbutton = require("src.widgets.power")()
s.kblayout = require("src.widgets.kblayout")(s)
s.taglist = require("src.widgets.taglist")(s)

View File

@@ -166,17 +166,39 @@ return function(s)
awful.spawn.easy_async_with_shell(
[[ pactl get-default-sink ]],
function(stdout)
local node_active = stdout:gsub("\n", "")
if node == node_active then
bg = color["Purple200"]
fg = color["Grey900"]
device.background:set_bg(color["Purple200"])
device.background:set_fg(color["Grey900"])
if stdout:gsub("\n", "") ~= "" then
local node_active = stdout:gsub("\n", "")
if node == node_active then
bg = color["Purple200"]
fg = color["Grey900"]
device.background:set_bg(color["Purple200"])
device.background:set_fg(color["Grey900"])
else
fg = color["Purple200"]
bg = color["Grey700"]
device.background:set_fg(color["Purple200"])
device.background:set_bg(color["Grey700"])
end
else
fg = color["Purple200"]
bg = color["Grey700"]
device.background:set_fg(color["Purple200"])
device.background:set_bg(color["Grey700"])
awful.spawn.easy_async_with_shell(
[[LC_ALL=C pactl info | perl -n -e'/Default Sink: (.+)\s/ && print $1']],
function(stdout2)
if stdout2:gsub("\n", "") ~= "" then
local node_active = stdout2:gsub("\n", "")
if node == node_active then
bg = color["Purple200"]
fg = color["Grey900"]
device.background:set_bg(color["Purple200"])
device.background:set_fg(color["Grey900"])
else
fg = color["Purple200"]
bg = color["Grey700"]
device.background:set_fg(color["Purple200"])
device.background:set_bg(color["Grey700"])
end
end
end
)
end
end
)
@@ -310,6 +332,45 @@ return function(s)
end
end
)
awful.spawn.easy_async_with_shell(
[[ pactl get-default-source ]],
function(stdout)
if stdout:gsub("\n", "") ~= "" then
local node_active = stdout:gsub("\n", "")
if node == node_active then
bg = color["Blue200"]
fg = color["Grey900"]
device.background:set_bg(color["Blue200"])
device.background:set_fg(color["Grey900"])
else
fg = color["Blue200"]
bg = color["Grey700"]
device.background:set_fg(color["Blue200"])
device.background:set_bg(color["Grey700"])
end
else
awful.spawn.easy_async_with_shell(
[[LC_ALL=C pactl info | perl -n -e'/Default Source: (.+)\s/ && print $1']],
function(stdout2)
if stdout2:gsub("\n", "") ~= "" then
local node_active = stdout:gsub("\n", "")
if node == node_active then
bg = color["Blue200"]
fg = color["Grey900"]
device.background:set_bg(color["Blue200"])
device.background:set_fg(color["Grey900"])
else
fg = color["Blue200"]
bg = color["Grey700"]
device.background:set_fg(color["Blue200"])
device.background:set_bg(color["Grey700"])
end
end
end
)
end
end
)
end
return device
end
@@ -594,7 +655,8 @@ return function(s)
end
)
local audio_slider_margin = volume_controller:get_children_by_id("audio_volume_margin")[1].audio_volume.slider_margin.slider
local audio_slider_margin = volume_controller:get_children_by_id("audio_volume_margin")[1].audio_volume.slider_margin.
slider
-- Volume slider change event
audio_slider_margin:connect_signal(
@@ -625,7 +687,9 @@ return function(s)
stretch = false,
visible = false,
screen = s,
placement = function(c) awful.placement.align(c, { position = "top_right", margins = { right = dpi(305), top = dpi(60) } }) end,
placement = function(c) awful.placement.align(c,
{ position = "top_right", margins = { right = dpi(305), top = dpi(60) } })
end,
shape = function(cr, width, height)
gears.shape.rounded_rect(cr, width, height, 12)
end
@@ -634,7 +698,8 @@ return function(s)
-- Get all source devices
local function get_source_devices()
awful.spawn.easy_async_with_shell(
[[ pactl list sinks | grep -E 'node.name|alsa.card_name' | awk '{gsub(/"/, ""); for(i = 3;i < NF;i++) printf $i " "; print $NF}' ]],
[[ pactl list sinks | grep -E 'node.name|alsa.card_name' | awk '{gsub(/"/, ""); for(i = 3;i < NF;i++) printf $i " "; print $NF}' ]]
,
function(stdout)
local i, j = 1, 1
@@ -668,7 +733,8 @@ return function(s)
-- Get all input devices
local function get_input_devices()
awful.spawn.easy_async_with_shell(
[[ pactl list sources | grep -E "node.name|alsa.card_name" | awk '{gsub(/"/, ""); for(i = 3;i < NF;i++) printf $i " "; print $NF}' ]],
[[ pactl list sources | grep -E "node.name|alsa.card_name" | awk '{gsub(/"/, ""); for(i = 3;i < NF;i++) printf $i " "; print $NF}' ]]
,
function(stdout)
local i, j = 1, 1
@@ -718,9 +784,11 @@ return function(s)
local volume = stdout:gsub("%%", ""):gsub("\n", "")
volume_controller:get_children_by_id("mic_volume_margin")[1].mic_volume.slider_margin.slider:set_value(tonumber(volume))
if volume > 0 then
volume_controller:get_children_by_id("mic_volume_margin")[1].icon:set_image(gears.color.recolor_image(icondir .. "microphone.svg", color["LightBlue200"]))
volume_controller:get_children_by_id("mic_volume_margin")[1].icon:set_image(gears.color.recolor_image(icondir
.. "microphone.svg", color["LightBlue200"]))
else
volume_controller:get_children_by_id("mic_volume_margin")[1].icon:set_image(gears.color.recolor_image(icondir .. "microphone-off.svg", color["LightBlue200"]))
volume_controller:get_children_by_id("mic_volume_margin")[1].icon:set_image(gears.color.recolor_image(icondir
.. "microphone-off.svg", color["LightBlue200"]))
end
end
)
@@ -735,7 +803,8 @@ return function(s)
function(stdout)
if stdout:match("yes") then
volume_controller:get_children_by_id("mic_volume_margin")[1].mic_volume.slider_margin.slider:set_value(tonumber(0))
volume_controller:get_children_by_id("mic_volume_margin")[1].icon:set_image(gears.color.recolor_image(icondir .. "microphone-off.svg", color["LightBlue200"]))
volume_controller:get_children_by_id("mic_volume_margin")[1].icon:set_image(gears.color.recolor_image(icondir
.. "microphone-off.svg", color["LightBlue200"]))
else
get_mic_volume()
end
@@ -813,8 +882,10 @@ return function(s)
icon = icon .. "-high"
end
volume_controller.controller_margin.controller_layout.audio_volume_margin.audio_volume.slider_margin.slider:set_value(volume)
volume_controller.controller_margin.controller_layout.audio_volume_margin.audio_volume.icon:set_image(gears.color.recolor_image(icon .. ".svg", color["Purple200"]))
volume_controller.controller_margin.controller_layout.audio_volume_margin.audio_volume.slider_margin.slider:
set_value(volume)
volume_controller.controller_margin.controller_layout.audio_volume_margin.audio_volume.icon:set_image(gears.color.
recolor_image(icon .. ".svg", color["Purple200"]))
end
)
@@ -823,7 +894,8 @@ return function(s)
"get::volume_mute",
function(mute)
if mute then
volume_controller.controller_margin.controller_layout.audio_volume_margin.audio_volume.icon:set_image(gears.color.recolor_image(icondir .. "volume-mute.svg", color["Purple200"]))
volume_controller.controller_margin.controller_layout.audio_volume_margin.audio_volume.icon:set_image(gears.
color.recolor_image(icondir .. "volume-mute.svg", color["Purple200"]))
end
end
)
@@ -833,9 +905,11 @@ return function(s)
"get::mic_volume",
function(volume)
if volume > 0 then
volume_controller:get_children_by_id("mic_volume_margin")[1].mic_volume.icon:set_image(gears.color.recolor_image(icondir .. "microphone.svg", color["LightBlue200"]))
volume_controller:get_children_by_id("mic_volume_margin")[1].mic_volume.icon:set_image(gears.color.recolor_image(icondir
.. "microphone.svg", color["LightBlue200"]))
else
volume_controller:get_children_by_id("mic_volume_margin")[1].mic_volume.icon:set_image(gears.color.recolor_image(icondir .. "microphone-off.svg", color["LightBlue200"]))
volume_controller:get_children_by_id("mic_volume_margin")[1].mic_volume.icon:set_image(gears.color.recolor_image(icondir
.. "microphone-off.svg", color["LightBlue200"]))
end
end
)

View File

@@ -32,13 +32,7 @@ user_vars = {
-- Write the terminal command to start anything here
autostart = {
"picom --experimental-backends",
"xfce4-power-manager",
"light-locker --lock-on-suspend --lock-on-lid &",
"flatpak run com.spotify.Client",
"discord",
"/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1",
"setxkbmap -option caps:swapescape"
"picom --experimental-backends"
},
-- Type 'ip a' and check your wlan and ethernet name

View File

@@ -103,6 +103,7 @@ return function(widget)
3,
function(_, stdout)
gpu_usage_widget.container.gpu_layout.label.text = stdout:gsub("\n", "") .. "%"
awesome.emit_signal("update::gpu_usage_widget", tonumber(stdout))
end
)
@@ -116,21 +117,29 @@ return function(widget)
local temp_color
local temp_num = tonumber(stdout)
if temp_num < 50 then
if temp_num then
if temp_num < 50 then
temp_color = color["Green200"]
temp_icon = icon_dir .. "thermometer-low.svg"
elseif temp_num >= 50 and temp_num < 80 then
temp_color = color["Orange200"]
temp_icon = icon_dir .. "thermometer.svg"
elseif temp_num >= 80 then
temp_color = color["Red200"]
temp_icon = icon_dir .. "thermometer-high.svg"
end
else
temp_num = "NaN"
temp_color = color["Green200"]
temp_icon = icon_dir .. "thermometer-low.svg"
elseif temp_num >= 50 and temp_num < 80 then
temp_color = color["Orange200"]
temp_icon = icon_dir .. "thermometer.svg"
elseif temp_num >= 80 then
temp_color = color["Red200"]
temp_icon = icon_dir .. "thermometer-high.svg"
end
Hover_signal(gpu_temp_widget, temp_color, color["Grey900"])
gpu_temp_widget.container.gpu_layout.icon_margin.icon_layout.icon:set_image(temp_icon)
gpu_temp_widget:set_bg(temp_color)
gpu_temp_widget.container.gpu_layout.label.text = tostring(temp_num) .. "°C"
awesome.emit_signal("update::gpu_temp_widget", temp_num, temp_icon)
end
)

View File

@@ -11,11 +11,11 @@ local wibox = require("wibox")
require("src.core.signals")
-- Returns the layoutbox widget
return function()
return function(s)
local layout = wibox.widget {
{
{
awful.widget.layoutbox(),
awful.widget.layoutbox(s),
id = "icon_layout",
widget = wibox.container.place
},
@@ -29,7 +29,8 @@ return function()
shape = function(cr, width, height)
gears.shape.rounded_rect(cr, width, height, 5)
end,
widget = wibox.container.background
widget = wibox.container.background,
screen = s
}
-- Signals
@@ -38,7 +39,7 @@ return function()
layout:connect_signal(
"button::press",
function()
awful.layout.inc(-1)
awful.layout.inc(-1, s)
end
)