update
This commit is contained in:
parent
209ba130c0
commit
f0d81507e7
10 changed files with 133 additions and 23 deletions
|
|
@ -13,7 +13,7 @@ gtk-enable-input-feedback-sounds=0
|
|||
gtk-xft-antialias=1
|
||||
gtk-xft-hinting=1
|
||||
gtk-xft-hintstyle=hintslight
|
||||
gtk-xft-rgba=rgb
|
||||
gtk-xft-rgba=vrgb
|
||||
gtk-application-prefer-dark-theme=1
|
||||
gtk-cursor-blink=true
|
||||
gtk-cursor-blink-time=1000
|
||||
|
|
|
|||
74
.config/lite-xl/plugins/autosave.lua
Normal file
74
.config/lite-xl/plugins/autosave.lua
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
-- mod-version:3
|
||||
local core = require "core"
|
||||
local config = require "core.config"
|
||||
local Doc = require "core.doc"
|
||||
local command = require "core.command"
|
||||
local common = require "core.common"
|
||||
-- this is used to detect the wait time
|
||||
local last_keypress = os.time()
|
||||
-- this exists so that we don't end up with multiple copies of the loop running at once
|
||||
local looping = false
|
||||
local on_text_change = Doc.on_text_change
|
||||
|
||||
config.plugins.autosave = common.merge({
|
||||
enabled = true,
|
||||
-- the approximate amount of time, in seconds, that it takes to trigger an autosave
|
||||
timeout = 1,
|
||||
-- The config specification used by the settings gui
|
||||
config_spec = {
|
||||
name = "Auto Save",
|
||||
{
|
||||
label = "Enable",
|
||||
description = "Enable or disable the auto save feature.",
|
||||
path = "enabled",
|
||||
type = "toggle",
|
||||
default = true
|
||||
},
|
||||
{
|
||||
label = "Timeout",
|
||||
description = "Approximate amount of time in seconds it takes to trigger an autosave.",
|
||||
path = "timeout",
|
||||
type = "number",
|
||||
default = 1,
|
||||
min = 1,
|
||||
max = 30
|
||||
}
|
||||
}
|
||||
}, config.plugins.autosave)
|
||||
|
||||
|
||||
local function loop_for_save()
|
||||
while looping do
|
||||
if os.difftime(os.time(), last_keypress) >= config.plugins.autosave.timeout then
|
||||
command.perform "doc:save"
|
||||
-- stop loop
|
||||
looping = false
|
||||
end
|
||||
-- wait the timeout. may cause timeout to be slightly imprescise
|
||||
coroutine.yield(config.plugins.autosave.timeout)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
local function updatepress()
|
||||
-- set last keypress time to now
|
||||
last_keypress = os.time()
|
||||
-- put loop in coroutine so it doesn't lag out this script
|
||||
if not looping then
|
||||
looping = true
|
||||
core.add_thread(loop_for_save)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function Doc:on_text_change(type)
|
||||
-- check if file is saved
|
||||
if config.plugins.autosave.enabled and self.filename
|
||||
and self.abs_filename ~= system.absolute_path(USERDIR .. PATHSEP .. "init.lua")
|
||||
and self.abs_filename ~= system.absolute_path(".lite_project.lua")
|
||||
then
|
||||
updatepress()
|
||||
end
|
||||
return on_text_change(self, type)
|
||||
end
|
||||
|
||||
2
.config/ml4w/cache/current_wallpaper.rasi
vendored
2
.config/ml4w/cache/current_wallpaper.rasi
vendored
|
|
@ -1 +1 @@
|
|||
* { current-image: url("/home/patrick/.config/ml4w/cache/blurred_wallpaper.png", height); }
|
||||
* { current-image: url("/home/patrick/.config/ml4w/assets/wallhaven1.png", height); }
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
* { border-radius: 2em; }
|
||||
* { border-radius: 1em; }
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
* { border-width: 3px; }
|
||||
* { border-width: 0px; }
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
3
|
||||
1
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
* {
|
||||
background: #152B39FF;
|
||||
background: #152B39DD; //Selection Background
|
||||
background-alt: #26385FFF;
|
||||
foreground: #C7CFE0FF;
|
||||
selected: #61AFEFFF;
|
||||
active: #98C379FF;
|
||||
urgent: #E06C75FF;
|
||||
color: #B7CCD9FF;
|
||||
color: #B7CCD9FF; //Text Color
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,10 +81,10 @@ mainbox {
|
|||
inputbar {
|
||||
enabled: true;
|
||||
spacing: 0em;
|
||||
padding: 5em;
|
||||
padding: 4em;
|
||||
children: [ "textbox-prompt-colon", "entry" ];
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/ml4w/cache/current_wallpaper", width);
|
||||
//background-image: url("~/.config/ml4w/cache/current_wallpaper", width);
|
||||
}
|
||||
|
||||
textbox-prompt-colon {
|
||||
|
|
@ -92,7 +92,7 @@ textbox-prompt-colon {
|
|||
expand: false;
|
||||
str: " ";
|
||||
padding: 1em 0.2em 0em 0em;
|
||||
text-color: @foreground;
|
||||
text-color: #152B39DD;
|
||||
border-radius: 2em 0em 0em 2em;
|
||||
background-color: @color5;
|
||||
background-image: url("~/.config/ml4w/cache/current_wallpaper", width);
|
||||
|
|
@ -104,7 +104,7 @@ entry {
|
|||
spacing: 1em;
|
||||
padding: 1em;
|
||||
background-color: @color5;
|
||||
text-color: @foreground;
|
||||
text-color: #152B39DD;
|
||||
cursor: text;
|
||||
placeholder: "Search";
|
||||
placeholder-color: inherit;
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
"cpu",
|
||||
"memory",
|
||||
"pulseaudio",
|
||||
"custom/notification",
|
||||
"clock",
|
||||
],
|
||||
// Modules configuration
|
||||
|
|
@ -20,7 +21,7 @@
|
|||
"disable-scroll": true,
|
||||
"disable-markup": false,
|
||||
"all-outputs": false,
|
||||
"format": "{name}",
|
||||
"format": "{id}",
|
||||
"persistent-workspaces": {
|
||||
"HDMI-A-1": [1, 2, 3, 4, 5],
|
||||
},
|
||||
|
|
@ -47,7 +48,7 @@
|
|||
// "format": "<span style=\"italic\">{}</span>",
|
||||
// },
|
||||
"tray": {
|
||||
"icon-size": 16,
|
||||
"icon-size": 24,
|
||||
"spacing": 4,
|
||||
},
|
||||
"clock": {
|
||||
|
|
@ -111,6 +112,26 @@
|
|||
"default": ["🔈️", "🔊"],
|
||||
},
|
||||
"on-click": "pavucontrol",
|
||||
},
|
||||
"custom/notification": {
|
||||
"tooltip": false,
|
||||
"format": "{icon}",
|
||||
"format-icons": {
|
||||
"notification": "<span foreground='red'><sup></sup></span>",
|
||||
"none": "",
|
||||
"dnd-notification": "<span foreground='red'><sup></sup></span>",
|
||||
"dnd-none": "",
|
||||
"inhibited-notification": "<span foreground='red'><sup></sup></span>",
|
||||
"inhibited-none": "",
|
||||
"dnd-inhibited-notification": "<span foreground='red'><sup></sup></span>",
|
||||
"dnd-inhibited-none": ""
|
||||
},
|
||||
"return-type": "json",
|
||||
"exec-if": "which swaync-client",
|
||||
"exec": "swaync-client -swb",
|
||||
"on-click": "swaync-client -t -sw",
|
||||
"on-click-right": "swaync-client -d -sw",
|
||||
"escape": true
|
||||
},
|
||||
// "custom/media": {
|
||||
// "format": "{icon} {}",
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@
|
|||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
min-height: 0;
|
||||
margin: 4px 0 0 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
|
|
@ -23,21 +24,29 @@ window#waybar {
|
|||
window#waybar.hidden {
|
||||
opacity: 0;
|
||||
}
|
||||
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
|
||||
|
||||
#workspaces {
|
||||
/* border: 1px solid red; */
|
||||
/* padding: 0.5rem 1.25rem 0.5rem 1rem; */
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
padding: 0 8px;
|
||||
/* background: transparent; */
|
||||
color: #ffffff;
|
||||
/* border-bottom: 3px solid transparent; */
|
||||
color: rgba(255, 255, 255, 0.3);
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
#workspaces button.focused {
|
||||
background: #64727d;
|
||||
border-bottom: 3px solid #ffffff;
|
||||
}
|
||||
/* #workspaces button.focused { */
|
||||
/* background: #64727d; */
|
||||
/* border-bottom: 3px solid #ffffff; */
|
||||
/* } */
|
||||
|
||||
#workspaces button.urgent {
|
||||
background-color: #eb4d4b;
|
||||
background-color: rgba(128,157,170, 0.8);
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
}
|
||||
|
||||
#mode {
|
||||
|
|
@ -158,6 +167,12 @@ tooltip label {
|
|||
color: #ffffff;
|
||||
}
|
||||
|
||||
#custom-notification {
|
||||
background: transparent;
|
||||
border: 2px solid rgba(154, 177, 187, 0.2);
|
||||
padding: 0.5rem 1.25rem 0.5rem 1rem;
|
||||
}
|
||||
|
||||
/* #idle_inhibitor {
|
||||
background-color: #2d3436;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue