Skip to content

Instantly share code, notes, and snippets.

View imabuddha's full-sized avatar
👨‍💻
Looking for work

John Mifsud imabuddha

👨‍💻
Looking for work
  • Miyazaki, Japan
  • 21:19 (UTC +09:00)
View GitHub Profile

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},

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 January 23, 2021 08:54
Keep ~/.xsession-errors log file from growing too large. Place file in /etc/logrotate.d
$HOME/.xsession-errors {
missingok
notifempty
size 1M
daily
rotate 3
}
@imabuddha
imabuddha / - README.md
Created January 18, 2021 08:05
awful.widget.watch use case examples from: https://awesomewm.org/recipes/watch/

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 January 23, 2021 03:51
altered version of default awesome theme—place in ~/.config/awesome/themes/default/
---------------------------
-- 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 January 23, 2021 03:51
Awesome window manager config, place in ~/.config/awesome/
-- 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 January 16, 2021 09:21
by default the Awesome window mgr doesn't run the programs in `~/.config/autostart`

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 January 14, 2021 12:56
Login Greeter & Session Cleanup — file location: /etc/lightdm/
#
# 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 January 13, 2021 07:48
Starship prompt config, place in ~/.config
# 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 January 9, 2021 06:12
regarding system keychain not unlocking automatically

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