Skip to content

Instantly share code, notes, and snippets.

@Roy-Orbison
Roy-Orbison / maestral-open-dropbox.sh
Last active October 10, 2023 06:36
Simple link from Dolphin file manager to file/folder on Dropbox.com using Maestral GUI under KDE. The .desktop file goes under `~/.local/share/kio/servicemenus/` and the script should be anywhere in your PATH, I used `~/.local/bin/`. Script depends on realpath, xdg-open, notify-send, and of course maestral.
#!/bin/bash
if maestral status | grep -qFi 'not running'; then
err='Maestral not running'
elif ! droot="`maestral config get path`"; then
err='Maestral not found'
elif ! real="`realpath -eLPq "$1"`"; then
err='Path does not exist'
elif [[ ${#real} -le ${#droot} || "${real:0:${#droot}}" != "$droot" ]]; then
err="The path $real is not below the Dropbox root directory $droot"
else
@Roy-Orbison
Roy-Orbison / scss.ctags
Last active June 22, 2022 01:26 — forked from dreki/scss-rules-for-ctags
SCSS rules for universal ctags
# Copyright 2019 Roy-Orbison
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
@Roy-Orbison
Roy-Orbison / userChrome.css
Last active August 4, 2026 02:23
Restore the "browser.tabs.closeButtons" user preference (except value 3).
/*
* See https://kb.mozillazine.org/Browser.tabs.closeButtons
* 0 is new Firefox default, 3 not possible in CSS alone.
*/
@media -moz-pref('browser.tabs.closeButtons', 1) {
#tabbrowser-tabs[closebuttons="activetab"][orient="horizontal"] .tab-close-button:not([selected], [pinned]) {
display: inline-flex !important;
}
}
@media -moz-pref('browser.tabs.closeButtons', 2) {