Skip to content

Instantly share code, notes, and snippets.

Avatar
👨‍💻
Looking for work

John Mifsud imabuddha

👨‍💻
Looking for work
View GitHub Profile
View - README.md

Chrome theme manifest.json color props

more info: https://developer.chrome.com/docs/extensions/mv3/themes/

// Strings used by themes to identify colors in the JSON.
constexpr StringToIntTable kOverwritableColorTable[] = {
    {"frame", TP::COLOR_FRAME_ACTIVE},
    {"frame_inactive", TP::COLOR_FRAME_INACTIVE},
    {"frame_incognito", TP::COLOR_FRAME_ACTIVE_INCOGNITO},
View - README.md

Git push results in “Authentication Failed”

If you enabled two-factor authentication in your Github account you won't be able to push via HTTPS using your accounts password. Instead you need to generate a personal access token. This can be done in the application settings of your Github account. Using this token as your password should allow you to push to your remote repository via HTTPS. Use your username as usual.

https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/

You may also need to update the origin for your repository if set to https:

git remote -v 
@imabuddha
imabuddha / xsessionerrors
Last active Jan 23, 2021
Keep ~/.xsession-errors log file from growing too large. Place file in /etc/logrotate.d
View xsessionerrors
$HOME/.xsession-errors {
missingok
notifempty
size 1M
daily
rotate 3
}
@imabuddha
imabuddha / - README.md
Created Jan 18, 2021
awful.widget.watch use case examples from: https://awesomewm.org/recipes/watch/
View - README.md

iostat

-- disk I/O using iostat from sysstat utilities
local iotable = {}
local iostat = awful.widget.watch("iostat -dk", 2, -- in Kb, use -dm for Mb
    function(widget, stdout)
        for line in stdout:match("(sd.*)\n"):gmatch("(.-)\n") do
            local device, tps, read_s, wrtn_s, read, wrtn =
            line:match("(%w+)%s*(%d+,?%d*)%s*(%d+,?%d*)%s*(%d+,?%d*)%s*(%d+,?%d*)%s*(%d+,?%d*)")
 -- [1] [2] [3] [4] [5]
@imabuddha
imabuddha / theme.lua
Last active Jan 23, 2021
altered version of default awesome theme—place in ~/.config/awesome/themes/default/
View theme.lua
---------------------------
-- jdm awesome theme --
---------------------------
local theme_assets = require("beautiful.theme_assets")
local xresources = require("beautiful.xresources")
local gears = require("gears")
local dpi = xresources.apply_dpi
@imabuddha
imabuddha / rc.lua
Last active Jan 23, 2021
Awesome window manager config, place in ~/.config/awesome/
View rc.lua
-- jdm — customized awesome wnd mgr config
-- If LuaRocks is installed, make sure that packages installed through it are
-- found (e.g. lgi). If LuaRocks is not installed, do nothing.
pcall(require, "luarocks.loader")
-- prevent hotkeys_popup from showing tmux keys
package.loaded["awful.hotkeys_popup.keys.tmux"] = {}
-- Standard awesome library
@imabuddha
imabuddha / - README.md
Last active Jan 16, 2021
by default the Awesome window mgr doesn't run the programs in `~/.config/autostart`
View - README.md

Get Awesome to respect xdg/autostart

See also Arch Wiki for alternatives & other useful awesome tips.

Add the following to ~/.config/awesome/rc.lua:

local xresources_name = "awesome.started"
local xresources = awful.util.pread("xrdb -query")
if not xresources:match(xresources_name) then
@imabuddha
imabuddha / lightdm.conf
Last active Jan 14, 2021
Login Greeter & Session Cleanup — file location: /etc/lightdm/
View lightdm.conf
#
# General configuration
#
# start-default-seat = True to always start one seat if none are defined in the configuration
# greeter-user = User to run greeter as
# minimum-display-number = Minimum display number to use for X servers
# minimum-vt = First VT to run displays on
# lock-memory = True to prevent memory from being paged to disk
# user-authority-in-system-dir = True if session authority should be in the system location
# guest-account-script = Script to be run to setup guest account
@imabuddha
imabuddha / starship.toml
Last active Jan 13, 2021
Starship prompt config, place in ~/.config
View starship.toml
# Don't print a new line at the start of the prompt
add_newline = false
# Wait milliseconds for starship to check files under the current dir (default: 30)
scan_timeout = 10
[line_break]
disabled = true
[battery]
@imabuddha
imabuddha / - README.md
Created Jan 9, 2021
regarding system keychain not unlocking automatically
View - README.md

Regarding system keychain not always unlocking automatically upon login/screen unlock

This might be due to pkg accountsservice not being installed. Messages like the following were appearing in /var/log/messages:

lightdm[3572]: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files