From a22fb4cd71a926e930646be021190e4c7cd11d52 Mon Sep 17 00:00:00 2001 From: Simon Date: Sun, 1 Dec 2024 12:30:15 -0500 Subject: [PATCH] general update --- Scripts/fortune_tree.sh | 5 +++++ Scripts/i3blocks_volume | 7 +++++++ Scripts/lock | 6 ++++++ conky.conf | 3 ++- i3blocks.conf | 5 +++-- i3config | 38 +++++++++++++++++++------------------- 6 files changed, 42 insertions(+), 22 deletions(-) create mode 100755 Scripts/fortune_tree.sh create mode 100755 Scripts/i3blocks_volume create mode 100755 Scripts/lock diff --git a/Scripts/fortune_tree.sh b/Scripts/fortune_tree.sh new file mode 100755 index 0000000..de6ac2c --- /dev/null +++ b/Scripts/fortune_tree.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +text=$(fortune) + +cbonsai -lp -L 50 -m "$text" diff --git a/Scripts/i3blocks_volume b/Scripts/i3blocks_volume new file mode 100755 index 0000000..84da634 --- /dev/null +++ b/Scripts/i3blocks_volume @@ -0,0 +1,7 @@ +#!/bin/bash + +if [ "$(pactl get-sink-mute @DEFAULT_SINK@)" = "Mute: yes" ]; then + echo "vol: mute" +else + echo "vol: $(pactl get-sink-volume @DEFAULT_SINK@ | awk '{printf "%s", substr($5, 1, length($5) - 1)}')" +fi diff --git a/Scripts/lock b/Scripts/lock new file mode 100755 index 0000000..89a0a0e --- /dev/null +++ b/Scripts/lock @@ -0,0 +1,6 @@ +#!/bin/bash +TMPBG=/tmp/screen.png +scrot /tmp/screen.png +magick $TMPBG -scale 10% -scale 1000% $TMPBG +i3lock -u -i $TMPBG +rm /tmp/screen.png diff --git a/conky.conf b/conky.conf index f96f3eb..85b38cd 100644 --- a/conky.conf +++ b/conky.conf @@ -57,7 +57,8 @@ conky.config = { -- Variables: https://conky.cc/variables conky.text = [[ -${color grey}$color ${scroll 40 :) computers are awesome! aw yeah} +${color grey}$color ${scroll 40 sup /wg/} +# ${color grey}$color ${scroll 40 :) computers are awesome! aw yeah} $hr ${color grey}Uptime:$color $uptime # ${color grey}Frequency (in MHz):$color $freq diff --git a/i3blocks.conf b/i3blocks.conf index 99fd0f5..8d041cb 100644 --- a/i3blocks.conf +++ b/i3blocks.conf @@ -17,8 +17,9 @@ interval=once color=#c0caf5 [volume] -# command=echo "vol: $(pactl get-sink-volume @DEFAULT_SINK@ | awk '{printf "%s", substr($5, 1, length($5) - 1)}')" -command=echo "vol: $(wpctl get-volume 50 | awk '{print $2*100}')" +command=i3blocks_volume +# echo "vol: $(pactl get-sink-volume @DEFAULT_SINK@ | awk '{printf "%s", substr($5, 1, length($5) - 1)}')" +# command=echo "vol: $(wpctl get-volume 50 | awk '{print $2*100}')" signal=10 interval=once color=#c0caf5 diff --git a/i3config b/i3config index ae49080..e3fe28f 100644 --- a/i3config +++ b/i3config @@ -10,11 +10,11 @@ set $mod Mod4 font pango:Source Code Pro 16 # Use pactl to adjust volume in PulseAudio. -set $refresh_i3status killall -SIGUSR1 i3status -bindsym XF86AudioRaiseVolume exec --no-startup-id wpctl set-volume 50 5%+ && pkill -SIGRTMIN+10 i3blocks -bindsym XF86AudioLowerVolume exec --no-startup-id wpctl set-volume 50 5%- && pkill -SIGRTMIN+10 i3blocks -bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && pkill -SIGRTMIN+10 i3blocks -bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && pkill -SIGTRMIN+10 i3blocks +#set $refresh_i3status killall -SIGUSR1 i3status +bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5% && pkill -SIGRTMIN+10 i3blocks +bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5% && pkill -SIGRTMIN+10 i3blocks +bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && pkill -SIGRTMIN+10 i3blocks +bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && pkill -SIGRTMIN+10 i3blocks # Use Mouse+$mod to drag floating windows to their wanted position floating_modifier $mod @@ -33,10 +33,10 @@ bindsym $mod+Shift+q kill bindsym $mod+d exec rofi -show run -theme 'theme.rasi' # change focus -bindsym $mod+j focus left -bindsym $mod+k focus down -bindsym $mod+l focus up -bindsym $mod+semicolon focus right +bindsym $mod+h focus left +bindsym $mod+j focus down +bindsym $mod+k focus up +bindsym $mod+l focus right # alternatively, you can use the cursor keys: bindsym $mod+Left focus left @@ -45,10 +45,10 @@ bindsym $mod+Up focus up bindsym $mod+Right focus right # move focused window -bindsym $mod+Shift+j move left -bindsym $mod+Shift+k move down -bindsym $mod+Shift+l move up -bindsym $mod+Shift+semicolon move right +bindsym $mod+Shift+h move left +bindsym $mod+Shift+j move down +bindsym $mod+Shift+k move up +bindsym $mod+Shift+l move right # alternatively, you can use the cursor keys: bindsym $mod+Shift+Left move left @@ -57,10 +57,10 @@ bindsym $mod+Shift+Up move up bindsym $mod+Shift+Right move right # split in horizontal orientation -bindsym $mod+h split h +# bindsym $mod+Shift+h split h # split in vertical orientation -bindsym $mod+v split v +# bindsym $mod+v split v # enter fullscreen mode for the focused container bindsym $mod+f fullscreen toggle @@ -137,10 +137,10 @@ mode "resize" { # Pressing right will grow the window’s width. # Pressing up will shrink the window’s height. # Pressing down will grow the window’s height. - bindsym j resize shrink width 10 px or 10 ppt - bindsym k resize grow height 10 px or 10 ppt - bindsym l resize shrink height 10 px or 10 ppt - bindsym semicolon resize grow width 10 px or 10 ppt + bindsym h resize shrink width 10 px or 10 ppt + bindsym j resize grow height 10 px or 10 ppt + bindsym k resize shrink height 10 px or 10 ppt + bindsym l resize grow width 10 px or 10 ppt # same bindings, but for the arrow keys bindsym Left resize shrink width 10 px or 10 ppt