Skip to content

VTimofeenko/wm-scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

This is a collection of scripts to be used with tmux, i3-gaps and i3blocks.

i3blocks looks like this:

i3blocks example

Dependencies

  • app-emulation/libvirt for vm_status
  • sys-apps/lm-sensors for cpu
  • x11-misc/xkblayout-state for current_language
  • media-sound/pulsemixer for volume
  • media-sound/pavucontrol for volume
  • app-misc/headsetcontrol::nitratesky for headset_ctl
  • x11-misc/j4-dmenu-desktop for the launcher
  • media-gfx/maim for scrnsht_ctl
  • x11-misc/xvkbd for noctrlq.sh and ctrlshiftc.sh
  • app-misc/tmux for tmux helpers
  • sys-apps/etckeeper for monitoring /etc/ repository
  • x11-misc/dunst, v>=1.5.0 for notifications
  • app-office/todoman::nitratesky for todo display

Installation

There is an ebuild available in nitratesky overlay. Alternatively, the scripts may be downloaded and used on their own.

Structure

i3-helpers

  • j4-launcher.shj4-dmenu-desktop-based launcher, capable of filtering out unneeded desktop files

  • ctrlshiftc.sh — catches Ctrl+Shift+c when sent to Firefox and resends normal Ctrl+c

  • noctrlq.sh — stops Firefox from exiting when Ctrl+q is pressed

  • scrnsht_ctl — small utility to capture screenshots. By default uses darken shader to darken the rest of the screen

  • toggle_gaps.sh — script to toggle gaps on the current workspace, requires i3-gaps

  • layout_toggle.sh — script that toggles keyboard layouts, sends notification using dunstify and changes keyboard layouts in specified Xephyrs running inside firejails. Requires running Xephyrs to have the same set of keyboard layouts as the host xorg-server in the same order.

  • toggle_output_focus.sh — script to toggle focus between multiple outputs supplied to its parameters.

    Example binding:

    # Move focus DP-0 > DP-1 > DVI-D-0 > DP-0 ...
    bindsym $mod+Escape exec --no-startup-id $helper_path/toggle_output_focus.sh DP-0 DP-1 DVI-D-0
    
  • move_obj_to_output.sh — script to move workspace or a container to the next output and focus that output.

    Example binding:

    # move focused workspace DP-0 > DP-1 > DVI-D-0 > DP-0 ...
    bindsym $mod+Shift+Tab exec --no-startup-id $helper_path/move_obj_to_output.sh workspace DP-0 DP-1 DVI-D-0
    # move focused container DP-0 > DP-1 > DVI-D-0
    bindsym $mod+Shift+Tab exec --no-startup-id $helper_path/move_obj_to_output.sh container DP-0 DP-1 DVI-D-0
    
  • dunstctl_toggle_notify.sh — displays a notification and toggles the state of dunst. Requires dunst version greater than 1.5.0 due to dunstctl requirement.

  • i3-helpers/scratchpad_terminal.sh — checks if a scratchpad terminal is running and shows it. If it is not running — launches it. Syntax:

    bindsym <KEY_COMBO> scratchpad_terminal $TERMINAL <TERMINAL_TITLE>

    where <TERMINAL_TITLE> is the one i3 will move to scratchpad like so:

    for_window [title="$TERMINAL_TITLE"] move scratchpad

i3blocks

  • battery — displays battery status. Requires battery number as the argument
  • clock — the clock
  • cpu_temp — cpu temp, requires an argument (see below)
  • config_repo_status — I keep my ${HOME}/.config as a git repository and if something is changed there and is not commited, this block appears on i3blocks bar. If clicked, it opens up $TERMINAL at the repo location.
  • current_language — shows the current language using xkblayout-state
  • headset_ctl — shows battery status for compatible headphones.
  • internet — shows WiFi signal strength
  • todo_next — block for the next item in vim todolist.
  • todo_total — block for the total amount of items in vim todolist.
  • vm_status — uses virsh to check if VM from the argument is running
  • volume — shows volume level and can launch pulsemixer and pavucontrol
  • todoman — shows tasks from app-office/todoman list

cpu_temp

cpu: requires an argument in jq compatible format. E.g. for the following output:

{
   "k10temp-pci-00c3":{
      "Adapter": "PCI adapter",
      "Tdie":{
         "temp1_input": 37.500,
         "temp1_max": 70.000
      },
      "Tctl":{
         "temp2_input": 37.500
      }
   }
}

the argument should be '."k10temp-pci-00c3"."Tdie"."temp1_input" | round' to produce output 38 C

Tmux

  • config-status.sh — provides a widget that can tell if ${HOME}/.config repository has uncommited changes Image

  • etckeeper-status.sh — provides a tmux widget that can tell if the /etc directory has uncommited changes Image

  • sensor.sh — provides CPU temperature, see cpu_temp above. tmux.conf makes it a little hard to escape parameters properly, so this is best used in a wrapper script

  • uptime.sh — provide uptime output

Portage clean is based on config-status.sh and checks the state of /etc/portage repository

About

Utilities for tmux, i3, i3blocks

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published