Skip to content

Instantly share code, notes, and snippets.

View waimus's full-sized avatar

waimus waimus

View GitHub Profile
@waimus
waimus / dock-panel-toggle.sh
Created January 15, 2021 16:55
Toggle dash-to-dock extend panel height settings when run. Attach this script to a keyboard shortcut via GNOME settings for handy use. This script uses dconf.
# Retrieving current condition of the panel
isExtended=$(dconf read /org/gnome/shell/extensions/dash-to-dock/extend-height)
# Invert condition
if [ "$isExtended" = true ] ; then
dconf write /org/gnome/shell/extensions/dash-to-dock/extend-height false
else
dconf write /org/gnome/shell/extensions/dash-to-dock/extend-height true
fi
@waimus
waimus / userChrome.css
Last active February 9, 2021 23:56
waimus' Firefox CSS basic customization. Uses additional CSS file linked in the file.
/*https://www.userchrome.org/*/
/*more stuff at https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome*/
@import url("./window_control_placeholder_support.css"); /*from: https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/window_control_placeholder_support.css*/
@import url("./tabs_on_bottom.css"); /*from: https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/tabs_on_bottom.css*/
/*
Additional modification from external css above help to tweak the look better.
i.e:
@waimus
waimus / stylesheet.css
Last active April 4, 2021 12:06
Dash-to-Dock custom stylesheet. Featuring grey inner line and black outer line, like MacOS window edge style. And round every corner.
/* Shrink the dash by reducing padding */
#dashtodockContainer.shrink #dash,
#dashtodockContainer.dashtodock #dash {
border:1px;
padding:1px 0px 1px 0px;
}
#dashtodockContainer.shrink.left #dash,
#dashtodockContainer.dashtodock.left #dash {
border-left: 0px;
@waimus
waimus / userChrome.css
Last active May 2, 2024 22:50
Firefox CSS tabs toolbar auto hide.
/* tab bar auto hide */
@-moz-document url(chrome://browser/content/browser.xul),
url(chrome://browser/content/browser.xhtml) {
/* show tabs toolbar when navigator-toolbox gets hovered */
#main-window:not([customizing]) #navigator-toolbox:hover #TabsToolbar {
visibility: visible !important;
opacity: 1 !important;
margin-bottom: 0px;
transition: visibility 0.1s linear, opacity 0.1s linear, margin-bottom 0.1s linear;

Window Decoration Outline for GNOME/GTK apps

WARNING: This was only tested with GNOME 3.38. No plan on working around with GNOME 40+ and libadwaita.

This will add black and highlight outline to the window decoration for GNOME desktop/GTK apps, it will look similar to how MacOS windows edge look like. Should work well with Adwaita theme.

Screenshot (using AdwaitaEx theme)

screenshot

Rounded teriminal corner is not included, it is from https://github.com/owozsh/adwaita-rounded

@waimus
waimus / fake-commit.sh
Last active July 31, 2021 16:12
Fake commit. Wether you want to commit crime, war crime, or what is this example is doing.
#!/usr/bin/env bash
# Fake git commit message
# ------------- customize info here -------------
# Colours
RESET="\033[0m"
C1="\033[0;94m" # intense blue
C2="\033[0;34m" # blue
C3="\033[0;92m" # green
@waimus
waimus / userchrome.css
Created August 31, 2021 04:44
Firefox 91 GNOME Adwaita Theme: Container Color Circle on Tab Fix
/* firefox 91+ */
/* userchrome.css or tabsbar.css */
/* problem: using custom CSS theme such as Firefox Adwaita or WhiteSur put a circle in the tab if the tab opened in a container */
/* solution: */
/* create border that colored with container identifier */
.tabbrowser-tab[class*="identity-color-"] {
border-bottom: 3px solid var(--identity-icon-color) !important;
}
/* Create new container tab indicator */
@waimus
waimus / index.html
Last active October 8, 2021 15:57
Custom Firefox homepage.
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<style media="screen">
body {
background-color: rgb(28,24,32);
background-image: url(./images/back-blur.webp);
background-size: cover;
background-position: center;
@waimus
waimus / ffmpeg-cheatsheet.md
Last active January 7, 2023 07:06
FFMPEG cheatsheet. FFMPEG is magnificent but I don't.

FFMPEG Cheatsheet

personal cheat bookmark of ffmpeg commands I've used. I may only add new cheat whenever I duck-searched ffmpeg commands to use, which I don't use ffmpeg everyday.

Convert video to GIF

ffmpeg -ss 2 -t 9 -i input.mkv -vf "fps=10,scale=480:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop 0 output.gif

Retrieved from: https://superuser.com/questions/556029/how-do-i-convert-a-video-to-gif-using-ffmpeg-with-reasonable-quality

Trim video

ffmpeg -ss 00:01:00 -to 00:02:00 -i input.mp4 -c copy output.mp4

Retrieved from: https://stackoverflow.com/questions/18444194/cutting-the-videos-based-on-start-and-end-time-using-ffmpeg

@waimus
waimus / colourscheme.md
Last active May 2, 2022 16:23
Terminal colour scheme

waimus-dark

This colour scheme was based on an existing colour scheme but I forget what was it. I made this a long while ago.

Screenshot from 2022-05-02 23-00-55

No. Slot Dark Light
1 Black #2e3436 #555753
2 Red #d62020 #ed333b