Skip to content

Instantly share code, notes, and snippets.

View VTimofeenko's full-sized avatar

Vladimir Timofeenko VTimofeenko

View GitHub Profile
@VTimofeenko
VTimofeenko / _Skype for Linux emoticon removal.md
Last active June 21, 2019 20:43
Removing "react" button from Skypeforlinux ebuild

Skype for Linux comes packaged as Electron application. The code describing client behavior is in file app.asar. This file can be edited after emerging to hide the "React" button, which can be done by calling an ebuild hook

Installation

  1. Create /etc/portage/bashrc with content from below
  2. Create /etc/portage/hooks/net-im/skypeforlinux/post-install with content from below
  3. emerge skypeforlinux

Troubleshooting

The hook logs its actions and saves a backup. In case skype does not start after this - replace app.asar with the backed up version.

@VTimofeenko
VTimofeenko / monitorshot2.sh
Last active January 27, 2020 21:03 — forked from naelstrof/monitorshot2.sh
Screenshot ctl: maim-based script to take a screenshot of current monitor, area or all monitors
#!/bin/sh
# mode can be:
# prtsc = do full screenshot of current screen, save to folder
# ctrl+prtsc = area-grab, to clipboard
# ctrl+shift+prtscr = area-grab, save
# win+prtsc = all screens, save
mode=$1
save_folder=$2
img_path=${save_folder}/$(date +"%b_%d_%H-%M-%S").png
maim_command="maim --hidecursor"
#!/bin/sh
# This script allows calling notify-send as root for it to appear on ${USERNAME}'s desktop
sudo -u ${USERNAME} DISPLAY=:0 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/${UID}/bus notify-send $@
#!/bin/sh
# A _very_ primitive telegram notification mechanism
# If you want something more sophisticated - check https://github.com/vysheng/tg
if [ -z "${1}" ]
then
message_text="Job's done!"
else
message_text=${1}
#!/bin/sh
# Records the screen and captures audio from running applications and the sounds IRL through microphone
# -i :0.0+0... may be used to specify the monitor that is being captured
# -f pulse -i ... can be taken from output of pactl list
ffmpeg -f x11grab \
-r 25 \
-s 1920x1080 \
-i :0.0+0,1080 \
-f pulse -i alsa_output.pci-0000_00_1b.0.analog-stereo.monitor \
#!/usr/bin/env bash
# As of Dec 16 2020 requires nitrocli built from otp cache branch:
# https://github.com/d-e-s-o/nitrocli/tree/topic/otp-cache
# Setup:
# Set the exported variables below
# Set NITROCLI_OTP_PATH to the location of nitrocli-otp-cache binary
export NITROCLI_BINARY="/usr/bin/nitrocli"
export NITROCLI_MODEL="storage"
export NITROCLI_VERBOSITY='10'
@VTimofeenko
VTimofeenko / ebuild.vimrc
Created January 13, 2021 02:48
Making vim-syntastic work with ebuilds
""" ebuild
augroup ebuild_vimrc
autocmd BufRead,BufNewFile *.ebuild set filetype=ebuild
" plugin
autocmd FileType ebuild
\ set statusline+=%#warningmsg# |
\ set statusline+=%{SyntasticStatuslineFlag()} |
\ set statusline+=%* |
\ let g:syntastic_sh_shellcheck_args = '-s bash -e "SC2034,SC2016,SC2191,SC2037"' |
\ let g:syntastic_always_populate_loc_list = 1 |
set -g default-terminal "tmux-256color"
set -sg escape-time 0
# ctrl-b to switch between windows
bind-key C-b last-window
# nested tmux sessions
bind-key a send-prefix
setw -g aggressive-resize on
@VTimofeenko
VTimofeenko / HOWTO.md
Last active March 29, 2024 20:41
Flake to check home-manager stuff in a nixos test driver
  1. nix build -L .\#checks.x86_64-linux.test.driverInteractive (or just nix run ... and skip 2.)
  2. ./result/bin/nixos-test-driver
  3. start_all()