awesomewm files

This commit is contained in:
Cynthia Foxwell 2022-10-23 21:06:06 -06:00
parent b5fcd4b6d3
commit 24706d35f7
46 changed files with 1485 additions and 0 deletions

6
.gitmodules vendored Normal file
View file

@ -0,0 +1,6 @@
[submodule "linux/.config/awesome/freedesktop"]
path = linux/.config/awesome/freedesktop
url = https://github.com/lcpz/awesome-freedesktop.git
[submodule "linux/.config/awesome/lain"]
path = linux/.config/awesome/lain
url = https://github.com/lcpz/lain.git

View file

@ -0,0 +1,25 @@
local HOME = os.getenv("HOME")
return {
terminal = "wezterm",
terminal_separator = "start",
editor = "nvim",
launcher = "rofi -show combi",
modkey = "Mod4",
theme = "tokyo_night",
font = "Terminus 8",
gap = 4,
border_width = 1,
icon_theme = "Chicago95-tux",
wallpaper = HOME .. "/Pictures/pixelart_night_stars_clouds_trees_cozy.png",
layouts = {
"fair",
"fair.horizontal",
"floating",
},
autostart = {
"xrdb " .. HOME .. "/.config/xrdb/main.xrdb",
"xrdb -merge " .. HOME .. "/.config/xrdb/colors/tokyonight.xrdb",
"sh ~/.local/generic_autostart.sh",
},
}

@ -0,0 +1 @@
Subproject commit c82ad2960c5f0c84e765df68554c266ea7e9464d

View file

@ -0,0 +1,48 @@
return function(path, theme)
-- Define the image to load
theme.menu_submenu_icon = path .. "/submenu.png"
theme.titlebar_close_button_normal = path .. "/titlebar/close.png"
theme.titlebar_close_button_focus = path .. "/titlebar/close.png"
theme.titlebar_minimize_button_normal = path .. "/titlebar/minimize.png"
theme.titlebar_minimize_button_focus = path .. "/titlebar/minimize.png"
theme.titlebar_ontop_button_normal_inactive = path .. "/titlebar/ontop_inactive.png"
theme.titlebar_ontop_button_focus_inactive = path .. "/titlebar/ontop_inactive.png"
theme.titlebar_ontop_button_normal_active = path .. "/titlebar/ontop_active.png"
theme.titlebar_ontop_button_focus_active = path .. "/titlebar/ontop_active.png"
theme.titlebar_sticky_button_normal_inactive = path .. "/titlebar/sticky_inactive.png"
theme.titlebar_sticky_button_focus_inactive = path .. "/titlebar/sticky_inactive.png"
theme.titlebar_sticky_button_normal_active = path .. "/titlebar/sticky_active.png"
theme.titlebar_sticky_button_focus_active = path .. "/titlebar/sticky_active.png"
theme.titlebar_floating_button_normal_inactive = path .. "/titlebar/floating_inactive.png"
theme.titlebar_floating_button_focus_inactive = path .. "/titlebar/floating_inactive.png"
theme.titlebar_floating_button_normal_active = path .. "/titlebar/floating_active.png"
theme.titlebar_floating_button_focus_active = path .. "/titlebar/floating_active.png"
theme.titlebar_maximized_button_normal_inactive = path .. "/titlebar/maximized_inactive.png"
theme.titlebar_maximized_button_focus_inactive = path .. "/titlebar/maximized_inactive.png"
theme.titlebar_maximized_button_normal_active = path .. "/titlebar/maximized_active.png"
theme.titlebar_maximized_button_focus_active = path .. "/titlebar/maximized_active.png"
-- You can use your own layout icons like this:
theme.layout_fairh = path .. "/layouts/fairh.png"
theme.layout_fairv = path .. "/layouts/fairv.png"
theme.layout_floating = path .. "/layouts/floating.png"
theme.layout_magnifier = path .. "/layouts/magnifier.png"
theme.layout_max = path .. "/layouts/max.png"
theme.layout_fullscreen = path .. "/layouts/fullscreen.png"
theme.layout_tilebottom = path .. "/layouts/tilebottom.png"
theme.layout_tileleft = path .. "/layouts/tileleft.png"
theme.layout_tile = path .. "/layouts/tile.png"
theme.layout_tiletop = path .. "/layouts/tiletop.png"
theme.layout_spiral = path .. "/layouts/spiral.png"
theme.layout_dwindle = path .. "/layouts/dwindle.png"
theme.layout_cornernw = path .. "/layouts/cornernw.png"
theme.layout_cornerne = path .. "/layouts/cornerne.png"
theme.layout_cornersw = path .. "/layouts/cornersw.png"
theme.layout_cornerse = path .. "/layouts/cornerse.png"
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 183 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 183 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 B

@ -0,0 +1 @@
Subproject commit 438dd7481026519f1e924a2b3087e7cda559df57

