Skip to content

Instantly share code, notes, and snippets.

View siddhpant's full-sized avatar
😵‍💫
brain: too many context switches

Siddh Raman Pant siddhpant

😵‍💫
brain: too many context switches
View GitHub Profile
@siddhpant
siddhpant / userChrome.css
Created October 27, 2020 14:52
Firefox's userChrome.css for some tweaks, viz., show bookmarks bar and no address bar enlargement
/*
Show bookmarks on address bar focus (and thus show automatically when a new tab opens)
From https://superuser.com/a/1520406
Original source https://www.reddit.com/r/FirefoxCSS/comments/emzoi0/show_bookmarks_bar_only_in_new_tab_page/feme6yv/
*/
#nav-bar:not(:focus-within) + #PersonalToolbar:not(:hover):not(:focus-within):not([customizing]) { visibility: collapse; }
/*
@siddhpant
siddhpant / force_adwaita_soffice.sh
Last active March 25, 2022 12:14
Force light theme on Libreoffice
#!/bin/bash
# Exit when any command fails
set -e
# Check for sudo/root
if [ "$EUID" -ne 0 ]
then echo "Run this script with superuser privileges!"
echo "This is because it needs access to /usr/lib/libreoffice/program/soffice"
exit 1
@siddhpant
siddhpant / base.user.css
Created October 2, 2020 15:49
Typora change page margins on PDF export
@media print {
#write{
max-width: 100%;
}
@page {
size: A4;
margin-left: 0;
margin-right: 0;
}
}
@siddhpant
siddhpant / .gitconfig
Created October 1, 2020 14:30
git squash alias
[alias]
squash = "!f(){ git reset --soft HEAD~${1} && git commit --edit -m\"$(git log --format=%B --reverse HEAD..HEAD@{1})\"; };f"
@siddhpant
siddhpant / shot.sh
Last active March 25, 2022 12:14
SDDM login screen screenshot
TMPXAUTHORITY=$(ls /var/run/sddm/*)
sleep 15
DISPLAY=:0 XAUTHORITY=$TMPXAUTHORITY xwd -root > "/home/$USER/Desktop/greeter.xwd"
convert "/home/$USER/Desktop/greeter.xwd" "/home/$USER/Desktop/login_screen.png"
rm "/home/$USER/Desktop/greeter.xwd"
@siddhpant
siddhpant / Anaconda.sublime-settings
Last active March 25, 2022 12:14
User setttings for Sublime Text
{
"anaconda_linting": false
}