diff --git a/arch-setup/packages.rice b/arch-setup/packages.rice index 2073744a..f5cd6419 100644 --- a/arch-setup/packages.rice +++ b/arch-setup/packages.rice @@ -49,3 +49,4 @@ hicolor-icon-theme libexif libxft udevil +redshift diff --git a/config.env.def b/config.env.def index dcc0a86a..13271677 100644 --- a/config.env.def +++ b/config.env.def @@ -2,13 +2,14 @@ #!/bin/sh -export ETH_IT=enp3s0f0 -export WLAN_IT=wlp0s20u7 -export TEMP_ZONE=/sys/class/thermal/thermal_zone0/temp -export NO_BAT=true +export ETH_IT=enp2s0 +export WLAN_IT=wlp3s0 +export TEMP_ZONE=/sys/class/thermal/thermal_zone4/temp +export NO_BAT=false export NEXTCLOUD=false export MCONNECT=true export MCONNECT_DEVICE=/org/mconnect/device/0 export LOCATION=ankara export ACTIVITYWATCH=false -export FIREFOX_PROFILE=f9atsu8e.default-release +export FIREFOX_PROFILE=a1lv19vn.default-release +export LATLONG="39.92:32.85" diff --git a/config/X11/xinitrc b/config/X11/xinitrc index 53a6c1d7..4c60fec0 100755 --- a/config/X11/xinitrc +++ b/config/X11/xinitrc @@ -66,6 +66,9 @@ xset dpms 600 600 600 $BROWSER & pass 2> /dev/null > /dev/null && qtpass & +redshift -x 2> /dev/null > /dev/null +redshift -r -l "$LATLONG" > /dev/null 2> /dev/null & + touch ~/.cache/dwm-restart while [ -f /home/yigit/.cache/dwm-restart ]; do diff --git a/config/zsh/cmds b/config/zsh/cmds index 32994943..4fe0c546 100644 --- a/config/zsh/cmds +++ b/config/zsh/cmds @@ -83,13 +83,13 @@ tmate-attach() { tmate-pair() { - if [ -z "$TMATE_API_KEY" ]; then + if [ -z "$(pass show "AppPass/tmate.com/api-key")" ]; then echo "You need an api key." return fi if [ ! -e "$TMATE_SOCKET_LOCATION" ]; then - tmate -k $TMATE_API_KEY -r "sharedProgramming" -S "$TMATE_SOCKET_LOCATION" -f "$HOME/.tmate.conf" new-session -d -s "$TMATE_PAIR_NAME" + tmate -k $(pass show "AppPass/tmate.com/api-key") -r "sharedProgramming" -S "$TMATE_SOCKET_LOCATION" -f "$HOME/.tmate.conf" new-session -d -s "$TMATE_PAIR_NAME" tmate -S $TMATE_SOCKET_LOCATION display -p '#{tmate_ssh_ro}' while [ -z "$url" ]; do diff --git a/local/bin/status-bar/redshift b/local/bin/status-bar/redshift new file mode 100755 index 00000000..deb494bb --- /dev/null +++ b/local/bin/status-bar/redshift @@ -0,0 +1,24 @@ +#!/bin/bash + +source $HOME/.config.env + +pid=$(pidof redshift) + +case $BLOCK_BUTTON in + 1) + redshift -x + if [ ! "$pid" = "" ]; then + kill -9 $pid + redshift -x + pid="" + else + redshift -r -l "$LATLONG" > /dev/null 2> /dev/null & + pid="1" + fi;; +esac + +if [ "$pid" = "" ]; then + echo "^c#ebcb8b^^d^" +else + echo "^c#ebcb8b^^d^" +fi diff --git a/profile b/profile index 1394c6df..b674e7d6 100755 --- a/profile +++ b/profile @@ -4,7 +4,6 @@ export QT_QPA_PLATFORMTHEME="qt5ct" export _JAVA_AWT_WM_NONREPARENTING=1 export AWT_TOOLKIT=MToolkit -export TMATE_API_KEY=$(pass show AppPass/tmate.com/api-key) # Environment variables export SHELL=/bin/zsh diff --git a/suckless/dwm/rules.h b/suckless/dwm/rules.h index 138c4e86..d9c17732 100644 --- a/suckless/dwm/rules.h +++ b/suckless/dwm/rules.h @@ -12,6 +12,7 @@ static const Rule rules[] = { RULE(.class = "tabbed-surf", .tags = 1 << 1) RULE(.class = "bitwarden", .tags = 1 << 6) RULE(.class = "QtPass", .tags = 1 << 6) + RULE(.class = "qtpass", .tags = 1 << 6) RULE(.class = "Bitwarden", .tags = 1 << 6) RULE(.class = "Mailspring", .tags = 1 << 7) RULE(.class = "Thunderbird", .tags = 1 << 7) diff --git a/suckless/dwmblocks/config.h b/suckless/dwmblocks/config.h index 9afff925..a61687ce 100644 --- a/suckless/dwmblocks/config.h +++ b/suckless/dwmblocks/config.h @@ -7,6 +7,7 @@ static Block blocks[] = { { "", PATH("dunst"), 120, 18}, { "", PATH("mail"), 120, 23}, { "", PATH("keyboard"), 120, 24}, + { "", PATH("redshift"), 120, 29}, { "", PATH("mpc"), 240, 29}, { "", PATH("bluetooth"), 120, 26}, { "", PATH("mconnect"), 120, 20},