1128
linux/.config/awesome/rc.lua Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,44 @@
#!/bin/bash
if [ "`pgrep -x cmus`" == "" ]; then
echo "<not running>"
exit 0
fi
data="$(cmus-remote -Q)"
status=$(echo "$data" | awk '/status / {print $2}')
artist=$(echo "$data" | awk '/tag artist / {$1="";$2="";print substr($0,3)}')
title=$(echo "$data" | awk '/tag title / {$1="";$2="";print substr($0,3)}')
duration=$(echo "$data" | awk '/duration/ {print $2}')
position=$(echo "$data" | awk '/position/ {print $2}')
nowplaying="$artist - $title"
position_formatted=""
duration_formatted=""
if [ "$position" != "" ]; then
if [ $position -ge 3600 ]; then
position_formatted+=$(printf '%02d:' $(($position/3600)))
fi
position_formatted+=$(printf '%02d:%02d' $(($position%3600/60)) $(($position%60)))
fi
if [ "$duration" != "" ]; then
if [ $duration -ge 3600 ]; then
duration_formatted+=$(printf '%02d:' $(($duration/3600)))
fi
duration_formatted+=$(printf '%02d:%02d' $(($duration%3600/60)) $(($duration%60)))
fi
nowplaying+=" [$position_formatted/$duration_formatted]"
if [ "$status" == "paused" ]; then
nowplaying+=" [paused]"
elif [ "$status" == "stopped" ]; then
nowplaying+=" [stopped]"
fi
echo "$nowplaying"

View file

@ -0,0 +1,143 @@
---------------------------
-- Default awesome theme --
---------------------------
local theme_assets = require("beautiful.theme_assets")
local xresources = require("beautiful.xresources")
local dpi = xresources.apply_dpi
local gfs = require("gears.filesystem")
local themes_path = gfs.get_themes_dir()
local colors = {
background = "#1a1b26",
foreground = "#a9b1d6",
secondary = "#16161e",
tertiary = "#101014",
accent = "#3d59a1",
color0 = "#32344a",
color1 = "#f7768e",
color2 = "#9ece6a",
color3 = "#e0af68",
color4 = "#7aa2f7",
color5 = "#ad8ee6",
color6 = "#449dab",
color7 = "#787c99",
color8 = "#444b6a",
color9 = "#ff7a93",
color10 = "#b9f27c",
color11 = "#ff9e64",
color12 = "#7da6ff",
color13 = "#bb9af7",
color14 = "#0db9d7",
color15 = "#acb0d0",
}
local theme = dofile(themes_path .. "default/theme.lua")
theme.__colors = colors
theme.bg_normal = colors.secondary
theme.bg_focus = colors.background
theme.bg_urgent = colors.color0
theme.bg_minimize = colors.tertiary
theme.bg_systray = colors.background
theme.fg_normal = colors.color7
theme.fg_focus = colors.foreground
theme.fg_urgent = colors.color1
theme.fg_minimize = colors.color0
theme.border_normal = theme.bg_normal
theme.border_focus = colors.color5
theme.border_marked = colors.color2
-- There are other variable sets
-- overriding the default one when
-- defined, the sets are:
-- taglist_[bg|fg]_[focus|urgent|occupied|empty|volatile]
-- tasklist_[bg|fg]_[focus|urgent]
-- titlebar_[bg|fg]_[normal|focus]
-- tooltip_[font|opacity|fg_color|bg_color|border_width|border_color]
-- mouse_finder_[color|timeout|animate_timeout|radius|factor]
-- prompt_[fg|bg|fg_cursor|bg_cursor|font]
-- hotkeys_[bg|fg|border_width|border_color|shape|opacity|modifiers_fg|label_bg|label_fg|group_margin|font|description_font]
-- Example:
--theme.taglist_bg_focus = "#ff0000"
theme.taglist_bg_focus = colors.background
theme.taglist_bg_urgent = theme.taglist_bg_focus
theme.taglist_bg_occupied = theme.taglist_bg_focus
theme.taglist_bg_empty = theme.taglist_bg_focus
theme.taglist_bg_volatile = theme.taglist_bg_focus
theme.taglist_fg_focus = colors.color5
theme.taglist_fg_urgent = colors.color1
theme.taglist_fg_occupied = colors.color2
theme.taglist_fg_empty = colors.foreground
theme.taglist_fg_volatile = colors.color3
theme.tasklist_fg_focus = colors.color5
theme.tasklist_fg_urgent = colors.color1
theme.wibar_bg = colors.background
theme.wibar_fg = colors.foreground
theme.layout_fg = colors.foreground
-- bar items
theme.widget_clock = colors.color6
theme.widget_volume = colors.color4
theme.widget_volume_muted = colors.color1
theme.widget_cpu = colors.color2
theme.widget_gpu = colors.color4
theme.widget_memory = colors.color3
theme.widget_music = colors.color5
-- Generate taglist squares:
--[[local taglist_square_size = dpi(4)
theme.taglist_squares_sel = theme_assets.taglist_squares_sel(
taglist_square_size, theme.fg_normal
)
theme.taglist_squares_unsel = theme_assets.taglist_squares_unsel(
taglist_square_size, theme.fg_normal
)--]]
theme.taglist_squares_sel = nil
theme.taglist_squares_unsel = nil
-- Variables set for theming notifications:
-- notification_font
-- notification_[bg|fg]
-- notification_[width|height|margin]
-- notification_[border_color|border_width|shape|opacity]
theme.notification_bg = colors.background
theme.notification_fg = colors.foreground
theme.notification_border_color = colors.color5
-- Variables set for theming the menu:
-- menu_[bg|fg]_[normal|focus]
-- menu_[border_color|border_width]
theme.menu_bg_normal = colors.background
theme.menu_bg_focus = colors.accent
theme.menu_fg_normal = colors.foreground
theme.menu_fg_focus = "#ffffff"
theme.menu_border_color = colors.background
-- Generate Awesome icon:
theme.awesome_icon = theme_assets.awesome_icon(
16, colors.background, colors.accent
)
-- You can add as many variables as
-- you wish and access them by using
-- beautiful.variable in your rc.lua
--theme.bg_widget = "#cc0000"
return theme
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

