add wallpaper, and random changes
| @@ -21,7 +21,7 @@ return { | ||||
|         -- associated with each tag/workspace | ||||
|         browser = 'env brave', | ||||
|         editor = 'code', -- gui text editor | ||||
|         social = 'telegram-desktop', | ||||
|         social = 'schildichat-desktop', | ||||
|         game = rofi_command, | ||||
|         files = 'nautilus', | ||||
|         music = 'clementine', | ||||
| @@ -44,9 +44,9 @@ return { | ||||
|         'xfce4-power-manager', -- Power manager | ||||
| 	'pamac-tray', | ||||
|         -- 'ibus-daemon --xim --daemonize', -- Ibus daemon for keyboard | ||||
|         'scream-start', -- scream audio sink | ||||
|         -- 'flameshot', -- screenshots | ||||
|         -- 'numlockx on', -- enable numlock | ||||
| 	'syncthing -no-browser', | ||||
|         '/usr/lib/xfce-polkit/xfce-polkit & eval $(gnome-keyring-daemon -s --components=pkcs11,secrets,ssh,gpg)', -- credential manager | ||||
|         'blueman-tray', -- bluetooth tray | ||||
|         --'copyq', | ||||
| @@ -56,7 +56,6 @@ return { | ||||
| 	--    '/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 &")', | ||||
| 	'keepassxc', | ||||
| 	'kdeconnect-indicator', | ||||
| 	'planner', | ||||
|     } | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -152,8 +152,8 @@ awful.key({modkey, 'Control'}, 'n', function() | ||||
|     end | ||||
| end, {description = 'restore minimized', group = 'client'}), | ||||
| -- Dropdown application | ||||
| awful.key({modkey}, 'z', function() _G.toggle_quake() end, | ||||
|           {description = 'dropdown application', group = 'launcher'}), | ||||
| --[[awful.key({modkey}, 'z', function() _G.toggle_quake() end, | ||||
|           {description = 'dropdown application', group = 'launcher'}),]] | ||||
| -- Widgets popups | ||||
| --[[awful.key( | ||||
|     {altkey}, | ||||
| @@ -177,23 +177,23 @@ awful.key({modkey}, 'z', function() _G.toggle_quake() end, | ||||
|   ),--]] | ||||
| -- Brightness | ||||
| awful.key({}, 'XF86MonBrightnessUp', | ||||
|           function() awful.spawn('xbacklight -inc 10') end, | ||||
|           function() awful.spawn('xbacklight -inc 10 -time 200 -fps 60') end, | ||||
|           {description = '+10%', group = 'hotkeys'}), | ||||
| awful.key({}, 'XF86MonBrightnessDown', | ||||
|           function() awful.spawn('xbacklight -dec 10') end, | ||||
|           function() awful.spawn('xbacklight -dec 10 -time 200 -fps 60') end, | ||||
|           {description = '-10%', group = 'hotkeys'}), -- ALSA volume control | ||||
| awful.key({}, 'XF86AudioRaiseVolume', function() | ||||
|     awful.spawn.easy_async('amixer -D pulse set Master 5%+', function()  | ||||
|     awful.spawn.easy_async('pactl set-sink-volume @DEFAULT_SINK@ +5%', function()  | ||||
|         _G.update_volume() | ||||
|     end) | ||||
| end, {description = 'volume up', group = 'hotkeys'}), | ||||
| awful.key({}, 'XF86AudioLowerVolume', function() | ||||
|     awful.spawn.easy_async('amixer -D pulse set Master 5%-', function() | ||||
|     awful.spawn.easy_async('pactl set-sink-volume @DEFAULT_SINK@ -5%', function() | ||||
|         _G.update_volume() | ||||
|     end) | ||||
| end, {description = 'volume down', group = 'hotkeys'}), | ||||
| awful.key({}, 'XF86AudioMute', function() | ||||
|     awful.spawn('amixer -D pulse set Master 1+ toggle') | ||||
|     awful.spawn('pactl set-sink-mute @DEFAULT_SINK@ toggle') | ||||
|     _G.update_volume() | ||||
| end, {description = 'toggle mute', group = 'hotkeys'}), | ||||
| awful.key({}, 'XF86AudioNext', function() | ||||
|   | ||||
| @@ -54,7 +54,7 @@ local TopBar = function(s, offset) | ||||
|     local system_details = wibox.widget { | ||||
|             systray, | ||||
|             separator, | ||||
|             battery, | ||||
|             --battery_widget, | ||||
|             --separator, | ||||
|             wibox.widget{ | ||||
|                 wibox.widget{ | ||||
|   | ||||
| @@ -13,10 +13,10 @@ local awesome_overrides = function(theme) | ||||
|     theme.dir = os.getenv('HOME') .. '/.config/awesome/theme' | ||||
|  | ||||
|     theme.icons = theme.dir .. '/.config/awesome/theme/icons/' | ||||
|     theme.font = 'Product Sans Regular 9'         -- Glyphs don't work properly with this (#442) | ||||
|     theme.font = 'Google Sans Regular 9'         -- Glyphs don't work properly with this (#442) | ||||
|     --theme.font = 'Robotomono nerd font 9'         -- Glyphs don't work properly with this (#442) | ||||
|     theme.font_large = 'Product Sans Regular 11' | ||||
|     theme.icon_font = 'Product Sans Medium 10'          -- Fira mono patched version | ||||
|     theme.font_large = 'Google Sans Regular 11' | ||||
|     theme.icon_font = 'Google Sans Medium 10'          -- Fira mono patched version | ||||
|     --theme.icon_font = 'firamono nerd font 11'          -- Fira mono patched version | ||||
|  | ||||
|     -- Layout icons | ||||
|   | ||||
| Before Width: | Height: | Size: 1.6 MiB | 
| Before Width: | Height: | Size: 3.2 MiB | 
| Before Width: | Height: | Size: 49 KiB | 
| Before Width: | Height: | Size: 796 KiB | 
| Before Width: | Height: | Size: 1.8 MiB | 
| Before Width: | Height: | Size: 1.9 MiB | 
| Before Width: | Height: | Size: 1.4 MiB | 
| Before Width: | Height: | Size: 2.4 MiB | 
| Before Width: | Height: | Size: 27 KiB | 
| Before Width: | Height: | Size: 1.2 MiB | 
| Before Width: | Height: | Size: 1.0 MiB | 
| Before Width: | Height: | Size: 1.2 MiB | 
| Before Width: | Height: | Size: 14 MiB After Width: | Height: | Size: 19 MiB | 
							
								
								
									
										52
									
								
								widget/battery/init.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,52 @@ | ||||
| local awful = require("awful") | ||||
| local wibox = require('wibox') | ||||
| local mat_list_item = require('widget.material.list-item') | ||||
| local dpi = require('beautiful').xresources.apply_dpi | ||||
| local watch = require('awful.widget.watch') | ||||
| local beautiful = require('beautiful') | ||||
|  | ||||
| local battery_icon = wibox.widget.textbox() | ||||
| battery_icon.font = beautiful.icon_font | ||||
| local battery_widget = wibox.widget.textbox() | ||||
| battery_widget.align = 'center' | ||||
| battery_widget.valign = 'center' | ||||
| battery_widget.font = beautiful.font | ||||
|  | ||||
| local battery | ||||
|  | ||||
| function update_battery() | ||||
|     awful.spawn.easy_async_with_shell("pamixer --get-volume", function(stdout) | ||||
|         battery = stdout | ||||
|         --battery = string.match(stdout, '(%d?%d?%d)%%') | ||||
|         awful.spawn.easy_async_with_shell("bash -c 'pacmd list-sinks | awk '/muted/ { print $2 }''", function(muted) | ||||
|             --muted = string.gsub(muted, "%s+", "") | ||||
| 	        muted = 'no' | ||||
|             if muted == 'muted:no' and (battery > '50' or battery == '100') then | ||||
|                 battery_icon.text = '墳' | ||||
|             elseif muted == 'muted:no' and battery <= '50' and battery > '0' then | ||||
|                 battery_icon.text = '奔' | ||||
|             elseif muted == 'muted:yes' then | ||||
|                 battery_icon.text = '婢' | ||||
|             elseif battery == '0' then | ||||
|                 battery_icon.text = '奄' | ||||
|             end | ||||
|             battery_widget.text = battery | ||||
|         end) | ||||
|         collectgarbage('collect') | ||||
|     end) | ||||
| end | ||||
|  | ||||
| watch('bash -c', 3, function(_, stdout) | ||||
|     update_battery() | ||||
| end) | ||||
|  | ||||
| return wibox.widget { | ||||
|     wibox.widget{ | ||||
|         battery_icon, | ||||
|         fg = beautiful.accent.hue_100, | ||||
|         widget = wibox.container.background | ||||
|     }, | ||||
|     battery_widget, | ||||
|     spacing = dpi(2), | ||||
|     layout = wibox.layout.fixed.horizontal | ||||
| } | ||||
| @@ -15,10 +15,12 @@ volume_widget.font = beautiful.font | ||||
| local volume | ||||
|  | ||||
| function update_volume() | ||||
|     awful.spawn.easy_async_with_shell("bash -c 'amixer -D pulse sget Master'", function(stdout) | ||||
|         volume = string.match(stdout, '(%d?%d?%d)%%') | ||||
|     awful.spawn.easy_async_with_shell("pamixer --get-volume", function(stdout) | ||||
|         volume = stdout | ||||
|         --volume = string.match(stdout, '(%d?%d?%d)%%') | ||||
|         awful.spawn.easy_async_with_shell("bash -c 'pacmd list-sinks | awk '/muted/ { print $2 }''", function(muted) | ||||
|             muted = string.gsub(muted, "%s+", "") | ||||
| 	        --muted = 'no' | ||||
|             if muted == 'muted:no' and (volume > '50' or volume == '100') then | ||||
|                 volume_icon.text = '墳' | ||||
|             elseif muted == 'muted:no' and volume <= '50' and volume > '0' then | ||||
|   | ||||