Compare commits
	
		
			8 Commits
		
	
	
		
			4fd1cc8d31
			...
			464d2a6a25
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 464d2a6a25 | |||
| 00c69cb17c | |||
| 70c89479ad | |||
| 1502bfe4b0 | |||
| ab53be3749 | |||
| c9e3e7ae53 | |||
| ccf2897cb8 | |||
| 7e3c5f1a73 | 
@@ -1,9 +1,14 @@
 | 
				
			|||||||
#!/usr/bin/env bash
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
echo "Entourage: $XDG_RUNTIME_DIR - $DWL_TAGS_FILE" >> $DWL_LOG_FILE
 | 
					function log_this() {
 | 
				
			||||||
 | 
					    TSTMP=$(date)
 | 
				
			||||||
 | 
					    echo "$TSTMP : " $1 >> $DWL_LOG_FILE
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
NUM_DISPS=$(wlr-randr | egrep "^\w+" | wc -l)
 | 
					log_this "Entourage: $XDG_RUNTIME_DIR - $DWL_TAGS_FILE"
 | 
				
			||||||
echo "Entourage: Configuring ${NUM_DISPS} displays" >> $DWL_LOG_FILE
 | 
					
 | 
				
			||||||
 | 
					NUM_DISPS=$(wlr-randr | grep -E "^\w+" | wc -l)
 | 
				
			||||||
 | 
					log_this "Entourage: Configuring ${NUM_DISPS} displays"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [[ $NUM_DISPS > 1 ]]; then
 | 
					if [[ $NUM_DISPS > 1 ]]; then
 | 
				
			||||||
    # Dual screen
 | 
					    # Dual screen
 | 
				
			||||||
@@ -21,39 +26,11 @@ fi
 | 
				
			|||||||
# ----------------------------------------------------------
 | 
					# ----------------------------------------------------------
 | 
				
			||||||
while [ ! -e "$XDG_RUNTIME_DIR/wayland-0.lock" ]
 | 
					while [ ! -e "$XDG_RUNTIME_DIR/wayland-0.lock" ]
 | 
				
			||||||
do
 | 
					do
 | 
				
			||||||
    echo "DWL getting ready..." >> $DWL_LOG_FILE
 | 
					    log_this "DWL getting ready..."
 | 
				
			||||||
    sleep 1
 | 
					    sleep 1
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
echo "DWL ready!" >> $DWL_LOG_FILE
 | 
					log_this "DWL ready!"
 | 
				
			||||||
echo "Entourage: " $DWL_TAGS_FILE >> $DWL_LOG_FILE
 | 
					log_this "Entourage: $DWL_TAGS_FILE"
 | 
				
			||||||
 | 
					 | 
				
			||||||
if [ -e /usr/local/bin/somebar ]; then
 | 
					 | 
				
			||||||
    dbus-run-session /usr/local/bin/somebar > $XDG_RUNTIME_DIR/somebar.log &
 | 
					 | 
				
			||||||
    (sleep 2 && conky -c ~/.conkyrc > $XDG_RUNTIME_DIR/somebar-0) &
 | 
					 | 
				
			||||||
    echo "Entourage: Started somebar " >> $DWL_LOG_FILE
 | 
					 | 
				
			||||||
else
 | 
					 | 
				
			||||||
    DISPLAYS=$(wlr-randr | perl -ne 'print "$1 " if /^([\w-]+)/')
 | 
					 | 
				
			||||||
    DISP_NUM=$(expr 0)
 | 
					 | 
				
			||||||
    for DISP in $DISPLAYS; do
 | 
					 | 
				
			||||||
        DISP_NUM=$(expr $DISP_NUM + 1)
 | 
					 | 
				
			||||||
        TF=${DWL_TAGS_FILE}.${DISP}
 | 
					 | 
				
			||||||
        # ----------------------------------------------------------
 | 
					 | 
				
			||||||
        # Top bar for displaying DWL tags
 | 
					 | 
				
			||||||
        # ----------------------------------------------------------
 | 
					 | 
				
			||||||
        # Dependency - needs inotify-tools package
 | 
					 | 
				
			||||||
        echo "Entourage: Monitor - ${DISP_NUM} ${DISP}, new tags file " ${TF} >> $DWL_LOG_FILE
 | 
					 | 
				
			||||||
        touch ${TF}
 | 
					 | 
				
			||||||
        inotifywait -q -m -e close_write ${TF} |
 | 
					 | 
				
			||||||
            (cat ${TF} ;
 | 
					 | 
				
			||||||
            while read -r filename event; do
 | 
					 | 
				
			||||||
                cat ${TF}
 | 
					 | 
				
			||||||
            done) | dtao -z -z -xs ${DISP_NUM} -ta l -tw 100 -expand r -h 22 -fn 'Iosevka:style=Regular:size=12' &
 | 
					 | 
				
			||||||
        # ----------------------------------------------------------
 | 
					 | 
				
			||||||
        # Bottom bar for displaying context information
 | 
					 | 
				
			||||||
        # ----------------------------------------------------------
 | 
					 | 
				
			||||||
        (conky -c ~/.conkyrc) | dtao -xs ${DISP_NUM} -ta r -tw 100 -expand l -h 22 -fn 'Iosevka:style=Regular:size=12' &
 | 
					 | 
				
			||||||
    done
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
# ----------------------------------------------------------
 | 
					# ----------------------------------------------------------
 | 
				
			||||||
# Background
 | 
					# Background
 | 
				
			||||||
@@ -64,13 +41,22 @@ fi
 | 
				
			|||||||
# ----------------------------------------------------------
 | 
					# ----------------------------------------------------------
 | 
				
			||||||
# Lock when idle
 | 
					# Lock when idle
 | 
				
			||||||
# ----------------------------------------------------------
 | 
					# ----------------------------------------------------------
 | 
				
			||||||
 | 
					log_this "Entourage: Starting screen locker with 10min idle time"
 | 
				
			||||||
swayidle -w timeout 600 swaylock &
 | 
					swayidle -w timeout 600 swaylock &
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# ----------------------------------------------------------
 | 
					# ----------------------------------------------------------
 | 
				
			||||||
# Redirect STDIN to STDOUT and pass along to tags script
 | 
					# Redirect STDIN to STDOUT and pass along to tags script
 | 
				
			||||||
# ----------------------------------------------------------
 | 
					# ----------------------------------------------------------
 | 
				
			||||||
 | 
					BAR_PATH=/usr/local/bin/somebar
 | 
				
			||||||
 | 
					# BAR_PATH=/home/mahesh/git/somebar_20231001/build/somebar
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export SOMEBAR_FIFO=$XDG_RUNTIME_DIR/somebar.fifo
 | 
				
			||||||
 | 
					mkfifo $SOMEBAR_FIFO -m666
 | 
				
			||||||
 | 
					log_this "Entourage: Starting somebar using $SOMEBAR_FIFO"
 | 
				
			||||||
 | 
					conky -c ~/.conkyrc > $SOMEBAR_FIFO &
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(while read line
 | 
					(while read line
 | 
				
			||||||
do
 | 
					do
 | 
				
			||||||
    echo $line
 | 
					    echo $line
 | 
				
			||||||
done) | dwltags.pl --file $DWL_TAGS_FILE
 | 
					done) | ($BAR_PATH -s $SOMEBAR_FIFO > $XDG_RUNTIME_DIR/somebar.log 2>&1)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -36,6 +36,7 @@ Environment=XDG_RUNTIME_DIR=%I
 | 
				
			|||||||
Environment=DWL_TAGS_FILE=%I/dwl.tags
 | 
					Environment=DWL_TAGS_FILE=%I/dwl.tags
 | 
				
			||||||
Environment=DWL_LOG_FILE=%I/dwl.log
 | 
					Environment=DWL_LOG_FILE=%I/dwl.log
 | 
				
			||||||
Environment=DWLTAGS_FMT=DZEN
 | 
					Environment=DWLTAGS_FMT=DZEN
 | 
				
			||||||
 | 
					Environment=PIPEWIRE_RUNTIME_DIR=/run/user/501
 | 
				
			||||||
ExecStart=%h/bin/dwl.session
 | 
					ExecStart=%h/bin/dwl.session
 | 
				
			||||||
Restart=on-failure
 | 
					Restart=on-failure
 | 
				
			||||||
RestartSec=1
 | 
					RestartSec=1
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										26
									
								
								dwl_act
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										26
									
								
								dwl_act
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,26 @@
 | 
				
			|||||||
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					act=$1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					echo  "$0 - $act" >> ~/dwl_key_act.log
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# In Wayland, use the following like X11's xev:
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					#  % wev | grep "sym"
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					case $act in
 | 
				
			||||||
 | 
					    vol_mute)       wpctl set-mute               @DEFAULT_AUDIO_SINK@ toggle;;
 | 
				
			||||||
 | 
					    vol_lower)      wpctl set-volume --limit 1.0 @DEFAULT_AUDIO_SINK@ 10%-;;
 | 
				
			||||||
 | 
					    vol_raise)      wpctl set-volume --limit 1.0 @DEFAULT_AUDIO_SINK@ 10%+;;
 | 
				
			||||||
 | 
					    # mic_mute)       ;;
 | 
				
			||||||
 | 
					    # bright_low)     ;;
 | 
				
			||||||
 | 
					    # bright_high)    ;;
 | 
				
			||||||
 | 
					    # disp)           ;;
 | 
				
			||||||
 | 
					    # wlan)           ;;
 | 
				
			||||||
 | 
					    # tools)          ;;
 | 
				
			||||||
 | 
					    # search)         ;;
 | 
				
			||||||
 | 
					    # launch)         ;;
 | 
				
			||||||
 | 
					    # explore)        ;;
 | 
				
			||||||
 | 
					    *)              echo "Unknown action '$act'";;
 | 
				
			||||||
 | 
					esac
 | 
				
			||||||
