aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRatakor <ratakor@disroot.org>2023-07-11 19:50:16 +0200
committerRatakor <ratakor@disroot.org>2023-07-11 19:50:16 +0200
commitf9b1fb4a3f82525f964a3b3a5f904d193b2761a5 (patch)
treeccbbc0c8cd4098072688145f3e63d99c82571938
parentc59e9a4dbbbe7269888806a3e72ce654fb8ead04 (diff)
Swap dwmblocks to sb
Add update in crontab so the time in sb is accurate.
-rwxr-xr-x.local/bin/battery2
-rwxr-xr-x.local/bin/music16
-rwxr-xr-x.local/bin/musiccmd8
-rwxr-xr-x[-rw-r--r--].local/bin/plumber0
-rw-r--r--.local/etc/crontab3
-rw-r--r--.local/etc/dwmblocks/config17
-rw-r--r--.local/etc/mpv/music/local.lua2
-rw-r--r--.local/etc/mpv/music/online.lua2
-rw-r--r--.local/etc/nvim/basics.vim4
-rw-r--r--.local/etc/sb/config17
-rwxr-xr-x.local/etc/sx/sxrc4
-rw-r--r--.local/etc/sxhkd/sxhkdrc8
-rw-r--r--.local/etc/zsh/aliasrc5
-rw-r--r--.local/share/packages9
-rw-r--r--README.md17
15 files changed, 55 insertions, 59 deletions
diff --git a/.local/bin/battery b/.local/bin/battery
index 9c421fa..4eb547c 100755
--- a/.local/bin/battery
+++ b/.local/bin/battery
@@ -58,5 +58,5 @@ else
esac
fi
-kill -39 $(pidof dwmblocks)
+kill -38 $(pidof sb)
env HERBE_ID=/battery herbe "$ICON $CAPACITY% $STATUS"
diff --git a/.local/bin/music b/.local/bin/music
index 6a68f88..835d5b0 100755
--- a/.local/bin/music
+++ b/.local/bin/music
@@ -1,17 +1,7 @@
#!/bin/sh
-# . :-. .
-# author: ratakor <ratakor@disroot.org> :*==*%%%#%+=---:
-# :#%%%*+%#=+%*:.
-# created: Sat, 06 May 2023 18:44:52 +0200 :%%%. . -*%-
-# updated: Sat, 13 May 2023 15:22:42 +0200 =## . :#%*=:.
-# -#*#%:=#%%%#-
-# description: *:*%%%%%%%#-
-# simple music selector with dmenu that uses and .-#%%%%%%+
-# interacts with mpv. have a look at musiccmd, %%%--%%%%*-
-# dwmblocks/sb_music and .local/etc/mpv/music ;) ##%= +%%=:..
-# #* #%#
-# :# -==*
-# shellcheck disable=SC2012 # :: .:
+# Simple music selector with dmenu that uses and interacts with mpv.
+# Have a look at musiccmd, .local/etc/mpv/music and sb (statusbar)
+# shellcheck disable=SC2012
MUSICDIR="${XDG_MUSIC_DIR:-$HOME/Music}"
diff --git a/.local/bin/musiccmd b/.local/bin/musiccmd
index b5f25d3..d47e772 100755
--- a/.local/bin/musiccmd
+++ b/.local/bin/musiccmd
@@ -1,7 +1,7 @@
#!/bin/sh
# helper for the music script
# dependencies: music, mpv, socat, yt-dlp, ffmpeg, imagemagick
-# optional dependencies: dwmblocks, libnotify, herbe
+# optional dependencies: sb, libnotify, herbe
FAVDIR="${XDG_MUSIC_DIR:-$HOME/Music}/favorite"
DLDIR="${XDG_MUSIC_DIR:-$HOME/Music}/download"
@@ -73,7 +73,7 @@ getthumbnail() {
main() {
if ! pgrep -x music >/dev/null; then
- kill -35 "$(pidof dwmblocks)"
+ kill -34 "$(pidof sb)"
herbe "Error: There is no music playing"\
"Do you want to play some ?" && music
return 1
@@ -85,7 +85,7 @@ main() {
case "$cmd" in
cycle|*pause|*play)
printf 'cycle pause\n' | socat - /tmp/mpvsocket
- kill -35 "$(pidof dwmblocks)" ;;
+ kill -34 "$(pidof sb)" ;;
*next)
printf 'playlist-next\n' | socat - /tmp/mpvsocket ;;
*prev)
@@ -96,7 +96,7 @@ main() {
| socat - /tmp/mpvsocket 1> /dev/null ;;
*stop)
printf 'stop\n' | socat - /tmp/mpvsocket
- kill -35 "$(pidof dwmblocks)" ;;
+ kill -34 "$(pidof sb)" ;;
*favorite|fav)
getpath
gettitle
diff --git a/.local/bin/plumber b/.local/bin/plumber
index c29b8e4..c29b8e4 100644..100755
--- a/.local/bin/plumber
+++ b/.local/bin/plumber
diff --git a/.local/etc/crontab b/.local/etc/crontab
index 96c9db3..7bf34ef 100644
--- a/.local/etc/crontab
+++ b/.local/etc/crontab
@@ -1 +1,2 @@
-*/30 * * * * randwp
+*/30 * * * * kill -49 $(pidof sb); randwp
+0 0 * * * kill -48 $(pidof sb)
diff --git a/.local/etc/dwmblocks/config b/.local/etc/dwmblocks/config
deleted file mode 100644
index 78cadc1..0000000
--- a/.local/etc/dwmblocks/config
+++ /dev/null
@@ -1,17 +0,0 @@
-/*Name State Update Signal + 34*/
-music = true // 35
-cputemp = true // 36
-fanspeed = false // 37
-memory = false // 38
-battery = true // 39
-wifi = true // 40
-ethernet = true // 41
-localip = false // 42
-publicip = false // 43
-volume = true // 44
-mic = true // 45
-news = false // 46
-weather = true // 47
-daypercent = false // 48
-date = true // 49
-time = true // 50
diff --git a/.local/etc/mpv/music/local.lua b/.local/etc/mpv/music/local.lua
index b647efc..a6da0bb 100644
--- a/.local/etc/mpv/music/local.lua
+++ b/.local/etc/mpv/music/local.lua
@@ -23,7 +23,7 @@ function notify_current_media()
origin = string.format("%s (%s)", origin, year)
end
end
- mp.command_native({"run", "pkill", "-RTMIN+1", "dwmblocks"})
+ mp.command_native({"run", "pkill", "-RTMIN", "sb"})
return mp.command_native({"run", "env", "HERBE_ID=/music", "herbe", title, origin})
end
diff --git a/.local/etc/mpv/music/online.lua b/.local/etc/mpv/music/online.lua
index 19fc411..2b80e3d 100644
--- a/.local/etc/mpv/music/online.lua
+++ b/.local/etc/mpv/music/online.lua
@@ -2,7 +2,7 @@ local utils = require "mp.utils"
function notify_current_media(key)
local title = mp.get_property(key)
- mp.command_native({"run", "pkill", "-RTMIN+1", "dwmblocks"})
+ mp.command_native({"run", "pkill", "-RTMIN", "sb"})
return mp.command_native({"run", "env", "HERBE_ID=/music", "herbe", title})
end
diff --git a/.local/etc/nvim/basics.vim b/.local/etc/nvim/basics.vim
index 11ce16d..73707db 100644
--- a/.local/etc/nvim/basics.vim
+++ b/.local/etc/nvim/basics.vim
@@ -20,7 +20,6 @@ set relativenumber
set colorcolumn=80
"set textwidth=79
set title
-set nohlsearch
set termguicolors
set clipboard+=unnamedplus
"set list
@@ -29,11 +28,14 @@ autocmd FileType * setl fo-=ro fo+=tc
abbreviate hte the
nnoremap :Q<CR> :q<CR>
nnoremap :Q!<CR> :q!<CR>
+set ttimeoutlen=10
+nnoremap <silent> <C-L> :nohls<C-R>=has('diff')?'<Bar>dif':''<CR><CR><C-L>
" Language specific
autocmd FileType python setl ts=4 sw=4 sts=4 expandtab
autocmd FileType lisp,html setl ts=2 sw=2 sts=2 expandtab
autocmd FileType html,markdown setl spell
autocmd FileType tex setl spell spl=fr
+autocmd FileType c setl makeprg=cc\ %:p
autocmd BufWritePost *.c silent! !astyle -A3 -t8 -p -xg -H -xB -n -w %:p
command Astyle !astyle -A3 -t8 -p -xg -H -xB -n -w %:p
diff --git a/.local/etc/sb/config b/.local/etc/sb/config
new file mode 100644
index 0000000..935bfb7
--- /dev/null
+++ b/.local/etc/sb/config
@@ -0,0 +1,17 @@
+# Name Active Signal
+music = true # 34
+cputemp = true # 35
+cpu = false # 36
+memory = false # 37
+battery = true # 38
+wifi = true # 39
+netspeed = true # 40
+localip = false # 41
+publicip = false # 42
+volume = true # 43
+mic = true # 44
+news = false # 45
+weather = true # 46
+daypercent = false # 47
+date = true # 48
+time = true # 49
diff --git a/.local/etc/sx/sxrc b/.local/etc/sx/sxrc
index 6d29c4f..d0833b2 100755
--- a/.local/etc/sx/sxrc
+++ b/.local/etc/sx/sxrc
@@ -1,6 +1,6 @@
#!/bin/sh
-killall picom scron sxhkd pipewire wireplumber xbanish redshift dwmblocks
+killall picom scron sxhkd pipewire wireplumber xbanish redshift sb
if [ "$(xrandr | awk '/DP-2/ {print $2}')" = 'connected' ]; then
xrandr --output LVDS-1 --off
@@ -18,6 +18,6 @@ sxhkd &
pipewire &
xbanish &
redshift &
-sleep 1s; dwmblocks &
+sb &
exec dwm
diff --git a/.local/etc/sxhkd/sxhkdrc b/.local/etc/sxhkd/sxhkdrc
index 2badbc8..2d33180 100644
--- a/.local/etc/sxhkd/sxhkdrc
+++ b/.local/etc/sxhkd/sxhkdrc
@@ -15,13 +15,13 @@ super + shift + r
Print
screenshot
{super + equal,XF86AudioRaiseVolume}
- wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%+; kill -44 $(pidof dwmblocks)
+ wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%+; kill -43 $(pidof sb)
{super + minus,XF86AudioLowerVolume}
- wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%-; kill -44 $(pidof dwmblocks)
+ wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%-; kill -43 $(pidof sb)
XF86Launch1
- wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle; kill -44 $(pidof dwmblocks)
+ wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle; kill -43 $(pidof sb)
F6
- wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle; kill -45 $(pidof dwmblocks)
+ wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle; kill -44 $(pidof sb)
F7
$TERMINAL -e dmenurecord
super + b
diff --git a/.local/etc/zsh/aliasrc b/.local/etc/zsh/aliasrc
index e5c93c1..9b5d856 100644
--- a/.local/etc/zsh/aliasrc
+++ b/.local/etc/zsh/aliasrc
@@ -17,7 +17,7 @@ alias cfn="v $XDG_CONFIG_HOME/newsboat/config"
alias cfu="v $XDG_CONFIG_HOME/newsboat/urls"
alias cfq="v $XDG_CONFIG_HOME/quand/config"
alias cfh="v $XDG_CONFIG_HOME/sxhkd/sxhkdrc"
-alias cfb="v $XDG_CONFIG_HOME/dwmblocks/config"
+alias cfsb="v $XDG_CONFIG_HOME/sb/config"
alias cfc="v $XDG_CONFIG_HOME/crontab"
alias dt="cd $XDG_DATA_HOME"
alias pkg="v $XDG_DATA_HOME/packages"
@@ -84,7 +84,8 @@ alias fd="fd -HI"
alias g="git"
alias gs="git status"
alias ga="git add"
-alias gc="git commit -a"
+alias gc="git commit"
+alias gca="git commit -a"
alias gcv="git commit -v"
alias gcm="git commit -m"
alias gp="git push --follow-tags" # --tags
diff --git a/.local/share/packages b/.local/share/packages
index 6e8cc4f..f9a1c51 100644
--- a/.local/share/packages
+++ b/.local/share/packages
@@ -22,7 +22,7 @@ git
## ratakor-repo
dmenu-ratakor # application launcher
dwm-ratakor # window manager
-dwmblocks-ratakor # status bar
+sb # status bar
st-ratakor # terminal emulator
slock-ratakor # screen locker
randhost # set a random hostname (OpenRC service)
@@ -74,10 +74,12 @@ gitui # tui for git (good if you don't remember what change you made)
#dotnet-sdk # C# for lsp do dotnet tool install -g csharp-ls
rustup # rust
nasm # x86 compiler
-clang # gcc replacement and C lsp
-pypy3 # JIT python interpreter
+clang # another cc + clangd C lsp
tcc # tiny c compiler
+mingw-w64-gcc # windows cc
+musl # another libc
zig
+pypy3 # JIT python interpreter
zls # zig lsp
gopls # go lsp
#rust-analyzer # rust lsp
@@ -89,7 +91,6 @@ vscode-css-languageserver
vscode-html-languageserver
astyle # C formatter
shellcheck
-mingw-w64-gcc
## sound
rtkit
diff --git a/README.md b/README.md
index 8fb4994..c4ed571 100644
--- a/README.md
+++ b/README.md
@@ -11,18 +11,18 @@ to your distro.
DO NOT TRY TO INSTALL if it's not a fresh install and you don't know what you're doing.
- $ git clone https://git.ratakor.com/dotfiles.git
+ $ git clone https://github.com/ratakor/dotfiles.git
$ cd dotfiles/.local
$ make
## Softwares
### Graphical environment
-- Window manager: [dwm](https://git.ratakor.com/dwm.git)
+- Window manager: [dwm](https://github.com/ratakor/dwm)
- Compositor: [picom](https://github.com/yshui/picom)
-- Bar: [dwmblocks](https://git.ratakor.com/dwmblocks.git)
-- Terminal emulator: [st](https://git.ratakor.com/st.git)
-- Program launcher: [dmenu](https://git.ratakor.com/dmenu.git)
+- Bar: [sb](https://github.com/ratakor/sb)
+- Terminal emulator: [st](https://github.com/ratakor/st)
+- Program launcher: [dmenu](https://github.com/ratakor/dmenu)
- Web Browser: [Ungoogled Chromium](https://github.com/ungoogled-software/ungoogled-chromium)
- Themes: [Dracula](https://draculatheme.com/) and [Gruvbox](https://github.com/morhetz/gruvbox)
@@ -47,10 +47,11 @@ DO NOT TRY TO INSTALL if it's not a fresh install and you don't know what you're
- Notifications: [herbe](https://github.com/dudik/herbe)
- Screenshot tool: [maim](https://github.com/naelstrof/maim)
- Mail client: [Claws Mail](https://www.claws-mail.org)
-- Screen locker: [slock](https://git.ratakor.com/slock.git)
-- [Wallpapers](https://git.ratakor.com/wallpapers.git/)
+- Screen locker: [slock](https://github.com/ratakor/slock)
+- [Wallpapers](https://github.com/ratakor/wallpapers)
-See [packages](.local/share/packages) for a list and a small description of other programs I use.
+See [packages](.local/share/packages) for a list and a small description of
+other programs I use.
## TODO
- config or patch mtm (or tmux) to be usable