Added audio device selector, new notification theme and much more. Rewritten some files and made a new README

This commit is contained in:
Kievits Rene
2022-05-16 16:06:02 +02:00
parent 07b2b9ad4e
commit cc00832342
64 changed files with 4720 additions and 3328 deletions

382
README.md
View File

@@ -1,62 +1,380 @@
# Crylia Theme
This theme is inspired by simple bar and many other things that I think look good and fit my theme. AwesomeWM lets you configure your desktop as you want, no compromises, the sky is the limit!
This is the reason I choose AwesomeWM.
![Desktop](./desktop.png)
![Lockscreen](./lockscreen.png)
## FAQ - Wiki
<div align="center">
<h1>Crylia Theme</h1>
</div>
---
If you feel lost, got a problem or just have a question, please check out the wiki first before opening an issue.
![Desktop](./assets/desktop.png)
## Quick Install
![Lockscreen](./assets/lockscreen.png)
---
### [Installation](https://github.com/Crylia/crylia-theme/wiki/Guide)
<div align="center">
<h1>Welcome to my dotfiles</h1>
</div>
<div align="center">
Installing this theme is rather easy, just copy the repo and put the awesome folder to ~/.config/
But in order for it to work as seen you need some dependencies installed along the way. Here are the main components, but in order for everything to work go [here](https://github.com/Crylia/crylia-theme/wiki/Guide).
An AwesomeWM theme inspired by everything I could find online and thought "Hey, that looks good!".
||Arch|Ubuntu|Why?|
|:-:|:-:|:-:|:-:|
|AwesomeWM|awesome|[Guide here](https://github.com/awesomeWM/awesome)|Its your Window Manager lol|
|Rofi|rofi|[Guide here](https://github.com/davatorium/rofi)|For the application launcher|
|Picom|picom-ibhagwan-git<sup>aur</sup>|[Guide here](https://github.com/jonaburg/picom/security)|Compositor, needed for transparency/blur/effects/animations etc|
|||||
This repository holds mainly my AwesomeWM theme but also some other rice's I've done over the years.
Everything you see is done purely because I hate myself and like to give myself a hard time.
</div>
## Information
---
<image align="right" width="450px" src="assets/neofetch.png"/>
**My system setup**:
- **OS**: [Pop!_OS](https://pop.system76.com/)
- **WM**: [AwesomeWM](https://github.com/awesomeWM/awesome)
- **Terminal**: [Alacritty](https://github.com/alacritty/alacritty)
- **Shell**: [ZSH](https://github.com/ohmyzsh/ohmyzsh)
- **Compositor**: [Picom](https://github.com/jonaburg/picom)
- **Application Launcher**: [Rofi](https://github.com/davatorium/rofi)
- **File Manager**: [Thunar](https://github.com/xfce-mirror/thunar)
- **Icons**: [Papirus-Dark](https://github.com/PapirusDevelopmentTeam/papirus-icon-theme)
- **Cursor**: [Vimix-Cursors](https://github.com/vinceliuice/Vimix-cursors)
- **Font**: [JetBrainsMonoNerdFont](https://www.nerdfonts.com/font-downloads)
- **Editor**: [VS Code](https://code.visualstudio.com/)
## Installation
---
#### Here are three levels of what you need
1. Dependencies you need to have in order for the rice to work
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!
<details>
<summary><b>1. Dependencies</b></summary>
#### **AwesomeWM**
>**Arch**
```bash
yay -S awesome-git
```
> **Ubuntu**
```bash
sudo apt build-dep awesome
git clone https://github.com/awesomeWM/awesome.git
make package
sudo dpkg -i awesome*.deb
```
#### **Rofi**
>**Arch**
```bash
yay -S rofi-git
```
>**Ubuntu**
Check [HERE](https://github.com/davatorium/rofi/blob/next/INSTALL.md) for how to build from source. Note **DO NOT INSTAL ROFI FROM APT IT WONT WORK**
#### **Picom**
> **Arch**
```bash
yay -S picom-jonaburg-git
```
> **Ubuntu**
```bash
git clone https://github.com/jonaburg/picom
cd picom
meson --buildtype=release . build
sudo ninja -C build install
```
</details>
<details>
<br>
<summary><b>2. Important Dependencies</b></summary>
#### **Papirus** - Icon Theme
***Make sure the theme is located at `/usr/share/icons/`***
> **Arch**
```bash
sudo pacman -S papirus-icon-theme
```
> **Ubuntu**
```bash
sudo apt install papirus-icon-theme
```
#### **pactl - PulseAudio Controler**
***All audio scripts depends on this***
> **Arch**
```bash
sudo pacman -S pulseaudio-alsa
```
> **Ubuntu**
```bash
sudo apt install pulseaudio-utils
```
#### **upower - Battery Info**
> **Arch**
```bash
sudo pacman -S upower
```
> **Ubuntu**
```bash
sudo apt install upower
```
#### **bluez/bluetoothctl - Bluetooth**
> **Arch**
```bash
sudo pacman -S bluez bluez-utils
```
> **Ubuntu**
```bash
sudo apt install bluez bluez-utils
```
#### **setxkbmap - Change Keyboard Layout**
> **Arch**
```bash
sudo pacman -S xorg-setxkbmap
```
> **Ubuntu**
```bash
sudo apt install xorg
```
#### **xfce4-power-manager - Backlight**
> **Arch**
```bash
sudo pacman -S xfce4-power-manager
```
> **Ubuntu**
```bash
sudo apt install xfce4-power-manager
```
#### **playerctl - Media control**
> **Arch**
```bash
sudo pacman -S playerctl
```
> **Ubuntu**
```bash
sudo apt install playerctl
```
#### **LightDM - Login/Logout/ScreenLock**
> **Arch**
```bash
sudo pacman -S lightdm light-locker
```
> **Ubuntu**
```bash
sudo apt install lightdm light-locker
```
</details>
<details>
<summary><b>3. Optional Dependencies</b></summary>
#### **Alacritty** - Default terminal
> **Arch**
```bash
sudo pacman -S alacritty
```
> **Ubuntu**
```bash
sudo apt install alacritty
```
#### **Thunar** - Default file manager
> **Arch**
```bash
sudo pacman -S thunar
```
> **Ubuntu**
```bash
sudo apt install thunar
```
#### **Flameshot - Screenshots**
> **Arch**
```bash
sudo pacman -S flameshot
```
> **Ubuntu**
```bash
sudo apt install flameshot
```
</details>
#### Setup
Make sure to backup any data before you copy my theme over!
```bash
git clone https://github.com/Crylia/crylia-theme
cd crylia-theme
cp -r awesome ~/.config/.
cp -r picom.conf ~/.config/.
cp -r rofi ~/.config/.
```
Optional
```bash
cp -r alacritty ~/.config/.
```
## [Documentation | Wiki | FAQ](https://github.com/Crylia/crylia-theme/wiki/Documentation)
## Features
---
Some would say there are more features than a WM needs, I say you can never have enough features (as long as they make some sense).
#### Some notable features
- [x] Multi screen support
- [x] Interactive taskbar (left, right click and hover over)
- [x] Interactive task/taglist and dock (left, right click and hover over)
- [x] Session option to reboot, shutdown etc
- [x] Multi keyboard layout support + switch widget
- [x] Calendar widget (not interactive)
- [x] Rofi application launcher and window switcher
- [x] Volume / Brightness switcher
- [X] Dock
- [x] Volume / Brightness control widget
- [X] Configurable Dock
- [x] Systray
- [x] GPU/CPU/RAM Temperature, Usage and Clock widget
- [x] Full audio device selector
- [x] Easy to configure dots
- [x] Interactive notifications
Some stuff planned for the future
#### Some stuff planned for the future
- [ ] Calendar OSD
- [ ] GPU/CPU/RAM etc Temparature and Usage widget
- [ ] Extended volume and microphone control
- [ ] More bugs
- [ ] I3 like layout / manual tiling
I've added various widgets you can choose or remove how you like it.
<br>
__Including__:<br>
Battery, Network (Wifi, Ethernet), Bluetooth, Volume, Keyboardlayout, Date (with Calendar), Time, Session options, Taglist, Tasklist, Layoutswitcher.
There are many widgets to choose from
**Widget List**:
- Battery
- Network (Wifi, Ethernet)
- Bluetooth
- Volume
- Keyboardlayout
- Date
- Time
- Session options
- Taglist
- Tasklist
- Layoutswitcher
- GPU/CPU/RAM Temperature/Usage and Clock speed.
## Gallery
---
>![desktop](assets/desktop.png)
>
>Entire Desktop with two terminal open
>![lockscreen](assets/lockscreen.png)
>
>Lockscreen
>![EntireScreen_VolumeOSD](assets/EntireScreen_VolumeOSD.png)
>
>Volume OSD (Backlight looks similar)
>![DeviceChooser](assets/DeviceChooser.png)
>
>Switch In/Output devices easily
>![Notification1](assets/Notification1.png)
>
>Spotify example notification with working media control
>![TopLeftBar](assets/TopLeftBar.png)
>
>Top Left bar closeup
>![TopCenter](assets/TopCenter.png)
>
>Top Center bar closeup
>![TopRight](assets/TopRight.png)
>
>Top Right bar closeup
>![dock](assets/dock.png)
>
>Dock closeup
## Known bugs

BIN
assets/DeviceChooser.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 MiB

BIN
assets/Notification1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

BIN
assets/TopCenter.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

BIN
assets/TopLeftBar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
assets/TopRight.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 2.9 MiB

After

Width:  |  Height:  |  Size: 2.9 MiB

BIN
assets/dock.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

BIN
assets/neofetch.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 241 KiB

View File

@@ -38,7 +38,7 @@ return function(s, widgets)
{
widget,
left = dpi(6),
right = dpi(3),
right = dpi(6),
top = dpi(6),
bottom = dpi(6),
widget = wibox.container.margin

View File

@@ -10,12 +10,12 @@ local wibox = require("wibox")
return function(screen, programs)
local function create_dock_element(class, program, name, is_steam, size)
local function create_dock_element(class, program, name, user_icon, is_steam, size)
if program == nil or class == nil then
return
end
is_steam = is_steam or false
user_icon = user_icon or nil
local dock_element = wibox.widget {
{
{
@@ -23,9 +23,9 @@ return function(screen, programs)
resize = true,
forced_width = size,
forced_height = size,
image = Get_icon(user_vars.icon_theme, nil, program, class, is_steam),
image = user_icon or Get_icon(user_vars.icon_theme, nil, program, class, is_steam),
widget = wibox.widget.imagebox,
id = "icon"
id = "icon",
},
margins = dpi(5),
widget = wibox.container.margin,
@@ -104,7 +104,7 @@ return function(screen, programs)
local dock_elements = { layout = wibox.layout.fixed.horizontal }
for i, p in ipairs(pr) do
dock_elements[i] = create_dock_element(p[1], p[2], p[3], p[4], user_vars.dock_icon_size)
dock_elements[i] = create_dock_element(p[1], p[2], p[3], p[4], p[5], user_vars.dock_icon_size)
end
return dock_elements
@@ -181,22 +181,14 @@ return function(screen, programs)
}
local function check_for_dock_hide(s)
local naughty = require("naughty")
if #s.selected_tag:clients() < 1 then
dock.visible = true
return
end
if s == mouse.screen then
--[[ if mouse.current_widget then
if tostring(mouse.current_widget):match("fake") then
dock.visible = true
return
end
end ]]
local visible = false
for j, c in ipairs(s.selected_tag:clients()) do
--naughty.notify({ title = tostring(c.class) })
if c.maximized or c.fullscreen then
dock.visible = false
return
@@ -209,10 +201,6 @@ return function(screen, programs)
else
dock.visible = true
end
--[[ if visible then
dock.visible = visible
return
end ]]
end
else
dock.visible = false

View File

@@ -23,29 +23,30 @@ awful.screen.connect_for_each_screen(
require("src.modules.volume_osd")(s)
require("src.modules.brightness_osd")(s)
require("src.modules.titlebar")
require("src.modules.volume_controller")(s)
-- Widgets
s.battery = require("src.widgets.battery")()
s.network = require("src.widgets.network")()
s.audio = require("src.widgets.audio")()
--s.battery = require("src.widgets.battery")()
s.audio = require("src.widgets.audio")(s)
s.date = require("src.widgets.date")()
s.clock = require("src.widgets.clock")()
s.bluetooth = require("src.widgets.bluetooth")()
--s.bluetooth = require("src.widgets.bluetooth")()
s.layoutlist = require("src.widgets.layout_list")()
s.powerbutton = require("src.widgets.power")()
s.kblayout = require("src.widgets.kblayout")(s)
s.taglist = require("src.widgets.taglist")(s)
s.tasklist = require("src.widgets.tasklist")(s)
s.systray = require("src.widgets.systray")(s)
s.cpu_usage = require("src.widgets.cpu_info")("usage")
s.cpu_temp = require("src.widgets.cpu_info")("temp")
s.cpu_freq = require("src.widgets.cpu_info")("freq", "average")
s.ram_info = require("src.widgets.ram_info")()
s.gpu_usage = require("src.widgets.gpu_info")("usage")
s.gpu_temp = require("src.widgets.gpu_info")("temp")
--s.cpu_freq = require("src.widgets.cpu_info")("freq", "average")
-- Add more of these if statements if you want to change
-- the modules/widgets per screen.
if s.index == 1 then
s.systray = require("src.widgets.systray")(s)
s.cpu_usage = require("src.widgets.cpu_info")("usage")
s.cpu_temp = require("src.widgets.cpu_info")("temp")
s.gpu_usage = require("src.widgets.gpu_info")("usage")
s.gpu_temp = require("src.widgets.gpu_info")("temp")
require("crylia_bar.left_bar")(s, { s.layoutlist, s.systray, s.taglist })
require("crylia_bar.center_bar")(s, { s.tasklist })
require("crylia_bar.right_bar")(s, { s.gpu_usage, s.gpu_temp, s.cpu_usage, s.cpu_temp, s.audio, s.kblayout, s.date, s.clock, s.powerbutton })
@@ -53,6 +54,9 @@ awful.screen.connect_for_each_screen(
end
if s.index == 2 then
s.network = require("src.widgets.network")()
s.ram_info = require("src.widgets.ram_info")()
require("crylia_bar.left_bar")(s, { s.layoutlist, s.taglist })
require("crylia_bar.center_bar")(s, { s.tasklist })
require("crylia_bar.right_bar")(s, { s.ram_info, s.audio, s.kblayout, s.network, s.date, s.clock, s.powerbutton })

View File

@@ -209,7 +209,6 @@ return gears.table.join(
"XF86AudioLowerVolume",
function(c)
awful.spawn.easy_async_with_shell("pactl set-sink-volume @DEFAULT_SINK@ -2%", function()
awesome.emit_signal("widget::volume")
awesome.emit_signal("module::volume_osd:show", true)
awesome.emit_signal("module::slider:update")
awesome.emit_signal("widget::volume_osd:rerun")
@@ -222,7 +221,6 @@ return gears.table.join(
"XF86AudioRaiseVolume",
function(c)
awful.spawn.easy_async_with_shell("pactl set-sink-volume @DEFAULT_SINK@ +2%", function()
awesome.emit_signal("widget::volume")
awesome.emit_signal("module::volume_osd:show", true)
awesome.emit_signal("module::slider:update")
awesome.emit_signal("widget::volume_osd:rerun")
@@ -235,7 +233,6 @@ return gears.table.join(
"XF86AudioMute",
function(c)
awful.spawn("pactl set-sink-mute @DEFAULT_SINK@ toggle")
awesome.emit_signal("widget::volume")
awesome.emit_signal("module::volume_osd:show", true)
awesome.emit_signal("module::slider:update")
awesome.emit_signal("widget::volume_osd:rerun")

View File

@@ -10,9 +10,10 @@
require("src.theme.user_variables")
require("src.theme.init")
require("src.core.error_handling")
require("src.core.rules")
require("src.core.signals")
require("src.core.notifications")
require("src.core.rules")
require("mappings.global_buttons")
require("mappings.bind_to_tags")
require("crylia_bar.init")
--require("src.tools.auto_starter")(user_vars.autostart)
require("src.tools.auto_starter")(user_vars.autostart)

View File

@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M3,5V19L11,12M13,19H16V5H13M18,5V19H21V5" /></svg>

After

Width:  |  Height:  |  Size: 335 B

View File

@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M16,18H18V6H16M6,18L14.5,12L6,6V18Z" /></svg>

After

Width:  |  Height:  |  Size: 330 B

View File

@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M6,18V6H8V18H6M9.5,12L18,6V18L9.5,12Z" /></svg>

After

Width:  |  Height:  |  Size: 332 B

View File

@@ -0,0 +1,14 @@
<svg width="260" height="260" xmlns="http://www.w3.org/2000/svg">
<g>
<title>Layer 1</title>
<g transform="rotate(90, 130, 130)" id="svg_11">
<rect fill="#212121" stroke="#424242" x="180" y="20" width="60" height="60" id="svg_2" rx="12" stroke-width="0"/>
<rect fill="#212121" stroke="#424242" x="180" y="100" width="60" height="60" id="svg_3" rx="12" stroke-width="0"/>
<rect fill="#212121" stroke="#424242" x="180" y="180" width="60" height="60" id="svg_4" rx="12" stroke-width="0"/>
<rect fill="#212121" stroke="#424242" x="20" y="20" width="140" height="140" id="svg_5" rx="12" stroke-width="0"/>
<rect fill="#212121" stroke="#424242" x="20" y="180" width="60" height="60" id="svg_9" rx="12" stroke-width="0"/>
<rect fill="#212121" stroke="#424242" x="100" y="180" width="60" height="60" id="svg_10" rx="12" stroke-width="0"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 874 B

View File

@@ -0,0 +1,12 @@
<svg width="260" height="260" xmlns="http://www.w3.org/2000/svg">
<g>
<title>Layer 1</title>
<rect fill="#212121" stroke="#424242" x="180" y="20" width="60" height="60" id="svg_2" rx="12" stroke-width="0"/>
<rect fill="#212121" stroke="#424242" x="180" y="100" width="60" height="60" id="svg_3" rx="12" stroke-width="0"/>
<rect fill="#212121" stroke="#424242" x="180" y="180" width="60" height="60" id="svg_4" rx="12" stroke-width="0"/>
<rect fill="#212121" stroke="#424242" x="20" y="20" width="140" height="140" id="svg_5" rx="12" stroke-width="0"/>
<rect fill="#212121" stroke="#424242" x="20" y="180" width="60" height="60" id="svg_9" rx="12" stroke-width="0"/>
<rect fill="#212121" stroke="#424242" x="100" y="180" width="60" height="60" id="svg_10" rx="12" stroke-width="0"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 810 B

View File

@@ -0,0 +1,14 @@
<svg width="260" height="260" xmlns="http://www.w3.org/2000/svg">
<g>
<title>Layer 1</title>
<g transform="rotate(180, 130, 130)" id="svg_11">
<rect fill="#212121" stroke="#424242" x="180" y="20" width="60" height="60" id="svg_2" rx="12" stroke-width="0"/>
<rect fill="#212121" stroke="#424242" x="180" y="100" width="60" height="60" id="svg_3" rx="12" stroke-width="0"/>
<rect fill="#212121" stroke="#424242" x="180" y="180" width="60" height="60" id="svg_4" rx="12" stroke-width="0"/>
<rect fill="#212121" stroke="#424242" x="20" y="20" width="140" height="140" id="svg_5" rx="12" stroke-width="0"/>
<rect fill="#212121" stroke="#424242" x="20" y="180" width="60" height="60" id="svg_9" rx="12" stroke-width="0"/>
<rect fill="#212121" stroke="#424242" x="100" y="180" width="60" height="60" id="svg_10" rx="12" stroke-width="0"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 875 B

View File

@@ -0,0 +1,14 @@
<svg width="260" height="260" xmlns="http://www.w3.org/2000/svg">
<g>
<title>Layer 1</title>
<g transform="rotate(-90, 130, 130)" id="svg_11">
<rect fill="#212121" stroke="#424242" x="180" y="20" width="60" height="60" id="svg_2" rx="12" stroke-width="0"/>
<rect fill="#212121" stroke="#424242" x="180" y="100" width="60" height="60" id="svg_3" rx="12" stroke-width="0"/>
<rect fill="#212121" stroke="#424242" x="180" y="180" width="60" height="60" id="svg_4" rx="12" stroke-width="0"/>
<rect fill="#212121" stroke="#424242" x="20" y="20" width="140" height="140" id="svg_5" rx="12" stroke-width="0"/>
<rect fill="#212121" stroke="#424242" x="20" y="180" width="60" height="60" id="svg_9" rx="12" stroke-width="0"/>
<rect fill="#212121" stroke="#424242" x="100" y="180" width="60" height="60" id="svg_10" rx="12" stroke-width="0"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 875 B

View File

@@ -0,0 +1,14 @@
<svg width="260" height="260" xmlns="http://www.w3.org/2000/svg">
<g>
<title>Layer 1</title>
<g transform="rotate(90, 130, 130)" id="svg_8">
<rect fill="#212121" stroke="#424242" x="140" y="20" width="100" height="60" id="svg_2" rx="12" stroke-width="0"/>
<rect fill="#212121" stroke="#424242" x="140" y="100" width="100" height="60" id="svg_3" rx="12" stroke-width="0"/>
<rect fill="#212121" stroke="#424242" x="140" y="180" width="100" height="60" id="svg_4" rx="12" stroke-width="0"/>
<rect fill="#212121" stroke="#424242" x="20" y="20" width="100" height="60" id="svg_5" rx="12" stroke-width="0"/>
<rect fill="#212121" stroke="#424242" x="20" y="100" width="100" height="60" id="svg_6" rx="12" stroke-width="0"/>
<rect fill="#212121" stroke="#424242" x="20" y="180" width="100" height="60" id="svg_7" rx="12" stroke-width="0"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 875 B

View File

@@ -0,0 +1,12 @@
<svg width="260" height="260" xmlns="http://www.w3.org/2000/svg">
<g>
<title>Layer 1</title>
<rect fill="#212121" stroke="#424242" x="140" y="20" width="100" height="60" id="svg_2" rx="12" stroke-width="0"/>
<rect fill="#212121" stroke="#424242" x="140" y="100" width="100" height="60" id="svg_3" rx="12" stroke-width="0"/>
<rect fill="#212121" stroke="#424242" x="139.67742" y="180" width="100" height="60" id="svg_4" rx="12" stroke-width="0"/>
<rect fill="#212121" stroke="#424242" x="20" y="20" width="100" height="60" id="svg_5" rx="12" stroke-width="0"/>
<rect fill="#212121" stroke="#424242" x="20" y="100" width="100" height="60" id="svg_6" rx="12" stroke-width="0"/>
<rect fill="#212121" stroke="#424242" x="20" y="180" width="100" height="60" id="svg_7" rx="12" stroke-width="0"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 818 B

View File

@@ -1,64 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg width="260" height="260" xmlns="http://www.w3.org/2000/svg">
<g>
<title>Layer 1</title>
<rect stroke-opacity="0" fill="#212121" stroke="#ffffff" x="60" y="200" width="180" height="40" id="svg_4" rx="12" stroke-width="0"/>
<rect fill="#212121" stroke="#424242" x="20" y="20" width="160" height="160" id="svg_5" rx="12" stroke-width="0"/>
<rect stroke-opacity="0" fill="#212121" stroke="#ffffff" x="200" y="60" width="40" height="180" id="svg_15" rx="12" stroke-width="0"/>
<rect stroke-opacity="0" fill="#212121" stroke="#ffffff" x="200" y="60" width="20" height="160" id="svg_16" stroke-width="0"/>
<rect stroke-opacity="0" fill="#212121" stroke="#ffffff" x="60" y="200" width="160" height="20" id="svg_17" stroke-width="0"/>
<rect stroke-opacity="0" fill="#212121" stroke="#ffffff" x="160" y="160" width="20" height="20" id="svg_20" stroke-width="0"/>
</g>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="svg2"
width="240"
height="240"
viewBox="0 0 240 240"
sodipodi:docname="floating.svg"
inkscape:version="0.92.4 5da689c313, 2019-01-14">
<metadata
id="metadata8">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs6" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1321"
inkscape:window-height="740"
id="namedview4"
showgrid="false"
inkscape:pagecheckerboard="true"
inkscape:zoom="3.4570311"
inkscape:cx="-20.682487"
inkscape:cy="34.133335"
inkscape:window-x="45"
inkscape:window-y="28"
inkscape:window-maximized="0"
inkscape:current-layer="svg2" />
<image
width="200"
height="200"
preserveAspectRatio="none"
style="image-rendering:optimizeQuality"
xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAC63pUWHRSYXcgcHJvZmlsZSB0eXBl IGV4aWYAAHja7ZdtktwoDIb/c4ocAUkIieNgPqpygz1+XrDd0z2Z3SS1+2er2pQBC1nI7wP0TBh/ fZ/hGy4qmUNS81xyjrhSSYUrOh7Pq+yaYtr1vtI1hOcXe3gMMEyCVs5Hq5d/hV0/XrjnoOPVHvwa Yb8CXQN3QFkzMzr9OUnY+bTTlUko4+zk4vac6sFn2+6U/eOed1p2Nus5PBuSQaWumEiYh5DEXfuZ gZx3xS27ZvhFMfSTWEBDcn8SBHn5vLuN8VmgF5HvXvis/qP3SXyul10+aZkvjdD5coD0a/G3xE8T yyMjfh0wuUN9IfLsPuc4v66mDEXztaK22HSHgeMByWW/llEMt6JvuxQUjzU2IO+xxQOlUSEGlRko UadKk8ZuGzWkmHiwoWVuLNvmYly4gRKBEQpNNinSxcGy8QhAmYQfudCet+z5Gjlm7gRXJgQjvPK3 JfzT4J+UMGdbElH0h1bIi9e6RhqL3KrhBSA0L266Bb7LhT8+rZ+1VBPclsyOD6zxOEMcSh9rSzZn gZ+iPbcQBetXAEiEuRXJkIBAzCRKmaIxGxF0dACqyJwl8QECpModSXISwXlk7LzmxjtG25eVMy8z ziaAUMnYTw5CFbBSUqwfS441VFU0qWpWUw9atGbJKWvO2fI65KqJJVPLZuZWrLp4cvXs5u7Fa+Ei OAO15GLFSym1cqiYqCJWhX+F5eBDjnTokQ87/ChHbVg+LTVtuVnzVlrt3KXjmOi5W/deeh0UBk6K kYaOPGz4KKNOrLUpM02dedr0WWZ9ULuo/lT+gBpd1HiTWn72oAZrMLtD0DpOdDEDMU4E4rYIYEHz YhadUuJFbjGLhbEplJGkLjah0yIGhGkQ66QHuw9yv8UtqP8WN/4VubDQ/RfkAtD9zO0Lan39zrVN 7NyFS9Mo2H3wqewBd4yo/m37DvQO9A70DvQO9A70DvT/DyQTfzzgn9jwA1+gnbQtmhjxAAABhWlD Q1BJQ0MgcHJvZmlsZQAAeJx9kT1Iw1AUhU9TRZGKgwVFHDJUJyuioo5ahSJUCLVCqw4mL/2DJg1J iouj4Fpw8Gex6uDirKuDqyAI/oA4OTopukiJ9yWFFjFeeLyP8+45vHcfINRKTLPaxgBNt81kPCam M6tixyuCCKAPo5iWmWXMSVICvvV1T71Ud1Ge5d/3Z3WrWYsBAZF4lhmmTbxBPLVpG5z3icOsIKvE 58QjJl2Q+JHrisdvnPMuCzwzbKaS88RhYjHfwkoLs4KpEU8SR1RNp3wh7bHKeYuzVqqwxj35C0NZ fWWZ67QGEcciliBBhIIKiijBRpR2nRQLSTqP+fgHXL9ELoVcRTByLKAMDbLrB/+D37O1chPjXlIo BrS/OM7HENCxC9SrjvN97Dj1EyD4DFzpTX+5Bsx8kl5tapEjoGcbuLhuasoecLkD9D8Zsim7UpCW kMsB72f0TRmg9xboWvPm1jjH6QOQolklboCDQ2A4T9nrPu/ubJ3bvz2N+f0AqXVyvRuPd5MAAAAG YktHRAAAAAAAAPlDu38AAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfkAwEXLw3L2R+kAAAA 1UlEQVR42u3bWwqDMBBG4ZPSZdQuqF1I19T1jftIX3yLFMReEucM+KYwfJI/MNFSayVznUheAgjQ 1h2Ygdr5FcBtL0BZCcEALoO8wACunwYYbVsoZoAAAggggAACCCCAAAIIIIAAAggggAACCCCAAAII IEBSgE1niUc8GnvXf3OWmA2gud8MEECApuaB+o9vADwGQYil130JesDvBN0FMofglBlgAp5bHzr/ YQ26BAQQQAABBBBAAAEEEEAAAY4I0PM4LX4B0OtMcXWGWPx32AwQIHW9ADONWkwCJwxXAAAAAElF TkSuQmCC "
id="image10"
x="20"
y="20" />
</svg>

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 886 B

View File

@@ -1,64 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg width="260" height="260" xmlns="http://www.w3.org/2000/svg">
<g>
<title>Layer 1</title>
<rect fill="#212121" stroke="#424242" x="20" y="20" width="100" height="220" id="svg_1" rx="12" stroke-width="0" />
<rect fill="#212121" stroke="#424242" x="140" y="20" width="100" height="100" id="svg_2" rx="12" stroke-width="0" />
<rect fill="#212121" stroke="#424242" x="140" y="140" width="100" height="100" id="svg_3" rx="12" stroke-width="0" />
</g>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="svg2"
width="240"
height="240"
viewBox="0 0 240 240"
sodipodi:docname="tile.svg"
inkscape:version="0.92.4 5da689c313, 2019-01-14">
<metadata
id="metadata8">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs6" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1321"
inkscape:window-height="740"
id="namedview4"
showgrid="false"
inkscape:pagecheckerboard="true"
inkscape:zoom="3.4570311"
inkscape:cx="113.41698"
inkscape:cy="20.959299"
inkscape:window-x="45"
inkscape:window-y="28"
inkscape:window-maximized="0"
inkscape:current-layer="svg2" />
<image
width="200"
height="200"
preserveAspectRatio="none"
style="image-rendering:optimizeQuality"
xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAC63pUWHRSYXcgcHJvZmlsZSB0eXBl IGV4aWYAAHja7ZdtktwoDIb/c4ocAUkIieNgPqpygz1+XrDd0z2Z3SS1+2er2pQBC1nI7wP0TBh/ fZ/hGy4qmUNS81xyjrhSSYUrOh7Pq+yaYtr1vtI1hOcXe3gMMEyCVs5Hq5d/hV0/XrjnoOPVHvwa Yb8CXQN3QFkzMzr9OUnY+bTTlUko4+zk4vac6sFn2+6U/eOed1p2Nus5PBuSQaWumEiYh5DEXfuZ gZx3xS27ZvhFMfSTSEDD25VOQV4+725jfBboReS7Fz6r/+h9Ep/rZZdPWuZLI3S+HCD9Wvwt8dPE 8siIXwdM7lBfiDy7zznOr6spQ9F8ragtNt1h4HhActmvZRTDrejbLgXFY40NyHts8UBpVIhBZQZK 1KnSpLHbRg0pJh5saJkby7a5GBduoERghEKTTYp0ccBqPAJQJuFHLrTnLXu+Ro6ZO8GVCcEIr/xt Cf80+CclzNmWRBT9oRXy4rWukcYit2p4AQjNi5tuge9y4Y9P62ct1QS3JbPjA2s8zhCH0sfaks1Z 4Kdozy1EwfoVABJhbkUyJCAQM4lSpmjMRgQdHYAqMmdJfIAAqXJHkowNgvPI2HnNjXeMti8rZ15m nE0AoZKxnxyEKmClpFg/lhxrqKpoUtWsph60aM2SU9acs+V1yFUTS6aWzcytWHXx5OrZzd2L18JF cAZqycWKl1Jq5VAxUUWsCv8Ky8GHHOnQIx92+FGO2rB8WmracrPmrbTauUvHMdFzt+699DooDJwU Iw0dedjwUUadWGtTZpo687Tps8z6oHZR/an8ATW6qPEmtfzsQQ3WYHaHoHWc6GIGYpwIxG0RwILm xSw6pcSL3GIWC2NTKCNJXWxCp0UMCNMg1kkPdh/kfotbUP8tbvwrcmGh+y/IBaD7mdsX1Pr6nWub 2LkLl6ZRsPvgU9kD7hhR/dv2Hegd6B3oHegd6B3oHej/H0gm/njAP7HhB3u4nbY7yMH4AAABhWlD Q1BJQ0MgcHJvZmlsZQAAeJx9kT1Iw1AUhU9TtSIVBwuKOGSoLloQFXHUKhShQqgVWnUweemP0KQh SXFxFFwLDv4sVh1cnHV1cBUEwR8QJ0cnRRcp8b6k0CLGC4/3cd49h/fuA4RaiWlW2xig6baZSsTF THZFDL0iiAD6MIIOmVnGrCQl4Vtf99RLdRfjWf59f1a3mrMYEBCJZ5hh2sTrxFObtsF5nzjCirJK fE48atIFiR+5rnj8xrngssAzI2Y6NUccIRYLLay0MCuaGvEkcVTVdMoXMh6rnLc4a6UKa9yTvzCc 05eXuE5rEAksYBESRCioYAMl2IjRrpNiIUXncR//gOuXyKWQawOMHPMoQ4Ps+sH/4PdsrfzEuJcU jgPtL47zMQSEdoF61XG+jx2nfgIEn4Ervekv14DpT9KrTS16BPRsAxfXTU3ZAy53gP4nQzZlVwrS EvJ54P2MvikL9N4CXave3BrnOH0A0jSr5A1wcAgMFyh7zefdna1z+7enMb8fKAtyidNZ3ucAAAAG YktHRAAAAAAAAPlDu38AAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfkAwEXKxzFBfpSAAAA pUlEQVR42u3bQQpAIQgFwIzuf+X+Cdp8KgzHZaDQQC4eFHPOVrl6K14AqgOMxfnfxRCvzesbh696 U8+zAwAAAAAAAAAAAAAAAADgUMXm3q3zxiXoyDrPEwBQvG7tgKcywSyXX/XKBO0AAAAAAAAAAAAA AAAAvAAgE2wyQTsAQNaSCSa+/KpXJmgHAAAAAAAAAAAAAAAA4ARA6gxv97zwd9gTAFC6PgsFG4ct jyRYAAAAAElFTkSuQmCC "
id="image10"
x="20"
y="20" />
</svg>

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 477 B

View File

@@ -1 +1 @@
Lutris;Steam;Io.elementary.appcenter;Repoman;Com.github.donadigo.eddy;Sysmontask;join?action=join&confno=9992624875&confid=dXRpZD1VVElEXzM0ODYxOTgyYzg0YzQ1Y2NiYmM0YWNiMzczODNiYjgxJnVzcz1TaU1YUnNEWG5BQWNBYnRpYklBNWE0MjRDNkpBMzMyVXRUc2pCX1YxVm5JY0hWeVRybGN5WjZZS2VBa1pvNkszOXdNWEVkVE9hTU54Z3BROFZFckhPR3Y4eGo0MlB0emNCZjNRLnNlM28yNy13YWpGYy1ReXEmdGlkPTcyNjEzNGRjYWJkZTQyYTNhNzJmZjVjYjVkNTU2YTYw&browser=join?action=join&confno=9992624875&confid=dXRpZD1VVElEXzM0ODYxOTgyYzg0YzQ1Y2NiYmM0YWNiMzczODNiYjgxJnVzcz1TaU1YUnNEWG5BQWNBYnRpYklBNWE0MjRDNkpBMzMyVXRUc2pCX1YxVm5JY0hWeVRybGN5WjZZS2VBa1pvNkszOXdNWEVkVE9hTU54Z3BROFZFckhPR3Y4eGo0MlB0emNCZjNRLnNlM28yNy13YWpGYy1ReXEmdGlkPTcyNjEzNGRjYWJkZTQyYTNhNzJmZjVjYjVkNTU2YTYw&browser=Gnome-calculator;Virt-manager;Gwe;
Lutris;Steam;Io.elementary.appcenter;Repoman;Com.github.donadigo.eddy;Sysmontask;join?action=join&confno=9992624875&confid=dXRpZD1VVElEXzM0ODYxOTgyYzg0YzQ1Y2NiYmM0YWNiMzczODNiYjgxJnVzcz1TaU1YUnNEWG5BQWNBYnRpYklBNWE0MjRDNkpBMzMyVXRUc2pCX1YxVm5JY0hWeVRybGN5WjZZS2VBa1pvNkszOXdNWEVkVE9hTU54Z3BROFZFckhPR3Y4eGo0MlB0emNCZjNRLnNlM28yNy13YWpGYy1ReXEmdGlkPTcyNjEzNGRjYWJkZTQyYTNhNzJmZjVjYjVkNTU2YTYw&browser=join?action=join&confno=9992624875&confid=dXRpZD1VVElEXzM0ODYxOTgyYzg0YzQ1Y2NiYmM0YWNiMzczODNiYjgxJnVzcz1TaU1YUnNEWG5BQWNBYnRpYklBNWE0MjRDNkpBMzMyVXRUc2pCX1YxVm5JY0hWeVRybGN5WjZZS2VBa1pvNkszOXdNWEVkVE9hTU54Z3BROFZFckhPR3Y4eGo0MlB0emNCZjNRLnNlM28yNy13YWpGYy1ReXEmdGlkPTcyNjEzNGRjYWJkZTQyYTNhNzJmZjVjYjVkNTU2YTYw&browser=Gnome-calculator;Virt-manager;Gwe;whatsdesk;Totem;

View File

@@ -4,14 +4,6 @@
-- Awesome Libs
local naughty = require("naughty")
if awesome.startup_errors then
naughty.notify({
preset = naughty.config.presets.critical,
title = "! Not so Awesome ERROR !",
text = awesome.startup_errors
})
end
do
local in_error = false
awesome.connect_signal(

View File

@@ -0,0 +1,396 @@
-------------------------------
-- The Notification defaults --
-------------------------------
-- Awesome Libs
local awful = require("awful")
local color = require("src.theme.colors")
local dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears")
local menubar = require('menubar')
local naughty = require("naughty")
local wibox = require("wibox")
local icondir = awful.util.getdir("config") .. "src/assets/icons/notifications/"
-- TODO: Figure out how to use hover effects without messing up the actions
naughty.config.defaults.ontop = true
naughty.config.defaults.icon_size = dpi(80)
naughty.config.defaults.timeout = 3
naughty.config.defaults.title = "System Notification"
naughty.config.defaults.margin = dpi(10)
naughty.config.defaults.position = "bottom_right"
naughty.config.defaults.shape = function(cr, width, height)
gears.shape.rounded_rect(cr, width, height, dpi(10))
end
naughty.config.defaults.border_width = dpi(4)
naughty.config.defaults.border_color = color["Grey800"]
naughty.config.defaults.spacing = dpi(10)
naughty.connect_signal(
'request::icon',
function(n, context, hints)
if context ~= 'app_icon' then return end
local path = menubar.utils.lookup_icon(hints.app_icon) or
menubar.utils.lookup_icon(hints.app_icon:lower())
if path then
n.icon = path
end
end
)
naughty.connect_signal(
"request::display",
function(n)
if n.urgency == "critical" then
n.title = string.format("<span foreground='%s' font='JetBrainsMono Nerd Font, ExtraBold 16'>%s</span>", color["RedA200"], n.title) or ""
n.message = string.format("<span foreground='%s'>%s</span>", color["Red200"], n.message) or ""
n.app_name = string.format("<span foreground='%s'>%s</span>", color["RedA400"], n.app_name) or ""
n.bg = color["Grey900"]
else
n.title = string.format("<span foreground='%s' font='JetBrainsMono Nerd Font, ExtraBold 16'>%s</span>", color["Pink200"], n.title) or ""
n.message = string.format("<span foreground='%s'>%s</span>", "#ffffffaa", n.message) or ""
n.bg = color["Grey900"]
n.timeout = n.timeout or 3
end
local use_image = false
if n.app_name == "Spotify" then
n.actions = {
naughty.action {
program = "Spotify",
id = "skip-prev",
icon = gears.color.recolor_image(icondir .. "skip-prev.svg", color["Cyan200"]),
},
naughty.action {
program = "Spotify",
id = "play-pause",
icon = gears.color.recolor_image(icondir .. "play-pause.svg", color["Cyan200"]),
},
naughty.action {
program = "Spotify",
id = "skip-next",
icon = gears.color.recolor_image(icondir .. "skip-next.svg", color["Cyan200"]),
},
}
use_image = true
end
local action_template_widget = {}
if use_image then
action_template_widget = {
{
{
{
{
id = "icon_role",
widget = wibox.widget.imagebox
},
id = "centered",
valign = "center",
halign = "center",
widget = wibox.container.place
},
margins = dpi(5),
widget = wibox.container.margin
},
forced_height = dpi(35),
forced_width = dpi(35),
fg = color["Cyan200"],
bg = color["Grey800"],
shape = function(cr, width, height)
gears.shape.rounded_rect(cr, width, height, dpi(6))
end,
widget = wibox.container.background,
id = "bgrnd"
},
id = "mrgn",
top = dpi(10),
bottom = dpi(10),
widget = wibox.container.margin,
}
else
action_template_widget = {
{
{
{
{
id = "text_role",
font = "JetBrainsMono Nerd Font, Regular 12",
widget = wibox.widget.textbox
},
id = "centered",
widget = wibox.container.place
},
margins = dpi(5),
widget = wibox.container.margin
},
fg = color["Green200"],
bg = color["Grey800"],
shape = function(cr, width, height)
gears.shape.rounded_rect(cr, width, height, dpi(6))
end,
widget = wibox.container.background,
id = "bgrnd"
},
id = "mrgn",
top = dpi(10),
bottom = dpi(10),
widget = wibox.container.margin,
}
end
local actions_template = wibox.widget {
notification = n,
base_layout = wibox.widget {
spacing = dpi(40),
layout = wibox.layout.fixed.horizontal
},
widget_template = action_template_widget,
style = {
underline_normal = false,
underline_selected = true,
bg_normal = color["Grey100"],
bg_selected = color["Grey200"]
},
widget = naughty.list.actions
}
local w_template = wibox.widget {
{
{
{
{
{
{
{
{
markup = n.app_name or 'System Notification',
align = "center",
valign = "center",
widget = wibox.widget.textbox
},
fg = color["Teal200"],
widget = wibox.container.background
},
margins = dpi(10),
widget = wibox.container.margin
},
nil,
{
{
{
{
{
font = user_vars.font.specify .. ", 10",
text = "",
align = "center",
valign = "center",
widget = wibox.widget.textbox
},
start_angle = 4.71239,
thickness = dpi(2),
min_value = 0,
max_value = 360,
value = 360,
widget = wibox.container.arcchart,
id = "arc_chart"
},
id = "background",
fg = color["Teal200"],
bg = color["Grey900"],
widget = wibox.container.background
},
strategy = "exact",
width = dpi(20),
height = dpi(20),
widget = wibox.container.constraint,
id = "const"
},
margins = dpi(10),
widget = wibox.container.margin,
id = "arc_margin"
},
id = "arc_app_layout",
layout = wibox.layout.align.horizontal
},
id = "arc_app_bg",
border_color = color["Grey800"],
border_width = dpi(2),
widget = wibox.container.background
},
{
{
{
{
{
image = n.icon,
resize = true,
widget = wibox.widget.imagebox,
clip_shape = function(cr, width, height)
gears.shape.rounded_rect(cr, width, height, 10)
end,
},
width = naughty.config.defaults.icon_size,
height = naughty.config.defaults.icon_size,
strategy = "exact",
widget = wibox.container.constraint
},
halign = "center",
valign = "top",
widget = wibox.container.place,
},
left = dpi(20),
bottom = dpi(15),
top = dpi(15),
right = dpi(10),
widget = wibox.container.margin
},
{
{
{
widget = naughty.widget.title,
align = "left"
},
{
widget = naughty.widget.message,
align = "left"
},
{
actions_template,
widget = wibox.container.place
},
layout = wibox.layout.fixed.vertical
},
left = dpi(10),
bottom = dpi(10),
top = dpi(10),
right = dpi(20),
widget = wibox.container.margin
},
layout = wibox.layout.fixed.horizontal
},
id = "widget_layout",
layout = wibox.layout.fixed.vertical
},
id = "min_size",
strategy = "min",
width = dpi(100),
widget = wibox.container.constraint
},
id = "max_size",
strategy = "max",
width = Theme.notification_max_width or dpi(500),
widget = wibox.container.constraint,
},
id = "background",
bg = color["Grey900"],
border_color = color["Grey800"],
border_width = dpi(4),
shape = function(cr, width, height)
gears.shape.rounded_rect(cr, width, height, 4)
end,
widget = wibox.container.background
}
local close = w_template.max_size.min_size.widget_layout.arc_app_bg.arc_app_layout.arc_margin.const.background
local arc = close.arc_chart
local timeout = n.timeout
local remove_time = timeout
if timeout ~= 0 then
arc.value = 360
gears.timer {
timeout = 0.1,
call_now = true,
autostart = true,
callback = function()
arc.value = (remove_time - 0) / (timeout - 0) * 360
remove_time = remove_time - 0.1
end
}
end
Hover_signal(close, color["Grey900"], color["Teal200"])
close:connect_signal(
"button::press",
function()
n:destroy()
end
)
w_template:connect_signal(
"button::press",
function(c, d, e, key)
if key == 3 then
n:destroy()
end
end
)
local box = naughty.layout.box {
notification = n,
timeout = 3,
type = "notification",
screen = awful.screen.focused(),
shape = function(cr, width, height)
gears.shape.rounded_rect(cr, width, height, 10)
end,
widget_template = w_template
}
box.buttons = {}
n.buttons = {}
end
)
naughty.connect_signal(
"destroyed",
function()
end
)
-- Test notification
--[[ naughty.notification {
app_name = "System Notification",
title = "A notification 2",
message = "This is very informative and overflowing",
icon = "/home/crylia/.config/awesome/src/assets/userpfp/crylia.png",
urgency = "normal",
timeout = 0,
actions = {
naughty.action {
name = "Accept",
},
naughty.action {
name = "Refuse",
},
naughty.action {
name = "Ignore",
},
}
} ]]
naughty.connect_signal(
"invoked",
function(_, action)
if action.program == "Spotify" then
if action.id == "skip-prev" then
awful.spawn("playerctl previous")
end
if action.id == "play-pause" then
awful.spawn("playerctl play-pause")
end
if action.id == "skip-next" then
awful.spawn("playerctl next")
end
end
end
)

View File

@@ -61,5 +61,5 @@ awful.spawn.easy_async_with_shell(
},
}
end
end
end
)

View File

@@ -7,14 +7,14 @@ screen.connect_signal(
"added",
function()
awesome.restart()
end
end
)
screen.connect_signal(
"removed",
function()
awesome.restart()
end
end
)
client.connect_signal(
@@ -30,7 +30,7 @@ client.connect_signal(
gears.shape.rounded_rect(cr, width, height, 10)
end
end
end
end
)
client.connect_signal(
@@ -45,7 +45,7 @@ client.connect_signal(
}
)
end
end
end
)
client.connect_signal(
@@ -60,7 +60,7 @@ client.connect_signal(
}
)
end
end
end
)

View File

@@ -20,7 +20,7 @@ awful.spawn.easy_async_with_shell(
BACKLIGHT_MAX_BRIGHTNESS = tonumber(stdout)
BACKLIGHT_SEPS = BACKLIGHT_MAX_BRIGHTNESS / 100
BACKLIGHT_SEPS = math.floor(BACKLIGHT_SEPS)
end
end
)
return function(s)
@@ -116,8 +116,6 @@ return function(s)
"pkexec xfpm-power-backlight-helper --get-brightness",
function(stdout)
local brightness_value = math.floor((tonumber(stdout) - 1) / (BACKLIGHT_MAX_BRIGHTNESS - 1) * 100)
-- Performance is horrible, or it overrides and executes at the same time as the keymappings
--awful.spawn("xbacklight -set " .. brightness_value, false)
brightness_osd_widget.container.osd_layout.icon_slider_layout.label_value_layout.value:set_text(tostring(brightness_value) .. "%")
awesome.emit_signal(

View File

@@ -1,183 +0,0 @@
---------------------------------------
-- This is the calendar_osd module --
---------------------------------------
-- Awesome Libs
local awful = require("awful")
local wibox = require("wibox")
local gears = require("gears")
local dpi = require("beautiful").xresources.apply_dpi
local color = require("src.theme.colors")
return function(s)
local styles = {}
styles.month = {
padding = 15,
bg_color = color["Grey900"],
border_width = 1,
shape = function(cr, width, height)
gears.shape.rounded_rect(cr, width, height, 5)
end
}
styles.normal = {
fg_color = color["Grey900"],
font = user_vars.font.extrabold,
shape = function(cr, width, height)
gears.shape.rounded_rect(cr, width, height, 5)
end
}
styles.focus = {
fg_color = color["Grey900"],
bg_color = color["Purple200"],
shape = function(cr, width, height)
gears.shape.rounded_rect(cr, width, height, 5)
end
}
styles.header = {
fg_color = color["Grey900"],
bg_color = color["Teal200"],
markup = function(t) return '<b>' .. t .. '</b>' end,
shape = function(cr, width, height)
gears.shape.rounded_rect(cr, width, height, 5)
end
}
styles.weekday = {
padding = 8,
fg_color = color["Grey900"],
bg_color = color["Teal200"],
markup = function(t) return '<b>' .. t .. '</b>' end,
shape = function(cr, width, height)
gears.shape.rounded_rect(cr, width, height, 5)
end
}
local function decorate_cell(widget, flag, date)
if flag == 'monthheader' and not styles.monthheader then
flag = 'header'
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 color["Red200"] or color["White"]
local ret = wibox.widget {
{
widget,
left = dpi(8),
right = dpi(8),
top = dpi(4),
bottom = dpi(4),
widget = wibox.container.margin
},
shape = function(cr, width, height)
gears.shape.rounded_rect(cr, width, height, 5)
end,
fg = props.fg_color or '#999999',
bg = props.bg_color or default_bg,
widget = wibox.container.background
}
return ret
end
local calendar = wibox.widget {
date = os.date('*t'),
fn_embed = decorate_cell,
widget = wibox.widget.calendar.month,
font = user_vars.font.extrabold,
spacing = dpi(10)
}
local calendar_osd_widget = wibox.widget {
{
widget = wibox.widget.textbox,
fg = "#ffffff",
align = "center",
valign = "center",
font = "DS-Digital, Bold Italic 50",
id = "digital_clock"
},
{
widget = calendar
},
visible = true,
layout = wibox.layout.fixed.vertical
}
local set_clock = function()
calendar_osd_widget.digital_clock:set_text(os.date("%H:%M"))
end
local calendar_clock_update = gears.timer {
timeout = 5,
autostart = true,
call_now = true,
callback = function()
set_clock()
end
}
local calendar_osd_container = awful.popup {
screen = s,
widget = wibox.container.background,
ontop = true,
bg = color["Grey900"],
stretch = false,
visible = false,
placement = function(c) awful.placement.top_right(c, { margins = { right = dpi(100), top = dpi(60) } }) end,
shape = function(cr, width, height)
gears.shape.rounded_rect(cr, width, height, 5)
end
}
local hide_osd = gears.timer {
timeout = 0.25,
autostart = true,
callback = function()
calendar_osd_container.visible = false
end
}
calendar_osd_container:setup {
calendar_osd_widget,
layout = wibox.layout.align.horizontal
}
calendar_osd_container:connect_signal(
"mouse::enter",
function()
calendar_osd_container.visible = true
hide_osd:stop()
end
)
calendar_osd_container:connect_signal(
"mouse::leave",
function()
calendar_osd_container.visible = false
hide_osd:stop()
end
)
awesome.connect_signal(
"widget::calendar_osd:stop",
function()
calendar_osd_container.visible = true
hide_osd:stop()
end
)
awesome.connect_signal(
"widget::calendar_osd:rerun",
function()
if hide_osd.started then
hide_osd:again()
else
hide_osd:start()
end
end
)
end

View File

@@ -208,7 +208,7 @@ client.connect_signal(
Theme.titlebar_maximized_button_active = icondir .. "maximize.svg"
Theme.titlebar_maximized_button_inactive = icondir .. "maximize.svg"
end
end
end
)
client.connect_signal(
@@ -218,19 +218,20 @@ client.connect_signal(
Theme.titlebar_maximized_button_normal = icondir .. "unmaximize.svg"
Theme.titlebar_maximized_button_active = icondir .. "unmaximize.svg"
Theme.titlebar_maximized_button_inactive = icondir .. "unmaximize.svg"
draw_titlebar(c)
elseif not c.minimized then
Theme.titlebar_maximized_button_normal = icondir .. "maximize.svg"
Theme.titlebar_maximized_button_active = icondir .. "maximize.svg"
Theme.titlebar_maximized_button_inactive = icondir .. "maximize.svg"
end
draw_titlebar(c)
end
if not c.floating or c.maximized then
awful.titlebar.hide(c, 'left')
awful.titlebar.hide(c, 'right')
awful.titlebar.hide(c, 'top')
awful.titlebar.hide(c, 'bottom')
end
end
end
)
client.connect_signal(
@@ -247,5 +248,5 @@ client.connect_signal(
awful.titlebar.hide(c, 'top')
awful.titlebar.hide(c, 'bottom')
end
end
end
)

View File

@@ -0,0 +1,792 @@
-----------------------------------
-- This is the volume controller --
-----------------------------------
-- Awesome Libs
local awful = require("awful")
local color = require("src.theme.colors")
local dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears")
local wibox = require("wibox")
require("src.core.signals")
-- Icon directory path
local icondir = awful.util.getdir("config") .. "src/assets/icons/audio/"
-- Returns the volume controller
return function(s)
local function create_device(name, node, sink)
local device = wibox.widget {
{
{
{
{
image = "",
id = "icon",
resize = false,
widget = wibox.widget.imagebox
},
{
text = name,
id = "node",
widget = wibox.widget.textbox
},
id = "device_layout",
layout = wibox.layout.align.horizontal
},
id = "device_margin",
margins = dpi(5),
widget = wibox.container.margin
},
id = "background",
shape = function(cr, width, height)
gears.shape.rounded_rect(cr, width, height, 4)
end,
widget = wibox.container.background
},
margins = dpi(5),
widget = wibox.container.margin
}
if sink == true then
device:connect_signal(
"button::press",
function()
awful.spawn.spawn("./.config/awesome/src/scripts/vol.sh set_sink " .. node)
awesome.emit_signal("update::background:vol", node)
end
)
--#region Signal Functions
local old_wibox, old_cursor, old_bg, old_fg
local bg = ""
local fg = ""
local mouse_enter = function()
if bg then
old_bg = device.background.bg
device.background.bg = bg .. 'dd'
end
if fg then
old_fg = device.background.fg
device.background.fg = fg
end
local w = mouse.current_wibox
if w then
old_cursor, old_wibox = w.cursor, w
w.cursor = "hand1"
end
end
local button_press = function()
if bg then
if bg then
if string.len(bg) == 7 then
device.background.bg = bg .. 'bb'
else
device.background.bg = bg
end
end
end
if fg then
device.background.fg = fg
end
end
local button_release = function()
if bg then
if bg then
if string.len(bg) == 7 then
device.background.bg = bg .. 'dd'
else
device.background.bg = bg
end
end
end
if fg then
device.background.fg = fg
end
end
local mouse_leave = function()
if bg then
device.background.bg = old_bg
end
if fg then
device.background.fg = old_fg
end
if old_wibox then
old_wibox.cursor = old_cursor
old_wibox = nil
end
end
device:connect_signal(
"mouse::enter",
mouse_enter
)
device:connect_signal(
"button::press",
button_press
)
device:connect_signal(
"button::release",
button_release
)
device:connect_signal(
"mouse::leave",
mouse_leave
)
--#endregion
awesome.connect_signal(
"update::background:vol",
function(new_node)
if node == new_node then
old_bg = color["Purple200"]
old_fg = color["Grey900"]
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
)
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"])
else
fg = color["Purple200"]
bg = color["Grey700"]
device.background:set_fg(color["Purple200"])
device.background:set_bg(color["Grey700"])
end
end
)
else
device:connect_signal(
"button::press",
function()
awful.spawn.spawn("./.config/awesome/src/scripts/mic.sh set_source " .. node)
awesome.emit_signal("update::background:mic", node)
end
)
--#region Signal Functions
local old_wibox, old_cursor, old_bg, old_fg
local bg = ""
local fg = ""
local mouse_enter = function()
if bg then
old_bg = device.background.bg
device.background.bg = bg .. 'dd'
end
if fg then
old_fg = device.background.fg
device.background.fg = fg
end
local w = mouse.current_wibox
if w then
old_cursor, old_wibox = w.cursor, w
w.cursor = "hand1"
end
end
local button_press = function()
if bg then
if bg then
if string.len(bg) == 7 then
device.background.bg = bg .. 'bb'
else
device.background.bg = bg
end
end
end
if fg then
device.background.fg = fg
end
end
local button_release = function()
if bg then
if bg then
if string.len(bg) == 7 then
device.background.bg = bg .. 'dd'
else
device.background.bg = bg
end
end
end
if fg then
device.background.fg = fg
end
end
local mouse_leave = function()
if bg then
device.background.bg = old_bg
end
if fg then
device.background.fg = old_fg
end
if old_wibox then
old_wibox.cursor = old_cursor
old_wibox = nil
end
end
device:connect_signal(
"mouse::enter",
mouse_enter
)
device:connect_signal(
"button::press",
button_press
)
device:connect_signal(
"button::release",
button_release
)
device:connect_signal(
"mouse::leave",
mouse_leave
)
--#endregion
awesome.connect_signal(
"update::background:mic",
function(new_node)
if node == new_node then
old_bg = color["Blue200"]
old_fg = color["Grey900"]
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
)
awful.spawn.easy_async_with_shell(
[[ pactl get-default-source ]],
function(stdout)
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
return device
end
local dropdown_list_volume = wibox.widget {
{
{
layout = wibox.layout.fixed.vertical,
id = "volume_device_list"
},
id = "volume_device_background",
bg = color["Grey800"],
shape = function(cr, width, height)
gears.shape.partially_rounded_rect(cr, width, height, false, false, true, true, 4)
end,
widget = wibox.container.background
},
left = dpi(10),
right = dpi(10),
widget = wibox.container.margin
}
local dropdown_list_microphone = wibox.widget {
{
{
layout = wibox.layout.fixed.vertical,
id = "volume_device_list"
},
id = "volume_device_background",
bg = color["Grey800"],
shape = function(cr, width, height)
gears.shape.partially_rounded_rect(cr, width, height, false, false, true, true, 4)
end,
widget = wibox.container.background
},
left = dpi(10),
right = dpi(10),
widget = wibox.container.margin
}
local volume_controller = wibox.widget {
{
{
-- Audio Device selector
{
{
{
{
{
resize = false,
image = gears.color.recolor_image(icondir .. "menu-down.svg", color["Purple200"]),
widget = wibox.widget.imagebox,
id = "icon"
},
id = "center",
halign = "center",
valign = "center",
widget = wibox.container.place,
},
{
{
text = "Output Device",
widget = wibox.widget.textbox,
id = "device_name"
},
margins = dpi(5),
widget = wibox.container.margin
},
id = "audio_volume",
layout = wibox.layout.fixed.horizontal
},
id = "audio_bg",
bg = color["Grey800"],
fg = color["Purple200"],
shape = function(cr, width, height)
gears.shape.rounded_rect(cr, width, height, 4)
end,
widget = wibox.container.background
},
id = "audio_selector_margin",
left = dpi(10),
right = dpi(10),
top = dpi(10),
widget = wibox.container.margin
},
{
id = "volume_list",
widget = dropdown_list_volume,
visible = false
},
-- Microphone selector
{
{
{
{
{
resize = false,
image = gears.color.recolor_image(icondir .. "menu-down.svg", color["LightBlueA200"]),
widget = wibox.widget.imagebox,
id = "icon",
},
id = "center",
halign = "center",
valign = "center",
widget = wibox.container.place,
},
{
{
text = "Input Device",
widget = wibox.widget.textbox,
id = "device_name"
},
margins = dpi(5),
widget = wibox.container.margin
},
id = "mic_volume",
layout = wibox.layout.fixed.horizontal
},
id = "mic_bg",
bg = color["Grey800"],
fg = color["LightBlueA200"],
shape = function(cr, width, height)
gears.shape.rounded_rect(cr, width, height, 4)
end,
widget = wibox.container.background
},
id = "mic_selector_margin",
left = dpi(10),
right = dpi(10),
top = dpi(10),
widget = wibox.container.margin
},
{
id = "mic_list",
widget = dropdown_list_microphone,
visible = false
},
-- Audio volume slider
{
{
{
resize = false,
widget = wibox.widget.imagebox,
image = gears.color.recolor_image(icondir .. "volume-high.svg", color["Purple200"]),
id = "icon",
},
{
{
bar_shape = function(cr, width, height)
gears.shape.rounded_rect(cr, width, height, 5)
end,
bar_height = dpi(5),
bar_color = color["Grey800"],
bar_active_color = color["Purple200"],
handle_color = color["Purple200"],
handle_shape = gears.shape.circle,
handle_border_color = color["Purple200"],
handle_width = dpi(15),
maximum = 100,
forced_height = dpi(26),
widget = wibox.widget.slider,
id = "slider"
},
bottom = dpi(12),
left = dpi(5),
id = "slider_margin",
widget = wibox.container.margin
},
id = "audio_volume",
layout = wibox.layout.align.horizontal
},
id = "audio_volume_margin",
top = dpi(10),
left = dpi(10),
right = dpi(10),
widget = wibox.container.margin
},
-- Microphone volume slider
{
{
{
resize = false,
widget = wibox.widget.imagebox,
image = gears.color.recolor_image(icondir .. "microphone.svg", color["Blue200"]),
id = "icon"
},
{
{
bar_shape = function(cr, width, height)
gears.shape.rounded_rect(cr, width, height, 5)
end,
bar_height = dpi(5),
bar_color = color["Grey800"],
bar_active_color = color["Blue200"],
handle_color = color["Blue200"],
handle_shape = gears.shape.circle,
handle_border_color = color["Blue200"],
handle_width = dpi(15),
maximum = 100,
forced_height = dpi(26),
widget = wibox.widget.slider,
id = "slider"
},
left = dpi(5),
id = "slider_margin",
widget = wibox.container.margin
},
id = "mic_volume",
layout = wibox.layout.align.horizontal
},
id = "mic_volume_margin",
left = dpi(10),
right = dpi(10),
widget = wibox.container.margin
},
id = "controller_layout",
layout = wibox.layout.fixed.vertical
},
id = "controller_margin",
margins = dpi(10),
widget = wibox.container.margin
},
bg = color["Grey900"],
border_color = color["Grey800"],
border_width = dpi(4),
shape = function(cr, width, height)
gears.shape.rounded_rect(cr, width, height, 12)
end,
forced_width = dpi(400),
widget = wibox.container.background
}
-- Variables for easier access and better readability
local audio_selector_margin = volume_controller:get_children_by_id("audio_selector_margin")[1]
local volume_list = volume_controller:get_children_by_id("volume_list")[1]
local audio_bg = volume_controller:get_children_by_id("audio_bg")[1]
local audio_volume = volume_controller:get_children_by_id("audio_volume")[1].center
-- Click event for the audio dropdown
audio_selector_margin:connect_signal(
"button::press",
function()
volume_list.visible = not volume_list.visible
if volume_list.visible then
audio_bg.shape = function(cr, width, height)
gears.shape.partially_rounded_rect(cr, width, height, true, true, false, false, 4)
end
audio_volume.icon:set_image(gears.color.recolor_image(icondir .. "menu-up.svg", color["Teal200"]))
else
audio_bg.shape = function(cr, width, height)
gears.shape.rounded_rect(cr, width, height, 4)
end
audio_volume.icon:set_image(gears.color.recolor_image(icondir .. "menu-down.svg", color["Teal200"]))
end
end
)
-- Variables for easier access and better readability
local mic_selector_margin = volume_controller:get_children_by_id("mic_selector_margin")[1]
local mic_list = volume_controller:get_children_by_id("mic_list")[1]
local mic_bg = volume_controller:get_children_by_id("mic_bg")[1]
local mic_volume = volume_controller:get_children_by_id("mic_volume")[1].center
-- Click event for the microphone dropdown
mic_selector_margin:connect_signal(
"button::press",
function()
mic_list.visible = not mic_list.visible
if mic_list.visible then
mic_selector_margin.mic_bg.shape = function(cr, width, height)
gears.shape.partially_rounded_rect(cr, width, height, true, true, false, false, 4)
end
mic_volume.icon:set_image(gears.color.recolor_image(icondir .. "menu-up.svg", color["Teal200"]))
else
mic_bg.shape = function(cr, width, height)
gears.shape.rounded_rect(cr, width, height, 4)
end
mic_volume.icon:set_image(gears.color.recolor_image(icondir .. "menu-down.svg", color["Teal200"]))
end
end
)
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(
"property::value",
function()
local volume = audio_slider_margin.value
awful.spawn("pactl set-sink-volume @DEFAULT_SINK@ " .. tonumber(volume) .. "%")
end
)
local mic_slider_margin = volume_controller:get_children_by_id("mic_volume_margin")[1].mic_volume.slider_margin.slider
-- Microphone slider change event
mic_slider_margin:connect_signal(
"property::value",
function()
local volume = mic_slider_margin.value
awful.spawn("pactl set-source-volume @DEFAULT_SOURCE@ " .. tonumber(volume) .. "%")
awesome.emit_signal("get::mic_volume", volume)
end
)
-- Main container
local volume_controller_container = awful.popup {
widget = wibox.container.background,
ontop = true,
bg = color["Grey900"],
stretch = false,
visible = false,
screen = s,
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
}
-- Get all audio devices from all sinks
local function get_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}' ]],
function(stdout)
local i, j = 1, 1
local device_list = { layout = wibox.layout.fixed.vertical }
local node_names, alsa_names = {}, {}
for node_name in stdout:gmatch("[^\n]+") do
if (i % 2) == 0 then
table.insert(node_names, node_name)
end
i = i + 1
end
for alsa_name in stdout:gmatch("[^\n]+") do
if (j % 2) == 1 then
table.insert(alsa_names, alsa_name)
end
j = j + 1
end
for k = 1, #alsa_names, 1 do
device_list[#device_list + 1] = create_device(alsa_names[k], node_names[k], true)
end
dropdown_list_volume.volume_device_background.volume_device_list.children = device_list
end
)
end
get_devices()
-- Get all input devices from all sources
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}' ]],
function(stdout)
local i, j = 1, 1
local device_list = { layout = wibox.layout.fixed.vertical }
local node_names, alsa_names = {}, {}
for node_name in stdout:gmatch("[^\n]+") do
if (i % 2) == 0 then
table.insert(node_names, node_name)
end
i = i + 1
end
for alsa_name in stdout:gmatch("[^\n]+") do
if (j % 2) == 1 then
table.insert(alsa_names, alsa_name)
end
j = j + 1
end
for k = 1, #alsa_names, 1 do
device_list[#device_list + 1] = create_device(alsa_names[k], node_names[k], false)
end
dropdown_list_microphone.volume_device_background.volume_device_list.children = device_list
end
)
end
get_input_devices()
-- Get microphone volume
local function get_mic_volume()
awful.spawn.easy_async_with_shell(
"./.config/awesome/src/scripts/mic.sh volume",
function(stdout)
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"]))
else
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
)
end
get_mic_volume()
-- Check if microphone is muted
local function get_mic_mute()
awful.spawn.easy_async_with_shell(
"./.config/awesome/src/scripts/mic.sh mute",
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"]))
else
get_mic_volume()
end
end
)
end
get_mic_mute()
volume_controller_container:setup {
volume_controller,
layout = wibox.layout.fixed.horizontal
}
-- Global signal called from src.widgets.audio.lua
awesome.connect_signal(
"get::volume",
function(volume)
volume = tonumber(volume)
local icon = icondir .. "volume"
if volume < 1 then
icon = icon .. "-mute"
elseif volume >= 1 and volume < 34 then
icon = icon .. "-low"
elseif volume >= 34 and volume < 67 then
icon = icon .. "-medium"
elseif volume >= 67 then
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"]))
end
)
-- Global signal called from src.widgets.audio.lua
awesome.connect_signal(
"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"]))
end
end
)
awesome.connect_signal(
"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"]))
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"]))
end
end
)
-- Toggle container visibility
awesome.connect_signal(
"volume_controller::toggle",
function(scr)
if scr == s then
volume_controller_container.visible = not volume_controller_container.visible
end
end
)
end

27
awesome/src/scripts/mic.sh Executable file
View File

@@ -0,0 +1,27 @@
#!/bin/bash
SINK=$(LC_ALL=C pactl get-default-source)
case $1 in
"volume")
echo $(LC_ALL=C pactl get-source-volume $SINK | awk '{print $5}')
;;
"mute")
echo $(LC_ALL=C pactl get-source-mute $SINK)
;;
"toggle_mute")
$(LC_ALL=C pactl set-source-mute $SINK toggle)
;;
"set_volume")
$(LC_ALL=C pactl set-source-volume $SINK $2)
;;
"set_source")
$(LC_ALL=C pactl set-default-source $2)
;;
esac

View File

@@ -2,10 +2,17 @@
SINK=$(LC_ALL=C pactl get-default-sink)
if [[ $1 == "volume" ]]
then
case $1 in
"volume")
echo $(LC_ALL=C pactl get-sink-volume $SINK | awk '{print $5}')
elif [[ $1 == "mute" ]]
then
;;
"mute")
echo $(LC_ALL=C pactl get-sink-mute $SINK)
fi
;;
"set_sink")
$(LC_ALL=C pactl set-default-sink $2)
;;
esac

View File

@@ -182,6 +182,22 @@ return {
['LightBlueA400'] = '#00B0FF',
['LightBlueA700'] = '#0091EA',
['Cyan50'] = '#E0F7FA',
['Cyan100'] = '#B2EBF2',
['Cyan200'] = '#80DEEA',
['Cyan300'] = '#4DD0E1',
['Cyan400'] = '#26C6DA',
['Cyan500'] = '#00BCD4',
['Cyan600'] = '#00ACC1',
['Cyan700'] = '#0097A7',
['Cyan800'] = '#00838F',
['Cyan900'] = '#006064',
['CyanA100'] = '#84FFFF',
['CyanA200'] = '#18FFFF',
['CyanA400'] = '#00E5FF',
['CyanA700'] = '#00B8D4',
['BlueGrey50'] = '#ECEFF1',
['BlueGrey100'] = '#CFD8DC',
['BlueGrey200'] = '#B0BEC5',

View File

@@ -23,7 +23,6 @@ beautiful.wallpaper = user_vars.wallpaper
screen.connect_signal(
'request::wallpaper',
function(s)
-- If wallpaper is a function, call it with the screen
if beautiful.wallpaper then
if type(beautiful.wallpaper) == 'string' then
gears.wallpaper.maximized(beautiful.wallpaper, s)
@@ -31,7 +30,7 @@ screen.connect_signal(
beautiful.wallpaper(s)
end
end
end
end
)
beautiful.init(Theme)

View File

@@ -46,25 +46,16 @@ end
Theme.taglist_fg_focus = color["Grey900"]
Theme.taglist_bg_focus = color["White"]
Theme.tooltip_border_color = color["Grey900"]
Theme.tooltip_bg = color["Grey800"]
Theme.tooltip_fg = color["White"]
Theme.tooltip_border_width = dpi(0)
Theme.tooltip_border_color = color["Grey800"]
Theme.tooltip_bg = color["Grey900"]
Theme.tooltip_fg = color["YellowA200"]
Theme.tooltip_border_width = dpi(4)
Theme.tooltip_gaps = dpi(15)
Theme.tooltip_shape = function(cr, width, heigth)
gears.shape.rounded_rect(cr, width, heigth, 5)
end
Theme.notification_bg = color["Grey900"]
Theme.notification_fg = color["White"]
Theme.notification_border_width = dpi(0)
Theme.notification_border_color = color["Grey900"]
Theme.notification_shape = function(cr, width, heigth)
gears.shape.rounded_rect(cr, width, heigth, 10)
end
Theme.notification_margin = dpi(10)
Theme.notification_max_width = dpi(400)
Theme.notification_max_height = dpi(1000)
Theme.notification_icon_size = dpi(40)
Theme.notification_spacing = dpi(20)
Theme.titlebar_close_button_normal = icondir .. "close.svg"
Theme.titlebar_maximized_button_normal = icondir .. "maximize.svg"
@@ -87,9 +78,14 @@ Theme.hotkeys_description_font = user_vars.font.bold
local layout_path = Theme_path .. "../assets/layout/"
-- Here are the icons for the layouts defined, if you want to add more layouts go to main/layouts.lua
Theme.layout_floating = gears.color.recolor_image(layout_path .. "floating.svg", color["Grey900"])
Theme.layout_tile = gears.color.recolor_image(layout_path .. "tile.svg", color["Grey900"])
--Theme.layout_dwindle = gears.color.recolor_image(layout_path .. "dwindle.svg", color["Grey900"])
--Theme.layout_fairh = gears.color.recolor_image(layout_path .. "fairh.svg", color["Grey900"])
--Theme.layout_fullscreen = gears.color.recolor_image(layout_path .. "fullscreen.svg", color["Grey900"])
--Theme.layout_max = gears.color.recolor_image(layout_path .. "max.svg", color["Grey900"])
Theme.layout_floating = layout_path .. "floating.svg"
Theme.layout_tile = layout_path .. "tile.svg"
Theme.layout_dwindle = layout_path .. "dwindle.svg"
Theme.layout_fairh = layout_path .. "fairh.svg"
Theme.layout_fairv = layout_path .. "fairv.svg"
Theme.layout_fullscreen = layout_path .. "fullscreen.svg"
Theme.layout_max = layout_path .. "max.svg"
Theme.layout_cornerne = layout_path .. "cornerne.svg"
Theme.layout_cornernw = layout_path .. "cornernw.svg"
Theme.layout_cornerse = layout_path .. "cornerse.svg"
Theme.layout_cornersw = layout_path .. "cornersw.svg"

View File

@@ -11,8 +11,20 @@ user_vars = {
-- Autotiling layouts
layouts = {
awful.layout.suit.tile,
awful.layout.suit.tile.left,
awful.layout.suit.tile.bottom,
awful.layout.suit.tile.top,
awful.layout.suit.floating,
awful.layout.suit.fair,
awful.layout.suit.fair.horizontal,
awful.layout.suit.corner.nw,
awful.layout.suit.corner.ne,
awful.layout.suit.corner.sw,
awful.layout.suit.corner.se,
awful.layout.suit.magnifier,
awful.layout.suit.max,
awful.layout.suit.max.fullscreen,
awful.layout.suit.spiral.dwindle,
},
-- Icon theme from /usr/share/icons
@@ -25,7 +37,8 @@ user_vars = {
"light-locker --lock-on-suspend --lock-on-lid &",
"flatpak run com.spotify.Client",
"discord",
"/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1"
"/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1",
"setxkbmap -option caps:swapescape"
},
-- Type 'ip a' and check your wlan and ethernet name
@@ -38,7 +51,8 @@ user_vars = {
font = {
regular = "JetBrainsMono Nerd Font, 14",
bold = "JetBrainsMono Nerd Font, bold 14",
extrabold = "JetBrainsMono Nerd Font, ExtraBold 14"
extrabold = "JetBrainsMono Nerd Font, ExtraBold 14",
specify = "JetBrainsMono Nerd Font"
},
-- This is your default Terminal
@@ -57,7 +71,7 @@ user_vars = {
kblayout = { "de", "ru" },
-- Your filemanager that opens with super+e
file_manager = "nemo",
file_manager = "thunar",
-- Screenshot program to make a screenshot when print is hit
screenshot_program = "flameshot gui",
@@ -71,7 +85,7 @@ user_vars = {
-- For steam games please use this format (look in .local/share/applications for the .desktop file, that will contain the number you need)
-- {"394360", "Name", true} true will tell the func that it's a steam game
-- Use xprop | grep WM_CLASS and use the *SECOND* string
-- { WM_CLASS, program, name, isSteam }
-- { WM_CLASS, program, name, user_icon, isSteam }
dock_programs = {
{ "Alacritty", "alacritty", "Alacritty" },
{ "firefox", "firefox", "Firefox" },
@@ -79,13 +93,13 @@ user_vars = {
{ "Spotify", "flatpak run com.spotify.Client", "Spotify" },
{ "Code", "code", "Visual Studio Code" },
{ "processing-app-Base", "arduino", "Arduino IDE" },
{ "zoom", "zoom", "Zoom" },
{ "Zoom", "flatpak run us.zoom.Zoom", "Zoom" },
{ "Thunderbird", "thunderbird", "Thunderbird" },
{ "Mattermost", "mattermost-desktop", "Mattermost" },
{ "Blender", "blender", "Blender" },
{ "Steam", "steam", "Steam" },
{ "FreeCAD", "freecad", "FreeCAD" },
{ "Nemo", "nemo", "Dateien" },
{ "Paradox Launcher", "394360", "Hearts of Iron 4", true }
{ "Thunar", "thunar", "Dateien" },
{ "Windows", "virsh start Windows_11", "Windows 11", "/home/crylia/Bilder/windows.png", false, 50 }
}
}

View File

@@ -1,7 +1,7 @@
local awful = require("awful")
return function(table)
for i, t in ipairs(table) do
awful.spawn.with_shell(t);
for _, t in ipairs(table) do
awful.spawn(t);
end
end

View File

@@ -14,7 +14,7 @@ require("src.core.signals")
local icondir = awful.util.getdir("config") .. "src/assets/icons/audio/"
-- Returns the audio widget
return function()
return function(s)
local audio_widget = wibox.widget {
{
@@ -78,6 +78,7 @@ return function()
end
audio_widget.container.audio_layout.label:set_text(volume .. "%")
audio_widget.container.audio_layout.icon_margin.icon_layout.icon:set_image(gears.color.recolor_image(icon .. ".svg", color["Grey900"]))
awesome.emit_signal("get::volume", volume)
end
)
end
@@ -90,8 +91,10 @@ return function()
audio_widget.container.audio_layout.label.visible = false
audio_widget.container:set_right(0)
audio_widget.container.audio_layout.icon_margin.icon_layout.icon:set_image(gears.color.recolor_image(icondir .. "volume-mute" .. ".svg", color["Grey900"]))
awesome.emit_signal("get::volume_mute", true)
else
audio_widget.container:set_right(10)
awesome.emit_signal("get::volume_mute", false)
get_volume()
end
end
@@ -104,20 +107,18 @@ return function()
audio_widget:connect_signal(
"button::press",
function()
awesome.emit_signal("widget::volume")
--awesome.emit_signal("module::volume_osd:show", true)
awesome.emit_signal("module::slider:update")
awesome.emit_signal("widget::volume_osd:rerun")
awesome.emit_signal("volume_controller::toggle")
awesome.emit_signal("volume_controller::toggle", s)
end
)
awesome.connect_signal(
"widget::volume",
function(c)
check_muted()
end
)
gears.timer {
timeout = 0.5,
call_now = true,
autostart = true,
callback = check_muted
}
check_muted()
return audio_widget

View File

@@ -96,13 +96,13 @@ return function()
local notify_critical_battery = true
local battery_warning = function()
naughty.notify({
naughty.notification {
icon = gears.color.recolor_image(icondir .. "battery-alert.svg", color["White"]),
app_name = "System notification",
title = "Battery is low",
message = "Battery is almost battery_labelempty",
message = "Battery is almost empty",
urgency = "critical"
})
}
end
local update_battery = function(status)

View File

@@ -99,11 +99,11 @@ return function()
bluetoothctl power on
]],
function()
naughty.notify({
naughty.notification {
title = "System Notification",
app_name = "Bluetooth",
message = "Bluetooth activated"
})
}
end
)
else
@@ -113,11 +113,11 @@ return function()
rfkill block bluetooth
]],
function()
naughty.notify({
naughty.notification {
title = "System Notification",
app_name = "Bluetooth",
message = "Bluetooth deactivated"
})
}
end
)
end

View File

@@ -63,7 +63,7 @@ return function()
-- Updates the clock every 5 seconds, worst case you are 5 seconds behind
-- ¯\_(ツ)_/¯
local clock_update = gears.timer {
gears.timer {
timeout = 5,
autostart = true,
call_now = true,

View File

@@ -7,7 +7,6 @@ local awful = require("awful")
local color = require("src.theme.colors")
local dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears")
local naughty = require("naughty")
local watch = awful.widget.watch
local wibox = require("wibox")
require("src.core.signals")

View File

@@ -62,7 +62,7 @@ return function()
end
-- Updates the date every minute, dont blame me if you miss silvester
local date_updater = gears.timer {
gears.timer {
timeout = 60,
autostart = true,
call_now = true,

View File

@@ -7,7 +7,6 @@ local awful = require("awful")
local color = require("src.theme.colors")
local dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears")
local naughty = require("naughty")
local watch = awful.widget.watch
local wibox = require("wibox")
require("src.core.signals")

View File

@@ -55,33 +55,29 @@ return function(s)
widget = wibox.container.background
}
local layout = "";
local get_kblayout = function()
local function get_kblayout()
awful.spawn.easy_async_with_shell(
[[ setxkbmap -query | grep layout | awk '{print $2}' ]],
function(stdout)
layout = stdout:gsub("\n", "")
local layout = stdout:gsub("\n", "")
kblayout_widget.container.kblayout_layout.label.text = layout
return layout
awesome.emit_signal("update::background:kblayout")
end
)
return layout
end
local function create_kb_layout_item(keymap)
-- TODO: Add more, too lazy rn
local longname, shortname
local xkeyboard_country_code = {
{ "ad", "", "AND" }, -- Andorra
{ "af", "", "AFG" }, -- Afghanistan
{ "al", "", "ALB" }, -- Albania
{ "am", "", "ARM" }, -- Armenia
{ "ara", "", "ARB" }, -- Arabic
{ "at", "", "AUT" }, -- Austria
{ "az", "", "AZE" }, -- Azerbaijan
{ "ba", "", "BIH" }, -- Bosnia and Herzegovina
{ "af", "أفغانيش(Afghanistan)", "AFG" }, -- Afghanistan
{ "al", "shqip(Albania)", "ALB" }, -- Albania
{ "am", "հայերեն(Armenia)", "ARM" }, -- Armenia
{ "ara", "عربي(Arab)", "ARB" }, -- Arabic
{ "at", "Österreichisch (Austria)", "AUT" }, -- Austria
{ "az", "Azərbaycan(Azerbaijan)", "AZE" }, -- Azerbaijan
{ "ba", "bosanski(Bosnia and Herzegovina)", "BIH" }, -- Bosnia and Herzegovina
{ "bd", "", "BGD" }, -- Bangladesh
{ "be", "", "BEL" }, -- Belgium
{ "bg", "", "BGR" }, -- Bulgaria
@@ -149,7 +145,7 @@ return function(s)
{ "pt", "", "PRT" }, -- Portugal
{ "ro", "", "ROU" }, -- Romania
{ "rs", "", "SRB" }, -- Serbia
{ "ru", "Русски (Russia)", "RUS" }, -- Russia
{ "ru", "Русский (Russia)", "RUS" }, -- Russia
{ "se", "", "SWE" }, -- Sweden
{ "si", "", "SVN" }, -- Slovenia
{ "sk", "", "SVK" }, -- Slovakia
@@ -168,7 +164,7 @@ return function(s)
{ "za", "", "ZAF" } -- South Africa
}
for i, c in ipairs(xkeyboard_country_code) do
for _, c in ipairs(xkeyboard_country_code) do
if c[1] == keymap then
longname = c[2]
shortname = c[3]
@@ -176,7 +172,6 @@ return function(s)
end
local kb_layout_item = wibox.widget {
{
{
{
-- Short name e.g. GER, ENG, RUS
@@ -185,20 +180,22 @@ return function(s)
text = shortname,
widget = wibox.widget.textbox,
font = user_vars.font.extrabold,
id = "kbmapname"
id = "shortname"
},
widget = wibox.container.margin,
id = "margin2"
fg = color["Red200"],
widget = wibox.container.background,
id = "background2"
},
nil,
{
{
text = longname,
widget = wibox.widget.textbox,
font = user_vars.font.bold,
id = "longname",
},
widget = wibox.container.margin
fg = color["Purple200"],
widget = wibox.container.background,
id = "background1"
},
spacing = dpi(15),
layout = wibox.layout.fixed.horizontal,
@@ -209,24 +206,47 @@ return function(s)
id = "margin"
},
shape = function(cr, width, height)
gears.shape.rounded_rect(cr, width, height, 10)
gears.shape.rounded_rect(cr, width, height, 8)
end,
bg = color["Grey800"],
fg = color["White"],
widget = wibox.container.background,
id = "background"
},
margins = dpi(5),
widget = wibox.container.margin
id = "background",
keymap = keymap
}
Hover_signal(kb_layout_item.background, color["White"], color["Grey900"])
-- TODO: Hover effects, this is more pain than I'm willing to take for now
awesome.connect_signal(
"update::background:kblayout",
function()
awful.spawn.easy_async_with_shell(
[[ setxkbmap -query | grep layout | awk '{print $2}' ]],
function(stdout)
local layout = stdout:gsub("\n", "")
if kb_layout_item.keymap == layout then
kb_layout_item.bg = color["DeepPurple200"]
kb_layout_item:get_children_by_id("background2")[1].fg = color["Grey900"]
kb_layout_item:get_children_by_id("background1")[1].fg = color["Grey900"]
else
kb_layout_item.bg = color["Grey800"]
kb_layout_item:get_children_by_id("background2")[1].fg = color["Red200"]
kb_layout_item:get_children_by_id("background1")[1].fg = color["Purple200"]
end
end
)
end
)
get_kblayout()
kb_layout_item:connect_signal(
"button::press",
function()
awful.spawn.easy_async_with_shell(
"setxkbmap " .. keymap,
function(stdout)
function()
awesome.emit_signal("kblayout::hide:kbmenu")
mousegrabber.stop()
get_kblayout()
end
)
@@ -237,22 +257,33 @@ return function(s)
local function get_kblist()
local kb_layout_items = {
layout = wibox.layout.fixed.vertical
layout = wibox.layout.fixed.vertical,
spacing = dpi(10)
}
for i, keymap in pairs(user_vars.kblayout) do
kb_layout_items[i] = create_kb_layout_item(keymap)
end
return kb_layout_items
local cont = {
{
kb_layout_items,
margins = dpi(10),
widget = wibox.container.margin
},
layout = wibox.layout.fixed.vertical,
}
return cont
end
local kb_menu_widget = awful.popup {
screen = s,
shape = function(cr, width, height)
gears.shape.rounded_rect(cr, width, height, 5)
gears.shape.rounded_rect(cr, width, height, 12)
end,
widget = wibox.container.background,
bg = color["Grey900"],
fg = color["White"],
border_width = dpi(4),
border_color = color["Grey800"],
width = dpi(100),
max_height = dpi(600),
visible = false,
@@ -260,6 +291,30 @@ return function(s)
placement = function(c) awful.placement.align(c, { position = "top_right", margins = { right = dpi(255), top = dpi(60) } }) end
}
kb_menu_widget:connect_signal(
"mouse::leave",
function()
mousegrabber.run(
function()
kblayout_widget.bg = color["Green200"]
if mouse.is_left_mouse_button_pressed then
awesome.emit_signal("kblayout::hide:kbmenu")
mousegrabber.stop()
end
return true
end,
"arrow"
)
end
)
kb_menu_widget:connect_signal(
"mouse::enter",
function()
mousegrabber.stop()
end
)
kb_menu_widget:setup(
get_kblist()
)
@@ -298,7 +353,6 @@ return function(s)
end
)
--kb_menu_widget:move_next_to(mouse.current_widget_geometry)
-- Signals
Hover_signal(kblayout_widget, color["Green200"])
@@ -306,15 +360,15 @@ return function(s)
autostart = false,
stop_event = 'release',
keypressed_callback = function(self, mod, key, command)
if key == 'Escape' then
awesome.emit_signal("kblayout::hide:kbmenu")
end
mousegrabber.stop()
end
}
kblayout_widget:connect_signal(
"button::press",
function()
mousegrabber.stop()
if kb_menu_widget.visible then
kb_menu_widget.visible = false
kblayout_keygrabber:stop()

View File

@@ -107,13 +107,13 @@ return function()
end
local network_notify = function(message, title, app_name, icon)
naughty.notify({
naughty.notification {
text = message,
title = title,
app_name = app_name,
icon = gears.color.recolor_image(icon, color["White"]),
timeout = 3
})
}
end
local update_wireless = function()
@@ -314,7 +314,7 @@ return function()
)
end
local network_updater = gears.timer {
gears.timer {
timeout = 5,
autostart = true,
call_now = true,

View File

@@ -7,7 +7,6 @@ local awful = require("awful")
local color = require("src.theme.colors")
local dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears")
local naughty = require("naughty")
local watch = awful.widget.watch
local wibox = require("wibox")
require("src.core.signals")

View File

@@ -6,9 +6,7 @@ local color = require('src.theme.colors')
local list_update = function(widget, buttons, label, data, objects)
widget:reset()
local count
for i, object in ipairs(objects) do
count = i
for _, object in ipairs(objects) do
local task_widget = wibox.widget {
{
{
@@ -56,7 +54,10 @@ local list_update = function(widget, buttons, label, data, objects)
local task_tool_tip = awful.tooltip {
objects = { task_widget },
mode = "inside",
align = "right",
preferred_alignments = "middle",
preferred_positions = "bottom",
margins = dpi(10),
gaps = 0,
delay_show = 1
}