36
linux/.local/bin/cmus-notify.sh Executable file
View file

@ -0,0 +1,36 @@
#!/bin/bash
[ $# -eq 0 ] && exit 0
get_albumart() {
rm /tmp/albumart.jpg
local dir_name=$( dirname "$1" )
local names=(folder cover albumart front "$2")
for item in "${names[@]}" ; do
img_file=$( find "$dir_name" -maxdepth 1 -iregex ".*$item*\.\(jpg\|jpeg\|gif\|png\|\)$" -print -quit )
[ -n "$img_file" ] && cp "$img_file" /tmp/_albumart.jpg && break
done
[ -z "$img_file" ] && ffmpeg -i "$1" -an -v:c copy "/tmp/_albumart.jpg" -y && img_file="/tmp/_albumart.jpg"
[ -n "$img_file" ] && ffmpeg -i /tmp/_albumart.jpg -vf scale=72:-1 /tmp/albumart.jpg && rm /tmp/_albumart.jpg
}
if [ $2 == "playing" ]; then
while [ $# -ge 2 ] ; do
eval _$1='$2'
shift
shift
done
get_albumart "$_file" "$_album"
duration_formatted=""
if [ "$_duration" != "" ]; then
if [ $_duration -ge 3600 ]; then
duration_formatted+=$(printf '%02d:' $(($_duration/3600)))
fi
duration_formatted+=$(printf '%02d:%02d' $(($_duration%3600/60)) $(($_duration%60)))
fi
notify-send -t 5000 -i /tmp/albumart.jpg "$_title" "$_artist\n$_album\n$duration_formatted"
fi

View file

@ -0,0 +1,51 @@
#!/bin/bash
if [ "`pgrep -x cmus`" == "" ]; then
echo "<txt></txt>"
exit 0
fi
status=$(cmus-remote -Q | awk '/status / {print $2}')
albumartist=$(cmus-remote -Q | awk '/tag albumartist / {$1="";$2="";print substr($0,3)}')
artist=$(cmus-remote -Q | awk '/tag artist / {$1="";$2="";print substr($0,3)}')
title=$(cmus-remote -Q | awk '/tag title / {$1="";$2="";print substr($0,3)}')
duration=$(cmus-remote -Q | awk '/duration/ {print $2}')
position=$(cmus-remote -Q | awk '/position/ {print $2}')
nowplaying=""
if [ "$albumartist" != "" ]; then
nowplaying+="$albumartist"
else
nowplaying+="$artist"
fi
nowplaying+=" - $title"
position_formatted=""
duration_formatted=""
if [ "$position" != "" ]; then
if [ $position -ge 3600 ]; then
position_formatted+=$(printf '%02d:' $(($position/3600)))
fi
position_formatted+=$(printf '%02d:%02d' $(($position%3600/60)) $(($position%60)))
fi
if [ "$duration" != "" ]; then
if [ $duration -ge 3600 ]; then
duration_formatted+=$(printf '%02d:' $(($duration/3600)))
fi
duration_formatted+=$(printf '%02d:%02d' $(($duration%3600/60)) $(($duration%60)))
fi
nowplaying+=" [$position_formatted/$duration_formatted]"
if [ "$status" == "paused" ]; then
nowplaying+=" [paused]"
elif [ "$status" == "stopped" ]; then
nowplaying+=" [stopped]"
fi
echo "<icon>mplayer</icon>"
echo "<txt> $nowplaying</txt>"

View file

@ -4,8 +4,10 @@ pkill -9 pipewire
pkill -9 pipewire-pulse
pkill -9 vmware-user-suid-wrapper
pkill -9 xmousepasteblock
pkill -9 xscreensaver
pipewire &
pipewire-pulse &
vmware-user-suid-wrapper &
xmousepasteblock &
xscreensaver &