scripts sorted
This commit is contained in:
1 parent
cd667e6aa1
commit
2f4c2a68a1
64 files changed
+273
-331
No files matched your search
+225
-165
@@ -1,146 +1,136 @@
|
||||
# Directory of Scripts
|
||||
|
||||
## `audio`
|
||||
I keep all my user-created scripts here in `~/.scripts/`. Scripts are sorted
|
||||
into sub-directories for easy management, and all are seamlessly added to
|
||||
`$PATH` with the command below in `~/.profile`:
|
||||
|
||||
The audio recording script run by `dmenurecord` (bound to `mod+Print`).
|
||||
```
|
||||
export PATH="$(du $HOME/.scripts/ | cut -f2 | tr '\n' ':')$PATH"
|
||||
```
|
||||
|
||||
## `bottomleft`
|
||||
## `statusbar/`
|
||||
|
||||
Makes the currently selected window float in the bottom left of screen. Bound
|
||||
to `mod+B`.
|
||||
For modules used in i3blocks.
|
||||
|
||||
## `camtoggle`
|
||||
### `i3battery`
|
||||
|
||||
Starts/kills /dev/video0 webcam. Placed in bottom right by default.
|
||||
i3blocks module. Shows available power remaining with icon indicating battery
|
||||
status. Colors indicate different levels of charge.
|
||||
|
||||
## `compiler`
|
||||
### `i3mail`
|
||||
|
||||
i3blocks module for use with mutt-wizard. Shows unread mail and if
|
||||
`mailsync.sh` is running.
|
||||
|
||||
### `i3mpd`
|
||||
|
||||
i3blocks module. Shows current song; if paused, name will be grayed and italic.
|
||||
|
||||
### `i3mpdupdate`
|
||||
|
||||
A daemon running by default that will update the i3mpd block on mpd change.
|
||||
|
||||
### `i3pacman`
|
||||
|
||||
i3blocks module. Detects new installable upgrades. Only works if you use
|
||||
cronjobs to automatically sync repositories.
|
||||
|
||||
### `i3torrent`
|
||||
|
||||
i3blocks module. Shows torrents idle (⌛️), downloading (⬇️) or
|
||||
finished (🌱).
|
||||
|
||||
### `i3volume`
|
||||
|
||||
i3blocks module. Shows volume percentage or mute notification.
|
||||
|
||||
### `i3weather`
|
||||
|
||||
i3blocks module. Gets weather forcast from wttr.in and returns today's
|
||||
precipitation chance (☔), daily low (❄️) and daily high (☀️).
|
||||
|
||||
### `i3wifi`
|
||||
|
||||
A modified version of the i3blocks wifi module. Clicked, it brings up wifi-menu
|
||||
and also appears when there is no wifi connection.
|
||||
|
||||
### `popupdate`
|
||||
|
||||
Called by clicking on the update icon if there are new packages. Spawns a `yay`
|
||||
upgrade of the main Arch repos and AUR packages, updates the i3blocks module
|
||||
once complete.
|
||||
|
||||
### `popweather`
|
||||
|
||||
The script called by clicking on the i3 weather module. Brings up the forecast
|
||||
from `http://wttr.in` and will close on <Enter>.
|
||||
|
||||
|
||||
## `cron/`
|
||||
|
||||
For scripts meant to be cronjobs. None are active by default on LARBS.
|
||||
|
||||
### `checkup`
|
||||
|
||||
If connected to internet, syncs package repositories and downloads (but does
|
||||
not install) any potential updates. Gives `notify-send` notifications of when
|
||||
it is active since other `pacman` install commands cannot be run
|
||||
simultaneously.
|
||||
|
||||
You may need to grant your user the ability to run `pacman -Syyuw --noconfirm`
|
||||
without a password (done in `/etc/sudoers`).
|
||||
|
||||
### `cronbat`
|
||||
|
||||
Gives a dunst notification if the battery is less than 25%.
|
||||
|
||||
### `crontog`
|
||||
|
||||
Not actually a cronjob, but just turns off/on all user cronjobs.
|
||||
|
||||
### `newsup`
|
||||
|
||||
Updates newsboat RSS feeds if connected to internet. Will also display a
|
||||
newspaper update icon on i3blocks if it has not be user disabled.
|
||||
|
||||
## `tools/`
|
||||
|
||||
Scripts intended to be run either manually by the user or linked to a shortcut
|
||||
in vim or another program.
|
||||
|
||||
### `compiler`
|
||||
|
||||
Compiles a markdown, R markdown or LaTeX document with the approriate command.
|
||||
Will also run `make && sudo make install` if in a `config.h` file. Otherwise
|
||||
it will create a sent presentation. This can be thought of a general output
|
||||
handler. I have it bound to `<leader>c` in vim.
|
||||
|
||||
## `crontog`
|
||||
|
||||
Turns off/on all user cronjobs.
|
||||
|
||||
## `displayselect`
|
||||
|
||||
Select which displays to use. Bound to `mod+F3`.
|
||||
|
||||
## `dmenuarchwiki`
|
||||
|
||||
Bind this script to a key and it will give you a prompt to search for a term in
|
||||
the Arch Wiki. Used to be binded to `mod+F11`, but has been replaced by
|
||||
`ducksearch` there.
|
||||
|
||||
## `dmenuhandler`
|
||||
### `dmenuhandler`
|
||||
|
||||
Give this script a url and it will offer dmenu options for opening it. Used by
|
||||
`newsboat` and some other programs as a link handler.
|
||||
|
||||
## `dmenumount`
|
||||
|
||||
Detect available partitions with `lsblk` and offer to mount them. Bound to
|
||||
`mod+F9`. Will do nothing if none are available.
|
||||
|
||||
## `dmenurecord`
|
||||
|
||||
Gives a list of recording commands: `audio`, `video` and `screencast` (both) in
|
||||
dmenu for selection.
|
||||
|
||||
## `dmenuumount`
|
||||
|
||||
Unmount a mounted non-essential partition. Bound to `mod+F10`. Will do nothing
|
||||
if none are mounted.
|
||||
|
||||
## `dropdowncalc`
|
||||
|
||||
The command initially run in the `math` window (toggeable with `mod+a`). Runs
|
||||
`r` if available, else `python`.
|
||||
|
||||
## `ducksearch`
|
||||
|
||||
Show a dmenu prompt and search for the inputed text in DuckDuckGo. Can take
|
||||
bangtags as expected, i.e. typing in `!aw Arch Linux` will search the Arch Wiki
|
||||
for "Arch Linux" or `!yt Luke Smith` will search YouTube for "Luke Smith", etc.
|
||||
|
||||
## `extract`
|
||||
### `extract`
|
||||
|
||||
Will detect file type of archive and run appropriate extraction command.
|
||||
|
||||
## `getbib`
|
||||
### `getbib`
|
||||
|
||||
Use crossref.org to automatically detect bibtex entry of a .pdf. Attempts to
|
||||
search for the .pdf's DOI. Returns nothing if none detected.
|
||||
|
||||
## `getkeys`
|
||||
### `getkeys`
|
||||
|
||||
Get the LARBS documentation on what bindings exist for main programs.
|
||||
|
||||
## `i3battery`
|
||||
|
||||
i3blocks module. Shows available power remaining with icon indicating battery
|
||||
status. Colors indicate different levels of charge.
|
||||
|
||||
## `i3mail`
|
||||
|
||||
i3blocks module for use with mutt-wizard. Shows unread mail and if
|
||||
`mailsync.sh` is running.
|
||||
|
||||
## `i3mpd`
|
||||
|
||||
i3blocks module. Shows current song; if paused, name will be grayed and italic.
|
||||
|
||||
## `i3mpdupdate`
|
||||
|
||||
A daemon running by default that will update the i3mpd block on mpd change.
|
||||
|
||||
## `i3pacman`
|
||||
|
||||
i3blocks module. Detects new installable upgrades. Only works if you use
|
||||
cronjobs to automatically sync repositories.
|
||||
|
||||
## `i3resize`
|
||||
|
||||
A script that allows intuitive resizing of windows. Mapped to `mod+Y/U/I/O`.
|
||||
|
||||
## `i3torrent`
|
||||
|
||||
i3blocks module. Shows torrents idle (⌛️), downloading (⬇️) or
|
||||
finished (🌱).
|
||||
|
||||
## `i3volume`
|
||||
|
||||
i3blocks module. Shows volume percentage or mute notification.
|
||||
|
||||
## `i3weather`
|
||||
|
||||
i3blocks module. Gets weather forcast from wttr.in and returns today's
|
||||
precipitation chance (☔), daily low (❄️) and daily high (☀️).
|
||||
|
||||
## `i3wifi`
|
||||
|
||||
A modified version of the i3blocks wifi module. Clicked, it brings up wifi-menu
|
||||
and also appears when there is no wifi connection.
|
||||
|
||||
## `kb-lights.py`
|
||||
|
||||
A Python 3 script which will increase or decrease keyboard lights when given
|
||||
either a `+` or `-` argument.
|
||||
|
||||
## `killrecording`
|
||||
|
||||
End a recording started by `dmenurecord` the proper way.
|
||||
|
||||
## `linkhandler`
|
||||
### `linkhandler`
|
||||
|
||||
The automatic link handler used by `newsboat` and other programs. Urls of video
|
||||
sites or of video files are opened in `mpv`, images are downloaded/opened in
|
||||
`feh`, music files are downloaded with `wget` and all other urls are opened in
|
||||
the default browser.
|
||||
|
||||
## `lmc`
|
||||
### `lmc`
|
||||
|
||||
A music controller that simplifies music/audio management and improves the
|
||||
interface with i3blocks. Check inside to see what it does. This is what i3
|
||||
@@ -148,96 +138,166 @@ audio/music commands run by default. If you use a difference music system or
|
||||
ALSA, you can change this script rather than changing all the shortcuts in
|
||||
different places.
|
||||
|
||||
## `lockscreen`
|
||||
|
||||
The screen locker. Gives a confirm prompt and if user says yes, all audio will
|
||||
be paused and the screen will be distorted and locked and screen will soon time
|
||||
out. User must insert password to unlock.
|
||||
|
||||
## `musstuff`
|
||||
|
||||
Some old notes and commands on deleted music shortcuts.
|
||||
|
||||
## `note`
|
||||
### `note`
|
||||
|
||||
Give this script some text/a message as an argument. It will print it to the
|
||||
terminal, and if `dunst` is running, display a notification.
|
||||
|
||||
## `opout`
|
||||
### `opout`
|
||||
|
||||
"Open output", opens the corresponding `.pdf` file if run on a `.md`, `.tex` or
|
||||
`.rmd` file, or if given an `.html` file, will open it in the browser. Bound
|
||||
to `<leader>p` in my vim config to reveal typical output.
|
||||
|
||||
## `pauseallmpv`
|
||||
### `pauseallmpv`
|
||||
|
||||
Pauses all mpv instances by sending the `,` key to each. Used by several
|
||||
scripts, but can be used alone as well.
|
||||
scripts, but can be used alone as well. It will not pause an audio only mpv
|
||||
instance. If you know how to add a hack to do this, feel free to PR it or email
|
||||
me an addition.
|
||||
|
||||
## `polybar_launch`
|
||||
|
||||
For `polybar` users. Launches `polybar` on every screen. Should be run in the
|
||||
i3 config.
|
||||
|
||||
## `popweather`
|
||||
|
||||
The script called by clicking on the i3 weather module. Brings up the forecast
|
||||
from `http://wttr.in` and waits for input to prevent immediate closing of
|
||||
spawned window.
|
||||
|
||||
## `prompt`
|
||||
|
||||
Gives a Yes/No prompt to a question given as an argument. Used by numerous
|
||||
bindings like `mod+shift+x`, `mod+shift+backspace` and `mod+shift+escape`.
|
||||
|
||||
## `remaps`
|
||||
### `remaps`
|
||||
|
||||
Remaps capslock to escape when pressed and super/mod when held. Maps the menu
|
||||
key to super as well. Runs the US international keyboard setup. If you want
|
||||
another keyboard setup, edit this fine.
|
||||
|
||||
## `samedir`
|
||||
### `shortcuts`
|
||||
|
||||
Opens a terminal window in the same directory as the window currently
|
||||
selection. Bound to `mod+shift+enter`.
|
||||
For updating bash and ranger shortcuts. Reads `~/.key_directories` and
|
||||
`~/.key_files` for pairs of keypresses and directories and files, then
|
||||
autoproduces bash aliases and ranger shortcuts for them which output to
|
||||
`~/.shortcuts` and `~/.config/ranger/shortcuts.conf` respectively. These are
|
||||
read automatically by my bash and ranger configs. You don't have to run this
|
||||
script manually though, as it's run by vim whenever you edit one of the
|
||||
`~/.key_*` files.
|
||||
|
||||
## `screencast`
|
||||
### `speedvid`
|
||||
|
||||
A script for `dmenurecord`. Records default audio and the screen.
|
||||
Speed up a given video file (`$1`) by a given ammount (`$2`).
|
||||
|
||||
## `shortcuts.sh`
|
||||
### `tpb`
|
||||
|
||||
For updating bash and ranger shortcuts. Reads `~/.scripts/folders` and
|
||||
`~/.scripts/configs` for pairs of keypresses and directories and configfiles,
|
||||
then autoproduces bash aliases and ranger shortcuts for them. See the
|
||||
`README.md` at
|
||||
[https://github.com/LukeSmithxyz/shortcu-sync](https://github.com/LukeSmithxyz/shortcu-sync)
|
||||
for the specifics.
|
||||
Search Pirate Bay for the certain search terms given as arguments.
|
||||
|
||||
## `texclear`
|
||||
### `texclear`
|
||||
|
||||
Remove all `.tex` related build files. This is run by my vim when I stop
|
||||
editing any `.tex` file.
|
||||
|
||||
## `tmuxinit`
|
||||
### `transadd`
|
||||
|
||||
The mimeapp default script for handling torrent magnet links. Starts
|
||||
`transmission-daemon` if not running and adds the link.
|
||||
|
||||
## `i3cmds`
|
||||
|
||||
These are scripts linked to bindings in i3. They typically perform
|
||||
user-interface actions or involve dmenu.
|
||||
|
||||
### `bottomleft` and `bottomright`
|
||||
|
||||
Makes the currently selected window float in one of the bottom corners of the
|
||||
screen. `bottomleft` is bound to `mod+B` by default.
|
||||
|
||||
### `camtoggle`
|
||||
|
||||
Starts/kills /dev/video0 webcam. Placed in bottom right by default.
|
||||
|
||||
### `ddspawn`
|
||||
|
||||
This is the script called to create, show and hide the dropdown tmux terminal
|
||||
mapped to `mod+u`, but also the dropdown calculator mapped to `mod+a`. Give the
|
||||
script an argument that is a script the window will run. If a window does not
|
||||
already exist, `ddspawn` creates it, if it does, `ddspawn` will toggle its
|
||||
visibility. The the script itself for usage.
|
||||
|
||||
### `displayselect`
|
||||
|
||||
Select which displays to use. Bound to `mod+F3`.
|
||||
|
||||
### `dmenumount`
|
||||
|
||||
Gives a dmenu prompt for mounting USB drives or Android devices. Bound to
|
||||
`mod+F9`. Will do nothing if none are available.
|
||||
|
||||
### `dmenurecord`
|
||||
|
||||
Gives a list of recording commands: `audio`, `video` and `screencast` (both) in
|
||||
dmenu for selection. Bound to `mod+Print Screen` by default. Should be kill by
|
||||
`killrecording`.
|
||||
|
||||
### `dmenuumount`
|
||||
|
||||
Unmount a mounted non-essential partition. Bound to `mod+F10`. Will do nothing
|
||||
if none are mounted. It will not try to unmount essential system partitions.
|
||||
|
||||
### `dmenuunicode`
|
||||
|
||||
Shows a searchable dmenu prompt of emoji characters. The selected emoji is
|
||||
copied to the system clipboard, while its character code is copied to primary
|
||||
selection (middle mouse button).
|
||||
|
||||
### `dropdowncalc`
|
||||
|
||||
The dropdown calculator script called by `ddspawn` and bound to `mod+a` by
|
||||
default. Will run an R calculator if installed, otherwise python.
|
||||
|
||||
### `ducksearch`
|
||||
|
||||
Show a dmenu prompt and search for the inputed text in DuckDuckGo. Can take
|
||||
bangtags as expected, i.e. typing in `!aw Arch Linux` will search the Arch Wiki
|
||||
for "Arch Linux" or `!yt Luke Smith` will search YouTube for "Luke Smith", etc.
|
||||
|
||||
### `i3resize`
|
||||
|
||||
A script that allows intuitive resizing of windows. Mapped to `mod+Y/U/I/O`.
|
||||
|
||||
### `killrecording`
|
||||
|
||||
End a recording started by `dmenurecord` the proper way without file trucation
|
||||
or lingering background processes, mapped to `mod+Delete` by default.
|
||||
|
||||
### `lockscreen`
|
||||
|
||||
The screen locker. Gives a confirm prompt and if user says yes, all audio will
|
||||
be paused and the screen will be distorted and locked and screen will soon time
|
||||
out. User must insert password to unlock. Mapped to `mod+x` by default.
|
||||
|
||||
### `newspod`
|
||||
|
||||
A silly line that has a script all to itself due to i3's idiosyncracies. Starts
|
||||
`newsboat`, if `newsboat` cannot open because of another instance being open,
|
||||
opens `podboat`.
|
||||
|
||||
### `prompt`
|
||||
|
||||
Gives a Yes/No prompt to a question given as an argument. Used by numerous
|
||||
bindings like `mod+shift+x`, `mod+shift+backspace` and `mod+shift+escape`.
|
||||
|
||||
### `samedir`
|
||||
|
||||
Opens a terminal window in the same directory as the window currently
|
||||
selection. Bound to `mod+shift+enter`.
|
||||
|
||||
### `td-toggle`
|
||||
|
||||
Gives a dmenu prompt to start `transmission-daemon` if not running, or the kill
|
||||
it if it is. Obviously you need `transmission-cli` installed for this to work.
|
||||
Mapped to `mod+F7` by default.
|
||||
|
||||
### `tmuxdd`
|
||||
|
||||
The startup script for the dropdown terminal (toggleable with `mod+u`). Either
|
||||
attaches to an existing tmux session or begins a new one.
|
||||
|
||||
## `toggletouchpad`
|
||||
### `toggletouchpad`
|
||||
|
||||
As the name suggests, turns off TouchPad if on, and turns it on if off.
|
||||
Requires `xf86-input-synaptics`.
|
||||
Requires `xf86-input-synaptics`. If your laptop has a special button for this,
|
||||
it will be mapped by default.
|
||||
|
||||
## `tpb`
|
||||
|
||||
Search Pirate Bay for the certain search terms given as arguments.
|
||||
|
||||
## `tutorialvids`
|
||||
### `tutorialvids`
|
||||
|
||||
A dmenu prompt that gives some options of tutorial videos to watch. Bound to
|
||||
`mod+shift+e`.
|
||||
|
||||
## `video`
|
||||
|
||||
A script for `dmenurecord`. Records the screen with no audio.
|
||||
File renamed without changes.
Executable
+5
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
# Toggles all cronjobs off/on.
|
||||
# Stores disabled crontabs in ~/.consaved until restored.
|
||||
|
||||
([ -f ~/.cronsaved ] && crontab - < ~/.cronsaved && rm ~/.cronsaved && notify-send "Cronjobs have been re-enabled." && echo cronjobs re-enabled.) || ( crontab -l > ~/.cronsaved && crontab -r && echo cronjobs saved and disabled.;notify-send "Cronjobs have been saved and disabled.")
|
||||
@@ -1,5 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Set as a cron job to check for new RSS entries for newsboat.
|
||||
# Note that newsbot cannot be opened during the sync and this
|
||||
# sync cannot run while another instance of newsboat is open.
|
||||
|
||||
ping -q -t 1 -c 1 `ip r | grep -m 1 default | cut -d ' ' -f 3` >/dev/null || exit
|
||||
echo "📰 🔃" > ~/.newsup
|
||||
pkill -RTMIN+6 i3blocks
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Toggles all cronjobs off/on.
|
||||
# Stores disabled crontabs in ~/.consaved until restored.
|
||||
|
||||
([[ -f ~/.cronsaved ]] && cat ~/.cronsaved | crontab - && rm ~/.cronsaved && notify-send "Cronjobs have been re-enabled." && echo cronjobs re-enabled.) || ( crontab -l > ~/.cronsaved && crontab -r && echo cronjobs saved and disabled.;notify-send "Cronjobs have been saved and disabled.")
|
||||
@@ -1,17 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Gives a dmenu prompt to search the Arch Wiki in your preferred web browser
|
||||
# Home goes to the home page of the Arch Wiki
|
||||
# Anything else, it search it
|
||||
|
||||
# Original idea/script by Github user @Caedis. Minor changes by Luke.
|
||||
|
||||
pgrep -x dmenu && exit
|
||||
|
||||
choice=$(echo "📖" | dmenu -i -p "Type ArchWiki page or search term:") || exit 1
|
||||
|
||||
if [ "$choice" = "📖" ]; then
|
||||
$BROWSER "https://wiki.archlinux.org"
|
||||
else
|
||||
$BROWSER "https://wiki.archlinux.org/index.php?search=$choice"
|
||||
fi
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -5,7 +5,7 @@ rm -f /tmp/locked.png
|
||||
# If `imagemagick` is not installed, use a blank screen.
|
||||
[ -f /usr/bin/convert ] &&
|
||||
scrot -m -z /tmp/base.png &&
|
||||
pgrep -x dunst && notify-send -i ~/.scripts/lock.png "Locking computer..." &&
|
||||
pgrep -x dunst && notify-send -i ~/.scripts/pix/lock.png "Locking computer..." &&
|
||||
convert /tmp/base.png -blur 0x8 /tmp/locked.png
|
||||
|
||||
# Pause music (mocp, mpd and send the pause key to all mpv videos):
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -2,10 +2,12 @@
|
||||
|
||||
# If transmission-daemon is running, will ask to kill, else will ask to start.
|
||||
|
||||
if pgrep -x transmission-da ;
|
||||
[ ! -f /usr/bin/transmission-daemon ] && echo "Transmission not installed." && exit
|
||||
|
||||
if pgrep -x transmission-da >/dev/null ;
|
||||
then
|
||||
yn=$(printf "No\\nYes" | dmenu -i -p "Kill transmission-daemon?")
|
||||
[ "$yn" = "Yes" ] && killall transmission-daemon
|
||||
[ "$yn" = "Yes" ] && killall transmission-da
|
||||
else
|
||||
yn=$(printf "No\\nYes" | dmenu -i -p "Start transmission daemon?")
|
||||
[ "$yn" = "Yes" ] && transmission-daemon
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,35 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
# coding: utf-8
|
||||
|
||||
from sys import argv
|
||||
import dbus
|
||||
|
||||
|
||||
def kb_light_set(delta):
|
||||
bus = dbus.SystemBus()
|
||||
kbd_backlight_proxy = bus.get_object('org.freedesktop.UPower', '/org/freedesktop/UPower/KbdBacklight')
|
||||
kbd_backlight = dbus.Interface(kbd_backlight_proxy, 'org.freedesktop.UPower.KbdBacklight')
|
||||
|
||||
current = kbd_backlight.GetBrightness()
|
||||
maximum = kbd_backlight.GetMaxBrightness()
|
||||
new = max(0, current + delta)
|
||||
|
||||
if 0 <= new <= maximum:
|
||||
current = new
|
||||
kbd_backlight.SetBrightness(current)
|
||||
|
||||
# Return current backlight level percentage
|
||||
return 100 * current / maximum
|
||||
|
||||
if __name__ == '__main__':
|
||||
if len(argv[1:]) == 1:
|
||||
if argv[1] == "--up" or argv[1] == "+":
|
||||
# ./kb-light.py (+|--up) to increment
|
||||
print(kb_light_set(1))
|
||||
elif argv[1] == "--down" or argv[1] == "-":
|
||||
# ./kb-light.py (-|--down) to decrement
|
||||
print(kb_light_set(-1))
|
||||
else:
|
||||
print("Unknown argument:", argv[1])
|
||||
else:
|
||||
print("Script takes exactly one argument.", len(argv[1:]), "arguments provided.")
|
||||
@@ -1,49 +0,0 @@
|
||||
These are some old lines from the i3 config.
|
||||
|
||||
I now use the lmc script to change volume and music tracks, which makes i3blocks integration better.
|
||||
|
||||
I deleted the alternative lines for audio commands from the i3 config.
|
||||
Still, since they're a good reference for people who use ALSA, or people who use music players besides mpd, I've kept them in this file.
|
||||
|
||||
You can replace the commands in the lmc script to get the setup you want. I might have the script autodecide the command later on.
|
||||
|
||||
#FOR ALSA/AMIXER
|
||||
#set $inc --no-startup-id amixer sset Master 2%+
|
||||
#set $biginc --no-startup-id amixer sset Master 5%+
|
||||
#set $dec --no-startup-id amixer sset Master 2%-
|
||||
#set $bigdec --no-startup-id amixer sset Master 5%-
|
||||
#set $mute --no-startup-id amixer sset Master toggle
|
||||
#set $truemute --no-startup-id amixer sset Master mute
|
||||
|
||||
##For spotify
|
||||
#set $music spotify
|
||||
#set $pause dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause
|
||||
#set $trupause dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Pause
|
||||
#set $play dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Play
|
||||
#set $next dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next
|
||||
#set $prev dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous
|
||||
#set $lilfor dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Seek
|
||||
#set $bigfor dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Seek(
|
||||
|
||||
# For moc:
|
||||
#set $music --no-startup-id st -e mocp
|
||||
#set $pause --no-startup-id mocp -G
|
||||
#set $truepause --no-startup-id mocp -P
|
||||
#set $next --no-startup-id mocp -f
|
||||
#set $prev --no-startup-id mocp -r
|
||||
#set $lilfor --no-startup-id mocp -k 10
|
||||
#set $bigfor --no-startup-id mocp -k 120
|
||||
#set $lilbak --no-startup-id mocp -k -10
|
||||
#set $bigbak --no-startup-id mocp -k -120
|
||||
#set $beg --no-startup-id mocp -j 0%
|
||||
|
||||
# For cmus:
|
||||
#set $music --no-startup-id st -e cmus
|
||||
#set $pause --no-startup-id cmus-remote -u
|
||||
#set $next --no-startup-id cmus-remote -n
|
||||
#set $prev --no-startup-id cmus-remote -r
|
||||
#set $lilfor --no-startup-id cmus-remote -k +10
|
||||
#set $bigfor --no-startup-id cmus-remote -k +120
|
||||
#set $lilbak --no-startup-id cmus-remote -k -10
|
||||
#set $bigbak --no-startup-id cmus-remote -k -120
|
||||
#set $beg --no-startup-id cmus-remote -k 00:00:00
|
||||
File renamed without changes.
|
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 7.7 KiB |
@@ -1,16 +0,0 @@
|
||||
#!/bin/sh
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# Terminate already running bar instances
|
||||
killall -q polybar
|
||||
|
||||
# Wait until the processes have been shut down
|
||||
while pgrep -x polybar >/dev/null; do sleep 1; done
|
||||
|
||||
# Launch bar1 and bar2
|
||||
#polybar example &
|
||||
|
||||
for i in $(polybar -m | awk -F: '{print $1}'); do MONITOR=$i polybar example -c ~/.config/polybar/config & done
|
||||
feh --bg-scale ~/.config/wall.png
|
||||
|
||||
echo "Bars launched..."
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Display contents of selection via dunst if running.
|
||||
# Separate script for i3.
|
||||
|
||||
pgrep -x dunst >/dev/null && notify-send "$(xclip -o -selection clipboard)"
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user