From 174e0ed7e1c92bdcb0822cc521abee2adb8f76f3 Mon Sep 17 00:00:00 2001 From: Shihaam Abdul Rahman Date: Sat, 5 Feb 2022 23:50:00 +0500 Subject: [PATCH] bashrc --- config/bash/.bash_profile | 5 +++++ config/bash/bashrc | 42 +++++++++++++++++++++++++++++++++++++ config/i3/config | 3 ++- config/mpd/state | 6 ++++-- scripts/addvirtualsoundcard | 4 ++++ 5 files changed, 57 insertions(+), 3 deletions(-) create mode 100644 config/bash/.bash_profile create mode 100644 config/bash/bashrc create mode 100755 scripts/addvirtualsoundcard diff --git a/config/bash/.bash_profile b/config/bash/.bash_profile new file mode 100644 index 0000000..5545f00 --- /dev/null +++ b/config/bash/.bash_profile @@ -0,0 +1,5 @@ +# +# ~/.bash_profile +# + +[[ -f ~/.bashrc ]] && . ~/.bashrc diff --git a/config/bash/bashrc b/config/bash/bashrc new file mode 100644 index 0000000..84b0513 --- /dev/null +++ b/config/bash/bashrc @@ -0,0 +1,42 @@ +# +# ~/.bashrc +# +#start i3 if not running +#check if ssh +if [ "$SSH_TTY" = "" ] +then + #check if xinit running already + STARTX=$(ps -e | grep xinit | awk '{print $4}') + if [ "$STARTX" != "xinit" ] + then + startx ~/.config/X11/xinitrc + clear + fi +fi +# MPD daemon start (if no other user instance exists) +#[ ! -s ~/.config/mpd/pid ] && mpd + + +# If not running interactively, don't do anything +[[ $- != *i* ]] && return + +PS1='[\u@\h \W]\$ ' + +#path +PATH=$PATH:~/.scripts + +## Aliases +alias ls='ls --color=auto' +alias mv="mv -v" +alias rm="rm -v" +alias cp="cp -v" +alias ssh="kitty +kitten ssh" +alias mkdir="mkdir -pv" +#alias neofetch="neofetch --ascii_distro off" + +source ~/.local/share/blesh/ble.sh + +# BEGIN_KITTY_SHELL_INTEGRATION +if test -n "$KITTY_INSTALLATION_DIR" -a -e "$KITTY_INSTALLATION_DIR/shell-integration/bash/kitty.bash"; then source "$KITTY_INSTALLATION_DIR/shell-integration/bash/kitty.bash"; fi +# END_KITTY_SHELL_INTEGRATION + diff --git a/config/i3/config b/config/i3/config index e549cf6..41b0319 100644 --- a/config/i3/config +++ b/config/i3/config @@ -222,8 +222,9 @@ for_window [class="Nm-connection-editor" instance="nm-connection-editor"] floati #start programs exec telegram-desktop -exec picom +exec_always picom exec dunst +exec ~/.script/addvirtualsoundcard Virtual-Sound-Card exec systemctl --user start mpd exec --no-startup-id i3-msg 'workspace $ws1;exec i3-sensible-terminal ~/.scripts/run' exec --no-startup-id i3-msg 'workspace $ws9;exec i3-sensible-terminal ncmpcpp' diff --git a/config/mpd/state b/config/mpd/state index 8f715fd..b23cb2f 100644 --- a/config/mpd/state +++ b/config/mpd/state @@ -1,7 +1,9 @@ -sw_volume: 42 +sw_volume: 0 audio_device_state:1:Visualizer feed audio_device_state:1:pulse audio -state: stop +state: play +current: 11 +time: 119.944000 random: 0 repeat: 0 single: 0 diff --git a/scripts/addvirtualsoundcard b/scripts/addvirtualsoundcard new file mode 100755 index 0000000..c450e7a --- /dev/null +++ b/scripts/addvirtualsoundcard @@ -0,0 +1,4 @@ +#!/bin/bash + +pacmd load-module module-null-sink sink_name=$1 sink_properties=device.description=$1 +pacmd set-default-sink $1