@@ -42,6 +42,7 @@ require("lazy").setup({
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        'nvim-telescope/telescope-fzf-native.nvim',
 | 
					        'nvim-telescope/telescope-fzf-native.nvim',
 | 
				
			||||||
 | 
					        -- build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build'
 | 
				
			||||||
        build = 'make'
 | 
					        build = 'make'
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
@@ -116,7 +117,8 @@ require('onedark').load()
 | 
				
			|||||||
-- See `:help vim.o`
 | 
					-- See `:help vim.o`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if vim.g.neovide then
 | 
					if vim.g.neovide then
 | 
				
			||||||
    vim.o.guifont = "Iosevka Term:h16"
 | 
					    vim.o.guifont = "Iosevka Term:h12"
 | 
				
			||||||
 | 
					    vim.g.neovide_scale_factor = 1.0
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- Set highlight on search
 | 
					-- Set highlight on search
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -94,15 +94,14 @@ require('packer').startup(function(use)
 | 
				
			|||||||
            'williamboman/mason-lspconfig.nvim',
 | 
					            'williamboman/mason-lspconfig.nvim',
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            -- Useful status updates for LSP
 | 
					            -- Useful status updates for LSP
 | 
				
			||||||
            {'j-hui/fidget.nvim', branch = 'legacy'},
 | 
					 | 
				
			||||||
            use {
 | 
					            use {
 | 
				
			||||||
              'j-hui/fidget.nvim',
 | 
					                'j-hui/fidget.nvim',
 | 
				
			||||||
              tag = 'legacy',
 | 
					                tag = 'legacy',
 | 
				
			||||||
              config = function()
 | 
					                config = function()
 | 
				
			||||||
                require("fidget").setup {
 | 
					                    require("fidget").setup {
 | 
				
			||||||
                  -- options
 | 
					                    -- options
 | 
				
			||||||
                }
 | 
					                    }
 | 
				
			||||||
              end,
 | 
					                end,
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@@ -177,7 +176,8 @@ vim.api.nvim_create_autocmd('BufWritePost', {
 | 
				
			|||||||
-- See `:help vim.o`
 | 
					-- See `:help vim.o`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if vim.g.neovide then
 | 
					if vim.g.neovide then
 | 
				
			||||||
    vim.o.guifont = "Iosevka Term:h16"
 | 
					    vim.o.guifont = "Iosevka Term:h12"
 | 
				
			||||||
 | 
					    vim.g.neovide_scale_factor = 1.0
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- Set highlight on search
 | 
					-- Set highlight on search
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -46,7 +46,7 @@ ${if_existing /sys/class/net/wlp4s0/operstate up}📶 ${addr wlp4s0}${else}\
 | 
				
			|||||||
${if_up eth0}🌎 ${addr eth0}${else}\
 | 
					${if_up eth0}🌎 ${addr eth0}${else}\
 | 
				
			||||||
network down ${endif}${endif}${endif} \
 | 
					network down ${endif}${endif}${endif} \
 | 
				
			||||||
${execi 600 curl 'wttr.in/~45.54,-122.83?u&format=%c%t'} \
 | 
					${execi 600 curl 'wttr.in/~45.54,-122.83?u&format=%c%t'} \
 | 
				
			||||||
🔊 ${execi 10 amixer get Master | tail -1 | sed 's/.*\[\([0-9]*%\)\].*/\1/'} \
 | 
					🔊 ${execi 10 wpctl get-volume 54 | tail -1 | perl -ne 'm/([\d\.]+)/; print scalar (($1>1) ? 100 : ($1*100))'} \
 | 
				
			||||||
🔋 ${battery_percent}% \
 | 
					🔋 ${battery_percent}% \
 | 
				
			||||||
📅 ${time %Y %h %d} \
 | 
					📅 ${time %Y %h %d} \
 | 
				
			||||||
🕑 ${time %I:%M%p %Z}
 | 
					🕑 ${time %I:%M%p %Z}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user