Browse Source

Small QoL changes

master
Gürkan Gür 2 months ago
parent
commit
687ddbe5d8
  1. 3
      modules/config_files/tig
  2. 2
      modules/packages.nix
  3. 6
      modules/packages/wezterm.nix
  4. 11
      modules/scripts/git-browse-origin

3
modules/config_files/tig

@ -7,5 +7,8 @@ bind generic c !@sh -c "echo -n %(commit) | xclip -selection c"
# export current diff to a file
bind main x ?git format-patch -1 -N %(commit)
# copy web link to the clipboard
bind generic C !sh -c "git-browse-origin -s %(commit) | xclip -selection c"
# open commit in web browser
bind generic O !sh -c "git-browse-origin %(commit)"

2
modules/packages.nix

@ -67,7 +67,7 @@ in
home.packages = with pkgs;
# Conditionals first
(if sysconfig.networking.hostName == "innixos" || sysconfig.networking.hostName == "innodellix" then [
slack
unstable.slack
unstable.teams
gnome3.gnome-keyring # needed for teams, thanks MS
unstable.discord

6
modules/packages/wezterm.nix

@ -55,13 +55,13 @@ rustPlatform.buildRustPackage {
src = fetchFromGitHub {
owner = "wez";
repo = "wezterm";
rev = "c839aeb43176e46d6a8c682d0ef62cd160d2a77a";
rev = "9be0595164ea5b234a45691d68cecca22437979a";
fetchSubmodules = true;
sha256 = "0jr8kjasdy8dy4grnj4hdad507d17x12hwbqvqn6s71dd4walhj7";
sha256 = "0ww5x365gq0nz33xi3p6nmgpmf28372fy0m3dd2dmjd7ndsw2g9i";
};
# cargoSha256 = "0000000000000000000000000000000000000000000000000000";
cargoSha256 = "sha256-BFcDU88cfkMbqchteBA1RtPmCFVQDu4PHs3+UcZf0Ok=";
cargoSha256 = "sha256-rBc9jaIpVPTPCjJiQdAdgTJxtaFX+QjmRAria22/HK0=";
nativeBuildInputs = [
pkgconfig

11
modules/scripts/git-browse-origin

@ -1,7 +1,14 @@
#!/usr/bin/env @bash@/bin/bash
# Stolen from: https://github.com/Genki-S/dotfiles
COMMIT=$1
if [ "$1" = "-s" ]; then
# Just show
COMMIT=$2
TOOL=echo
else
COMMIT=$1
TOOL=firefox
fi
URL_BASE=`git config --get remote.origin.url | sed -e 's|git@|https://|' -e 's|:|/|g' -e 's|///|://|' -e 's|.git$||'`
@ -11,4 +18,4 @@ if [ -n "$COMMIT" ]; then
URL="$URL/commit/$COMMIT"
fi
firefox $URL
$TOOL $URL

Loading…
Cancel
Save