Reset old config
This commit is contained in:
79
bin/configs/compton.conf
Executable file
79
bin/configs/compton.conf
Executable file
@ -0,0 +1,79 @@
|
||||
backend = "glx";
|
||||
mark-wmwin-focused = true;
|
||||
mark-ovredir-focused = true;
|
||||
detect-rounded-corners = true;
|
||||
detect-client-opacity = true;
|
||||
refresh-rate = 0;
|
||||
vsync = "none";
|
||||
dbe = false;
|
||||
paint-on-overlay = true;
|
||||
|
||||
focus-exclude = [
|
||||
"class_g = 'Firefox Developer Edition'",
|
||||
"class_g = 'Firefox-esr'"
|
||||
];
|
||||
|
||||
detect-transient = true;
|
||||
detect-client-leader = true;
|
||||
invert-color-include = [ ];
|
||||
glx-copy-from-front = false;
|
||||
glx-swap-method = "undefined";
|
||||
|
||||
wintypes:
|
||||
{
|
||||
tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; };
|
||||
};
|
||||
|
||||
|
||||
|
||||
shadow = true;
|
||||
no-dnd-shadow = true;
|
||||
no-dock-shadow = false;
|
||||
clear-shadow = true;
|
||||
shadow-radius = 10;
|
||||
shadow-offset-x = -7;
|
||||
shadow-offset-y = -7;
|
||||
shadow-opacity = 0.3;
|
||||
shadow-exclude = [
|
||||
#"!(class_g = 'kitty-noblur')"
|
||||
];
|
||||
|
||||
|
||||
|
||||
fading = true;
|
||||
fade-in-step=0.02;
|
||||
fade-out-step=0.03;
|
||||
fade-delta=5;
|
||||
fade-exclude = [
|
||||
"(!class_g = 'awesome') && (!class_g = 'Rofi')"
|
||||
]
|
||||
|
||||
|
||||
opacity = false
|
||||
active-opacity = 1;
|
||||
inactive-opacity = 1;
|
||||
frame-opacity = 1;
|
||||
|
||||
opacity-rule = [
|
||||
# Kitty already has a transparent background.
|
||||
# 99% opacity to make text opaque
|
||||
"99:class_g = 'kitty'"
|
||||
];
|
||||
|
||||
|
||||
|
||||
## blur
|
||||
blur-background = true;
|
||||
blur-background-frame = false;
|
||||
blur-background-fixed = false;
|
||||
blur-kern = "3x3box";
|
||||
blur-method = "kawase";
|
||||
blur-strength = 16;
|
||||
|
||||
blur-background-exclude = [
|
||||
"window_type = 'desktop'",
|
||||
"name = 'awesome'",
|
||||
"name = 'Zoom Meeting'",
|
||||
#"(class_g = 'awesome') && !(window_type = 'normal')",
|
||||
"class_g = 'kitty-noblur'"
|
||||
];
|
81
bin/init.lua
Executable file
81
bin/init.lua
Executable file
@ -0,0 +1,81 @@
|
||||
dir = configuration_dir .. "bin/"
|
||||
local script_dir = dir .. "scripts/"
|
||||
|
||||
return {
|
||||
|
||||
system = {
|
||||
shutdown = function(confirm_prompt)
|
||||
if (string.lower(confirm_prompt) == "y") or (string.lower(confirm_prompt) == "yes") then
|
||||
awful.spawn("shutdown now", false)
|
||||
elseif (string.lower(confirm_prompt) == "r") or (string.lower(confirm_prompt) == "reset") then
|
||||
awful.spawn("shutdown -r now", false)
|
||||
end
|
||||
end
|
||||
},
|
||||
|
||||
backlight = {
|
||||
watch = function(timeout, callback, widget)
|
||||
awful.widget.watch(script_dir .. "backlight get", timeout, callback, widget)
|
||||
end,
|
||||
|
||||
get = function(callback)
|
||||
awful.spawn.easy_async(script_dir .. "backlight get", callback)
|
||||
end,
|
||||
|
||||
set = function(value)
|
||||
awful.spawn(script_dir .. "backlight set " .. value, false)
|
||||
end,
|
||||
|
||||
up = function()
|
||||
awful.spawn(script_dir .. "backlight up", false)
|
||||
end,
|
||||
|
||||
down = function()
|
||||
awful.spawn(script_dir .. "backlight down", false)
|
||||
end,
|
||||
|
||||
redshift = function(temp)
|
||||
awful.spawn("redshift -O " .. tostring(temp), false)
|
||||
end,
|
||||
|
||||
redshift_reset = function()
|
||||
awful.spawn("redshift -x", false)
|
||||
end,
|
||||
},
|
||||
|
||||
battery = {
|
||||
watch = function(timeout, callback, widget)
|
||||
awful.widget.watch(script_dir .. "battery", timeout, callback, widget)
|
||||
end,
|
||||
|
||||
status = function(callback)
|
||||
awful.spawn.easy_async(script_dir .. "battery", callback)
|
||||
end,
|
||||
},
|
||||
|
||||
rofi = {
|
||||
launcher = function()
|
||||
awful.spawn("rofi -show drun -theme \"" .. dir .. "/rofi/launcher.rasi\"")
|
||||
end
|
||||
},
|
||||
|
||||
capture = function(source, target)
|
||||
awful.spawn(script_dir .. "capture " .. source .. " " .. target, false)
|
||||
end,
|
||||
|
||||
flameshot = {
|
||||
gui = function()
|
||||
awful.spawn("flameshot gui -p \"" .. conf.screenshot_dir .. "\"", false)
|
||||
end
|
||||
},
|
||||
|
||||
mpc = {
|
||||
watch = function(command, timeout, callback, widget)
|
||||
awful.widget.watch("mpc --host " .. conf.mpd_host .. " " .. command, timeout, callback, widget)
|
||||
end,
|
||||
|
||||
command = function(command, callback)
|
||||
awful.spawn.easy_async("mpc --host " .. conf.mpd_host .. " " .. command, callback)
|
||||
end
|
||||
}
|
||||
}
|
155
bin/rofi/launcher.rasi
Executable file
155
bin/rofi/launcher.rasi
Executable file
@ -0,0 +1,155 @@
|
||||
configuration {
|
||||
font: "Inter Regular 10";
|
||||
show-icons: true;
|
||||
icon-theme: "Papirus";
|
||||
drun-display-format: "{name}";
|
||||
fullscreen: false;
|
||||
threads: 0;
|
||||
matching: "fuzzy";
|
||||
scroll-method: 1;
|
||||
disable-history: false;
|
||||
fullscreen: false;
|
||||
window-thumbnail: true;
|
||||
}
|
||||
|
||||
* {
|
||||
transparent: #00000000;
|
||||
background: #000000FF;
|
||||
foreground: #F2F2F2EE;
|
||||
background-selected: #F2F2F245;
|
||||
background-active: #F2F2F230;
|
||||
background-white: #F2F2F211;
|
||||
background-black: #00000066;
|
||||
urgent: #E91E6366;
|
||||
urgent-selected: #E91E6377;
|
||||
}
|
||||
|
||||
window {
|
||||
transparency: "real";
|
||||
background-color: @background;
|
||||
location: southwest;
|
||||
anchor: southwest;
|
||||
x-offset: 4px;
|
||||
y-offset: -50px;
|
||||
height: 500px;
|
||||
width: 400px;
|
||||
orientation: vertical;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
prompt {
|
||||
enabled: false;
|
||||
}
|
||||
|
||||
button {
|
||||
action: "ok";
|
||||
str: " ";
|
||||
font: "FantasqueSansMono Nerd Font 11";
|
||||
expand: false;
|
||||
text-color: @foreground;
|
||||
background-color: @transparent;
|
||||
vertical-align: 0.7;
|
||||
horizontal-align: 0.5;
|
||||
}
|
||||
|
||||
entry {
|
||||
font: "Inter Regular 11";
|
||||
background-color: @transparent;
|
||||
text-color: @foreground;
|
||||
expand: true;
|
||||
vertical-align: 0.5;
|
||||
horizontal-align: 0.5;
|
||||
placeholder: "Search";
|
||||
placeholder-color: @foreground;
|
||||
blink: true;
|
||||
}
|
||||
|
||||
case-indicator {
|
||||
background-color: @transparent;
|
||||
text-color: @foreground;
|
||||
vertical-align: 0.5;
|
||||
horizontal-align: 0.5;
|
||||
}
|
||||
|
||||
entry-wrapper {
|
||||
orientation: horizontal;
|
||||
vertical-align: 0.5;
|
||||
spacing: 4px;
|
||||
background-color: @transparent;
|
||||
children: [ button, entry, case-indicator ];
|
||||
}
|
||||
|
||||
inputbar {
|
||||
background-color: @background-white;
|
||||
text-color: @foreground;
|
||||
expand: false;
|
||||
border-radius: 24px;
|
||||
margin: 0px 0px 0px 0px;
|
||||
padding: 10px 10px 10px 10px;
|
||||
position: north;
|
||||
children: [ entry-wrapper ];
|
||||
}
|
||||
|
||||
listview {
|
||||
background-color: @transparent;
|
||||
columns: 1;
|
||||
spacing: 5px;
|
||||
cycle: false;
|
||||
dynamic: true;
|
||||
layout: vertical;
|
||||
}
|
||||
|
||||
mainbox {
|
||||
background-color: @background-black;
|
||||
children: [listview, inputbar ];
|
||||
spacing: 25px;
|
||||
padding: 40px 25px 25px 25px;
|
||||
}
|
||||
|
||||
element {
|
||||
background-color: @transparent;
|
||||
text-color: @foreground;
|
||||
orientation: horizontal;
|
||||
border-radius: 6px;
|
||||
padding: 5px 10px 5px 10px;
|
||||
}
|
||||
|
||||
element-icon {
|
||||
size: 36px;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
element-text {
|
||||
expand: true;
|
||||
horizontal-align: 0;
|
||||
vertical-align: 0.5;
|
||||
margin: 0 10px 0 10px;
|
||||
}
|
||||
|
||||
element normal.urgent,
|
||||
element alternate.urgent {
|
||||
background-color: @urgent;
|
||||
text-color: @foreground;
|
||||
border-radius: 9px;
|
||||
}
|
||||
|
||||
element normal.active,
|
||||
element alternate.active {
|
||||
background-color: @background-active;
|
||||
text-color: @foreground;
|
||||
}
|
||||
|
||||
element selected {
|
||||
background-color: @background-selected;
|
||||
text-color: @foreground;
|
||||
}
|
||||
|
||||
element selected.urgent {
|
||||
background-color: @urgent-selected;
|
||||
text-color: @foreground;
|
||||
}
|
||||
|
||||
element selected.active {
|
||||
background-color: @background-active;
|
||||
color: @foreground-selected;
|
||||
}
|
37
bin/scripts/backlight
Executable file
37
bin/scripts/backlight
Executable file
@ -0,0 +1,37 @@
|
||||
#!/usr/bin/fish
|
||||
#
|
||||
# Usage:
|
||||
# backlight get
|
||||
# backlight set [value]
|
||||
# backlight max
|
||||
#
|
||||
# Returns:
|
||||
# Set - nothing
|
||||
# Get, max - Number between 0 and 100 (eg: 0, 25.445283, 100)
|
||||
#
|
||||
|
||||
function backlight
|
||||
switch $argv[1]
|
||||
case "get"
|
||||
xbacklight -get
|
||||
case "max"
|
||||
echo 100
|
||||
case "set"
|
||||
xbacklight -set $argv[2]
|
||||
case "up"
|
||||
xbacklight -inc 10
|
||||
case "down"
|
||||
xbacklight -dec 10
|
||||
case "*"
|
||||
echo "Unknown function \"$argv[1]\""
|
||||
echo ""
|
||||
echo "Usage:"
|
||||
echo " backlight get"
|
||||
echo " backlight set [value]"
|
||||
echo " backlight max"
|
||||
return 0
|
||||
end
|
||||
return 1
|
||||
end
|
||||
|
||||
backlight $argv
|
8
bin/scripts/battery
Executable file
8
bin/scripts/battery
Executable file
@ -0,0 +1,8 @@
|
||||
#!/usr/bin/fish
|
||||
# returns battery percentage and status
|
||||
# 45%, discharging
|
||||
# second parameter returns "fully" when fully charged. Since awesome only checks for "discharging," fixing that isn't necessary.
|
||||
|
||||
echo \
|
||||
(upower --show-info /org/freedesktop/UPower/devices/battery_BAT1 | grep percentage | grep -Po "(\d\d?\d?)%"), \
|
||||
(upower --show-info /org/freedesktop/UPower/devices/battery_BAT1 | grep state | grep -Po "(?<=state:)\s*(\w*)" | xargs) \
|
74
bin/scripts/capture
Executable file
74
bin/scripts/capture
Executable file
@ -0,0 +1,74 @@
|
||||
#!/usr/bin/fish
|
||||
#
|
||||
# Screenshot wrapper
|
||||
#
|
||||
# Take a screenshot of a
|
||||
# region, window, or screen
|
||||
# and
|
||||
# save it to $dest
|
||||
# copy it to the clipboard
|
||||
# pipe it through tesseract and xclip the result
|
||||
|
||||
|
||||
function capture
|
||||
# Screenshot save location
|
||||
set dest $HOME/Screenshots/
|
||||
|
||||
#set tmp_file (mktemp --tmpdir "scrot-tmp-XXX.png")
|
||||
set tmp_file "/tmp/scrot-tmp.png"
|
||||
|
||||
# Capture the desired portion of the screen
|
||||
switch $argv[1]
|
||||
case window
|
||||
scrot --overwrite --silent --focused $tmp_file
|
||||
case screen
|
||||
scrot --overwrite --silent $tmp_file
|
||||
case region
|
||||
scrot --overwrite --silent --select --freeze --line style=dash,width=2 $tmp_file
|
||||
case "*"
|
||||
echo "Unknown source \"$argv[1]\""
|
||||
echo ""
|
||||
echo "Usage: capture [source] [target]"
|
||||
echo " Valid sources: window, screen, region"
|
||||
echo " Valid targets: save, copy, ocr"
|
||||
return 0
|
||||
end
|
||||
|
||||
# Output to the desired location
|
||||
switch $argv[2]
|
||||
case save
|
||||
set fname (md5sum $tmp_file | cut -c 1-32)
|
||||
mv $tmp_file "$dest$fname.png"
|
||||
|
||||
case copy
|
||||
# Don't use the mktmp file here, since we can't clean
|
||||
# it away immediately. Use the fixed /tmp/scrot-clip insead.
|
||||
# (Only applicable when a mktemp file is being used)
|
||||
#rm $tmp_file
|
||||
#set tmp_file /tmp/scrot-clip.png
|
||||
|
||||
xclip -i -selection clipboard -t "image/png" $tmp_file
|
||||
|
||||
case ocr
|
||||
# Recognize text
|
||||
set ocr (tesseract --dpi 96 -l eng $tmp_file stdout)
|
||||
|
||||
# Trim whitespace and copy to clipboard
|
||||
echo $ocr | sed -e "s/^[ \t]*//" | xclip -i -rmlastnl -selection clipboard
|
||||
rm $tmp_file
|
||||
|
||||
case "*"
|
||||
echo "Unknown target \"$argv[2]\""
|
||||
echo ""
|
||||
echo "Usage: capture [source] [target]"
|
||||
echo " Valid sources: window, screen, region"
|
||||
echo " Valid targets: save, copy, ocr"
|
||||
return 0
|
||||
end
|
||||
|
||||
return 1
|
||||
end
|
||||
|
||||
# Awesomewm refuses to execute this without a sleep.
|
||||
sleep 0.1
|
||||
capture $argv
|
Reference in New Issue
Block a user